From: Darrick J. Wong <djwong@xxxxxxxxxx> fuse+iomap leaves the kernel completely in charge of handling timestamps. Add the lazytime and strictatime mount options so that fuse+iomap filesystems can take advantage of those options. Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> --- lib/mount.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/mount.c b/lib/mount.c index 2eb967399c9606..3d021428a2ecfc 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -116,9 +116,16 @@ static const struct fuse_opt fuse_mount_opts[] = { FUSE_OPT_KEY("dirsync", KEY_KERN_FLAG), FUSE_OPT_KEY("noatime", KEY_KERN_FLAG), FUSE_OPT_KEY("nodiratime", KEY_KERN_FLAG), - FUSE_OPT_KEY("nostrictatime", KEY_KERN_FLAG), FUSE_OPT_KEY("symfollow", KEY_KERN_FLAG), FUSE_OPT_KEY("nosymfollow", KEY_KERN_FLAG), +#ifdef MS_LAZYTIME + FUSE_OPT_KEY("lazytime", KEY_KERN_FLAG), + FUSE_OPT_KEY("nolazytime", KEY_KERN_FLAG), +#endif +#ifdef MS_STRICTATIME + FUSE_OPT_KEY("strictatime", KEY_KERN_FLAG), + FUSE_OPT_KEY("nostrictatime", KEY_KERN_FLAG), +#endif FUSE_OPT_END }; @@ -189,11 +196,18 @@ static const struct mount_flags mount_flags[] = { {"noatime", MS_NOATIME, 1}, {"nodiratime", MS_NODIRATIME, 1}, {"norelatime", MS_RELATIME, 0}, - {"nostrictatime", MS_STRICTATIME, 0}, {"symfollow", MS_NOSYMFOLLOW, 0}, {"nosymfollow", MS_NOSYMFOLLOW, 1}, #ifndef __NetBSD__ {"dirsync", MS_DIRSYNC, 1}, +#endif +#ifdef MS_LAZYTIME + {"lazytime", MS_LAZYTIME, 1}, + {"nolazytime", MS_LAZYTIME, 0}, +#endif +#ifdef MS_STRICTATIME + {"strictatime", MS_STRICTATIME, 1}, + {"nostrictatime", MS_STRICTATIME, 0}, #endif {NULL, 0, 0} };