Skip to contentSkip to conversation

fat: set s_time_gran for msdos or vfat mounts

PATCH Superseded Frank Sorenson 1 participant 1 message Mar 26, 2018

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fat: set s_time_gran for msdos or vfat mounts

Author: Frank Sorenson <[email protected]>
Date:   2018-01-23 15:51:37 -0600

fat: set the s_time_gran for msdos or vfat mounts

For vfat, ctime granularity is 10ms; set the super_block's s_time_gran to 10ms for vfat and 1 second for msdos mounts.

fs/fat/inode.c +1 -0
index 20a0a89eaca5..ff10cdf07a93 100644
@@ -1612,6 +1612,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	sb->s_magic = MSDOS_SUPER_MAGIC;
 	sb->s_op = &fat_sops;
 	sb->s_export_op = &fat_export_ops;
+	sb->s_time_gran = isvfat ? 10000000 : 1000000000;
 	mutex_init(&sbi->nfs_build_inode_lock);
 	ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
 			     DEFAULT_RATELIMIT_BURST);