summaryrefslogtreecommitdiffstats
path: root/module/zcommon/zfs_prop.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2014-01-18 13:00:53 -0600
committerBrian Behlendorf <[email protected]>2014-01-29 15:50:44 -0800
commit6d111134c0d1eb9b179eb9fddf26a31d5d45ae22 (patch)
tree58b2ef03d95ddcc6721574651ea223e7150c1763 /module/zcommon/zfs_prop.c
parent2278381ce2a820afe76dd9650298858d7037a01b (diff)
Implement relatime.
Add the "relatime" property. When set to "on", a file's atime will only be updated if the existing atime at least a day old or if the existing ctime or mtime has been updated since the last access. This behavior is compatible with the Linux "relatime" mount option. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2064 Closes #1917
Diffstat (limited to 'module/zcommon/zfs_prop.c')
-rw-r--r--module/zcommon/zfs_prop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c
index 121b1eb57..dd456b59a 100644
--- a/module/zcommon/zfs_prop.c
+++ b/module/zcommon/zfs_prop.c
@@ -263,6 +263,8 @@ zfs_prop_init(void)
/* inherit index (boolean) properties */
zprop_register_index(ZFS_PROP_ATIME, "atime", 1, PROP_INHERIT,
ZFS_TYPE_FILESYSTEM, "on | off", "ATIME", boolean_table);
+ zprop_register_index(ZFS_PROP_RELATIME, "relatime", 0, PROP_INHERIT,
+ ZFS_TYPE_FILESYSTEM, "on | off", "RELATIME", boolean_table);
zprop_register_index(ZFS_PROP_DEVICES, "devices", 1, PROP_INHERIT,
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, "on | off", "DEVICES",
boolean_table);