Skip to content

nilfs2: atime support

Ryusuke Konishi linux-nilfs lkml 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2nilfs2: add atime compat_ro featurefs/nilfs2/super.c fs/nilfs2/the_nilfs.h include/uapi/linux/nilfs2_ondisk.h+12 -10 replies
2/2nilfs2: introduce atime supportfs/nilfs2/Kconfig fs/nilfs2/inode.c fs/nilfs2/nilfs.h +3 more+17 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] nilfs2: atime support

Hi Viacheslav,

Please queue the following two patches for persistent atime support in nilfs2 for the next merge window.

This series builds upon your original patch [1], which Wang Jianjian followed up on to address review comments and add compat_ro feature flag support [2][3]. I have made minor modifications to those patches, including filling in missing kernel-doc comments and adjusting the commit messages (such as fixing the Co-developed-by tags).

To use this feature, install the updated nilfs-utils from the 'atime-support' branch of the development repository [4] (which will be merged into the master branch once this patchset is queued), and either format a new filesystem with the atime feature enabled:

  $ sudo mkfs -t nilfs2 -O atime /dev/<device>

or enable the feature flag on an existing filesystem image using nilfs-tune:

  $ sudo nilfs-tune -O atime /dev/<device>

Once the atime feature flag is set, the filesystem can only be mounted read-only on currently deployed kernels that lack support for it (until the flag is cleared with "nilfs-tune -O ^atime /dev/<device>"). To avoid confusing users, this feature will remain optional in mkfs.nilfs2 for the time being, though I plan to enable it by default in a future release of nilfs-utils.

Note that when enabling the feature on an existing filesystem, inodes written by older mkfs or kernels have their on-disk atime fields initialized to 0, which will expose the epoch date (1970-01-01). nilfs-tune warns about this when setting the flag, and image conversion (such as copying mtime to atime) is not supported.

The series consists of two patches:

- Patch 1/2 introduces the read-only compat feature flag (NILFS_FEATURE_COMPAT_RO_ATIME) to manage on-disk format compatibility for atime support.
- Patch 2/2 reads atime from on-disk inodes when the compat_ro flag is enabled and stops unconditionally setting SB_NOATIME on the superblock, switching VFS behavior accordingly.

[1] https://lore.kernel.org/all/[email protected]
[2] https://lore.kernel.org/all/[email protected]
[3] https://lore.kernel.org/all/[email protected]
[4] https://github.com/nilfs-dev/nilfs-utils.git

Thanks,
Ryusuke Konishi

Viacheslav Dubeyko (1):
nilfs2: introduce atime support

Wang Jianjian (1):
nilfs2: add atime compat_ro feature

 fs/nilfs2/Kconfig                  |  2 +-
 fs/nilfs2/inode.c                  | 11 +++++++++--
 fs/nilfs2/nilfs.h                  |  4 ----
 fs/nilfs2/segment.c                |  2 --
 fs/nilfs2/super.c                  | 11 ++++++-----
 fs/nilfs2/the_nilfs.h              |  6 ++++++
 include/uapi/linux/nilfs2_ondisk.h | 12 +++++++-----
 7 files changed, 29 insertions(+), 19 deletions(-)
Signature · 1 line
2.53.0