Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relatime: set on by default #13614

Merged
merged 2 commits into from
Aug 12, 2022
Merged

Relatime: set on by default #13614

merged 2 commits into from
Aug 12, 2022

Conversation

gmelikov
Copy link
Member

@gmelikov gmelikov commented Jul 1, 2022

Motivation and Context

Linux sets relatime on mount by default
for any file system torvalds/linux@0a1c01c ,
but relatime=off in ZFS disables it explicitly
(because best-practice is to mount datasets via ZFS itself).

Let's be on par with other file systems on Linux
(and it's our largest target OS too).

Looks like it won't hurt FreeBSD, but it would be great to validate me here.

Additional motivation - we already have some changed defaults for next release
(compression, volblocksize), so it would be great to have one more property be optimal by default too.

How Has This Been Tested?

On linux, manual pool creation, recheck atime of file after read.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@gmelikov
Copy link
Member Author

gmelikov commented Jul 1, 2022

FreeBSD build failure looks unrelated at first glance

/var/lib/buildbot/slaves/zfs/FreeBSD_stable_13_amd64__TEST_/build/zfs/module/os/freebsd/zfs/zfs_acl.c:1681:12: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                domain =
                               ```

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jul 1, 2022
@ghost
Copy link

ghost commented Jul 1, 2022

I think I saw a commit to fix that go in recently.

@gmelikov
Copy link
Member Author

gmelikov commented Jul 1, 2022

@freqlabs thank you, looks like it's the latest one in master, rebased.

Besides, at least functional tests are pretty flaky with this change, I'll look at fresh run and try to reproduce them.

@behlendorf
Copy link
Contributor

The cache/cache_012_pos failure looks like it was somehow introduced by this change. The other failures we've seen before.

Linux set's relatime on mount by default
for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be on par with other file systems on Linux
(and it's our largest target OS too).

Signed-off-by: George Melikov <mail@gmelikov.ru>
This test relies on atime writes to force the L2 ARC discards.
In addition, speed it up nearly twice with larger l2arc_write_max.

Signed-off-by: George Melikov <mail@gmelikov.ru>
@gmelikov
Copy link
Member Author

@behlendorf done, looks like zloop fails on same problem as is on master

dsl_dataset_feature_is_active(ds, f) == B_TRUE (0x0 == 0x1)
ASSERT at module/zfs/dsl_scan.c:2024:dsl_scan_visitbp()/lib/x86_64-linux-gnu/libasan.so.5(+0x6cd40)[0x7fd6abc42d40]

same here https://github.com/openzfs/zfs/actions/runs/2831422281 , so looks not related, but strangely stable to reproduce.

@behlendorf
Copy link
Contributor

Looks good. Unfortunately, it looks like a couple small bugs have been introduced in other changes which ztest is now hitting quite often. That needs to be investigated, but you're right it's entirely unrelated to this change.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 11, 2022
@behlendorf behlendorf merged commit fbc210f into openzfs:master Aug 12, 2022
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 13, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
beren12 pushed a commit to beren12/zfs that referenced this pull request Sep 19, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 23, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 27, 2022
Linux sets relatime on mount by default for any file system,
but relatime=off in ZFS disables it explicitly.

Let's be consistent with other file systems on Linux.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes openzfs#13614
@gmelikov gmelikov deleted the relatime branch January 14, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants