[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251119072941.GA22368@lst.de>
Date: Wed, 19 Nov 2025 08:29:41 +0100
From: Christoph Hellwig <hch@....de>
To: Dave Chinner <david@...morbit.com>
Cc: Christoph Hellwig <hch@....de>, Christian Brauner <brauner@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>, David Sterba <dsterba@...e.com>,
Jan Kara <jack@...e.cz>, Mike Marshall <hubcap@...ibond.com>,
Martin Brandenburg <martin@...ibond.com>,
Carlos Maiolino <cem@...nel.org>, Stefan Roesch <shr@...com>,
Jeff Layton <jlayton@...nel.org>, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, gfs2@...ts.linux.dev,
io-uring@...r.kernel.org, devel@...ts.orangefs.org,
linux-unionfs@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-xfs@...r.kernel.org, linux-nfs@...r.kernel.org
Subject: Re: [PATCH 14/14] xfs: enable non-blocking timestamp updates
On Sun, Nov 16, 2025 at 07:23:11PM +1100, Dave Chinner wrote:
> 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.
> >
> > Fixes: 66fa3cedf16a ("fs: Add async write file modification handling.")
> > Signed-off-by: Christoph Hellwig <hch@....de>
> > ---
> > fs/xfs/xfs_iops.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> > index bd0b7e81f6ab..3d7b89ffacde 100644
> > --- a/fs/xfs/xfs_iops.c
> > +++ b/fs/xfs/xfs_iops.c
> > @@ -1195,9 +1195,6 @@ xfs_vn_update_time(
> >
> > trace_xfs_update_time(ip);
> >
> > - if (flags & S_NOWAIT)
> > - return -EAGAIN;
> > -
> > if (inode->i_sb->s_flags & SB_LAZYTIME) {
> > if (!((flags & S_VERSION) &&
> > inode_maybe_inc_iversion(inode, false)))
> > @@ -1207,6 +1204,9 @@ xfs_vn_update_time(
> > log_flags |= XFS_ILOG_CORE;
> > }
> >
> > + if (flags & S_NOWAIT)
> > + return -EAGAIN;
> > +
> > error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp);
> > if (error)
> > return error;
>
> Not sure this is correct - this can now bump iversion and then
> return -EAGAIN. That means S_VERSION likely won't be set on the
> retry, and we'll go straight through the non-blocking path to
> generic_update_time() and skip logging the iversion update....
Thanks.
I'll fix this by propagating S_NOWAIT to inode_update_timestamps.
Powered by blists - more mailing lists