diff options
author | Jan Kara <jack@suse.cz> | 2012-12-17 19:02:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:22 -0500 |
commit | 58156c8fbf43e71dd091848d4dbfd780d04016e6 (patch) | |
tree | ffe31e639221d1f2434f873f93d3ee654cbfb9da /fs/fat/fat.h | |
parent | f562146a3daf6aa0bbf2a1bc4b6b7da031ed5dcd (diff) |
fat: provide option for setting timezone offset
So far FAT either offsets time stamps by sys_tz.minuteswest or leaves them
as they are (when tz=UTC mount option is used). However in some cases it
is useful if one can specify time stamp offset on his own (e.g. when time
zone of the camera connected is different from time zone of the computer,
or when HW clock is in UTC and thus sys_tz.minuteswest == 0).
So provide a mount option time_offset= which allows user to specify offset
in minutes that should be applied to time stamps on the filesystem.
akpm: this code would work incorrectly when used via `mount -o remount',
because cached inodes would not be updated. But fatfs's fat_remount() is
basically a no-op anyway.
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r-- | fs/fat/fat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index 623f36f0423b..12701a567752 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -29,6 +29,7 @@ struct fat_mount_options { | |||
29 | unsigned short fs_fmask; | 29 | unsigned short fs_fmask; |
30 | unsigned short fs_dmask; | 30 | unsigned short fs_dmask; |
31 | unsigned short codepage; /* Codepage for shortname conversions */ | 31 | unsigned short codepage; /* Codepage for shortname conversions */ |
32 | int time_offset; /* Offset of timestamps from UTC (in minutes) */ | ||
32 | char *iocharset; /* Charset used for filename input/display */ | 33 | char *iocharset; /* Charset used for filename input/display */ |
33 | unsigned short shortname; /* flags for shortname display/create rule */ | 34 | unsigned short shortname; /* flags for shortname display/create rule */ |
34 | unsigned char name_check; /* r = relaxed, n = normal, s = strict */ | 35 | unsigned char name_check; /* r = relaxed, n = normal, s = strict */ |
@@ -45,7 +46,7 @@ struct fat_mount_options { | |||
45 | flush:1, /* write things quickly */ | 46 | flush:1, /* write things quickly */ |
46 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ | 47 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ |
47 | usefree:1, /* Use free_clusters for FAT32 */ | 48 | usefree:1, /* Use free_clusters for FAT32 */ |
48 | tz_utc:1, /* Filesystem timestamps are in UTC */ | 49 | tz_set:1, /* Filesystem timestamps' offset set */ |
49 | rodir:1, /* allow ATTR_RO for directory */ | 50 | rodir:1, /* allow ATTR_RO for directory */ |
50 | discard:1, /* Issue discard requests on deletions */ | 51 | discard:1, /* Issue discard requests on deletions */ |
51 | nfs:1; /* Do extra work needed for NFS export */ | 52 | nfs:1; /* Do extra work needed for NFS export */ |