diff --git a/man/man7/zfsprops.7 b/man/man7/zfsprops.7 index 0e656fee8..8fff09a19 100644 --- a/man/man7/zfsprops.7 +++ b/man/man7/zfsprops.7 @@ -1545,7 +1545,7 @@ Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours. The default value is -.Sy off . +.Sy on . The values .Sy on and diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index 2a58088a7..0e91304ec 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -465,7 +465,7 @@ 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, sfeatures); - zprop_register_index(ZFS_PROP_RELATIME, "relatime", 0, PROP_INHERIT, + zprop_register_index(ZFS_PROP_RELATIME, "relatime", 1, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "on | off", "RELATIME", boolean_table, sfeatures); zprop_register_index(ZFS_PROP_DEVICES, "devices", 1, PROP_INHERIT, diff --git a/tests/zfs-tests/tests/functional/atime/atime_001_pos.ksh b/tests/zfs-tests/tests/functional/atime/atime_001_pos.ksh index 136bb6b11..9006afbee 100755 --- a/tests/zfs-tests/tests/functional/atime/atime_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/atime/atime_001_pos.ksh @@ -62,11 +62,9 @@ do mtpt=$(snapshot_mountpoint $dst) log_mustnot check_atime_updated $mtpt/$TESTFILE else - if is_linux; then - log_must zfs set relatime=off $dst - fi - log_must zfs set atime=on $dst + log_must zfs set relatime=off $dst + log_must check_atime_updated $mtpt/$TESTFILE log_must check_atime_updated $mtpt/$TESTFILE fi diff --git a/tests/zfs-tests/tests/functional/atime/atime_003_pos.ksh b/tests/zfs-tests/tests/functional/atime/atime_003_pos.ksh index f5c1044dc..28d973c71 100755 --- a/tests/zfs-tests/tests/functional/atime/atime_003_pos.ksh +++ b/tests/zfs-tests/tests/functional/atime/atime_003_pos.ksh @@ -62,6 +62,7 @@ do else log_must zfs set atime=on $dst log_must zfs set relatime=on $dst + log_must check_atime_updated $mtpt/$TESTFILE log_mustnot check_atime_updated $mtpt/$TESTFILE fi diff --git a/tests/zfs-tests/tests/functional/atime/root_atime_on.ksh b/tests/zfs-tests/tests/functional/atime/root_atime_on.ksh index 1e3b543a6..3b6a0d900 100755 --- a/tests/zfs-tests/tests/functional/atime/root_atime_on.ksh +++ b/tests/zfs-tests/tests/functional/atime/root_atime_on.ksh @@ -65,11 +65,10 @@ do mtpt=$(snapshot_mountpoint $dst) log_mustnot check_atime_updated $mtpt/$TESTFILE else - if is_linux; then - log_must zfs set relatime=off $(dirname $dst) - fi - log_must zfs set atime=on $(dirname $dst) + # inherited relatime won't apply because of mount option, set explicitly + log_must zfs set relatime=off $dst + log_must check_atime_updated $mtpt/$TESTFILE log_must check_atime_updated $mtpt/$TESTFILE fi diff --git a/tests/zfs-tests/tests/functional/atime/root_relatime_on.ksh b/tests/zfs-tests/tests/functional/atime/root_relatime_on.ksh index 36dbaaee7..062325938 100755 --- a/tests/zfs-tests/tests/functional/atime/root_relatime_on.ksh +++ b/tests/zfs-tests/tests/functional/atime/root_relatime_on.ksh @@ -68,6 +68,7 @@ do else log_must zfs set atime=on $(dirname $dst) log_must zfs set relatime=on $(dirname $dst) + log_must check_atime_updated $mtpt/$TESTFILE log_mustnot check_atime_updated $mtpt/$TESTFILE fi diff --git a/tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh b/tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh index be250158b..74caa12a9 100755 --- a/tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh +++ b/tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh @@ -33,7 +33,7 @@ # for 10 sec. # 4. Verify that l2arc_write_max is set back to the default. # 5. Set l2arc_write_max to a value less than the cache device size but -# larger than the default (64MB). +# larger than the default (256MB). # 6. Record the l2_size. # 7. Random read for 1 sec. # 8. Record the l2_size again. @@ -87,6 +87,9 @@ log_must truncate -s $VDEV_SZ $VDEV log_must zpool create -f $TESTPOOL $VDEV cache $VCACHE +# Actually, this test relies on atime writes to force the L2 ARC discards +log_must zfs set relatime=off $TESTPOOL + log_must fio $FIO_SCRIPTS/mkfiles.fio log_must fio $FIO_SCRIPTS/random_reads.fio @@ -94,7 +97,7 @@ typeset write_max2=$(get_tunable L2ARC_WRITE_MAX) log_must test $write_max2 -eq $write_max -log_must set_tunable32 L2ARC_WRITE_MAX $(( 64 * 1024 * 1024 )) +log_must set_tunable32 L2ARC_WRITE_MAX $(( 256 * 1024 * 1024 )) export RUNTIME=1 typeset do_once=true