[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220822083324.q7qcxtkfji66ho4l@quack3>
Date: Mon, 22 Aug 2022 10:33:24 +0200
From: Jan Kara <jack@...e.cz>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jan Kara <jack@...e.cz>, Eric Biggers <ebiggers@...nel.org>,
Lukas Czerner <lczerner@...hat.com>,
linux-ext4@...r.kernel.org, tytso@....edu, jlayton@...nel.org,
linux-fsdevel@...r.kernel.org, david@...morbit.com
Subject: Re: [PATCH v3 2/3] fs: record I_DIRTY_TIME even if inode already has
I_DIRTY_INODE
On Sat 20-08-22 23:14:37, Christoph Hellwig wrote:
> On Tue, Aug 16, 2022 at 01:21:24PM +0200, Jan Kara wrote:
> > 2) I_DIRTY_TIME flag passed to ->dirty_inode() callback. This is admittedly
> > bit of a hack. Currently XFS relies on the fact that the only time its
> > ->dirty_inode() callback needs to do anything is when VFS decides it is
> > time to writeback timestamps and XFS detects this situation by checking for
> > I_DIRTY_TIME in inode->i_state. Now to fix the race, we need to first clear
> > I_DIRTY_TIME in inode->i_state and only then call the ->dirty_inode()
> > callback (otherwise timestamp update can get lost). So the solution I've
> > suggested was to propagate the information "timestamp update needed" to XFS
> > through I_DIRTY_TIME in flags passed to ->dirty_inode().
>
> Maybe we should just add a separate update_lazy_time method to make this
> a little more clear?
Yes, we could do that if people prefer this. Although I'd say that good
documentation at the place in __mark_inode_dirty() where this gets used and
in documentation of .dirty_inode might clear the confusion as well.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists