Re: [PATCH 0/2] nilfs2: atime support

From: Viacheslav Dubeyko

Date: Tue Nov 17 2026 - 13:20:54 EST


On Tue, 2026-11-17 at 15:47 +0900, Ryusuke Konishi wrote:
> 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/20260219204343.70117-1-slava@xxxxxxxxxxx
> [2]
> https://lore.kernel.org/all/tencent_E3847A19056D4E914FACD269A3C77BAF0905@xxxxxx
> [3]
> https://lore.kernel.org/all/tencent_F3CAF2061A8AE294D88513588FD3DE1F4806@xxxxxx
> [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(-)

Applied.

Thanks,
Slava.