Re: [PATCH 14/14] xfs: enable non-blocking timestamp updates

Christoph Hellwig
2025-11-14T15:30:42Z

On Fri, Nov 14, 2025 at 07:26:17AM +0100, Christoph Hellwig wrote:
> The lazytime path using generic_update_time can never block in XFS
> because there is no ->dirty_inode method that could block. Allow
> non-blocking timestamp updates for this case.

As the report noted, it turns out my rebase lost the most important
thing here, which is to not reject S_NOWAIT for the lazytime path.
The incremental patch is below. I'll resend on Monday, and officially
declare that Friday the 14th is the new Friday the 13th.

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 3d7b89ffacde..35dbabf1e111 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1196,9 +1196,13 @@ xfs_vn_update_time(
trace_xfs_update_time(ip);

if (inode->i_sb->s_flags & SB_LAZYTIME) {
- if (!((flags & S_VERSION) &&
- inode_maybe_inc_iversion(inode, false)))
- return generic_update_time(inode, flags);
+ int updated = inode_update_timestamps(inode, flags);
+
+ if (!(updated & S_VERSION)) {
+ if (updated)
+ mark_inode_dirty_time(inode, updated);
+ return 0;
+ }

/* Capture the iversion update that just occurred */
log_flags |= XFS_ILOG_CORE;