mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Make zfs mount according to relatime config in dataset
Also enable lazytime in mount.zfs Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4482
This commit is contained in:
committed by
Brian Behlendorf
parent
704cd0758a
commit
6760077194
@@ -365,6 +365,14 @@ zfs_add_options(zfs_handle_t *zhp, char *options, int len)
|
||||
|
||||
error = zfs_add_option(zhp, options, len,
|
||||
ZFS_PROP_ATIME, MNTOPT_ATIME, MNTOPT_NOATIME);
|
||||
/*
|
||||
* don't add relatime/strictatime when atime=off, otherwise strictatime
|
||||
* will force atime=on
|
||||
*/
|
||||
if (strstr(options, MNTOPT_NOATIME) == NULL) {
|
||||
error = zfs_add_option(zhp, options, len,
|
||||
ZFS_PROP_RELATIME, MNTOPT_RELATIME, MNTOPT_STRICTATIME);
|
||||
}
|
||||
error = error ? error : zfs_add_option(zhp, options, len,
|
||||
ZFS_PROP_DEVICES, MNTOPT_DEVICES, MNTOPT_NODEVICES);
|
||||
error = error ? error : zfs_add_option(zhp, options, len,
|
||||
|
||||
Reference in New Issue
Block a user