[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230810160035.GD11352@frogsfrogsfrogs>
Date: Thu, 10 Aug 2023 09:00:35 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Matthew Wilcox <willy@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Namjae Jeon <linkinjeon@...nel.org>,
Sungjong Seo <sj1557.seo@...sung.com>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
ntfs3@...ts.linux.dev, linux-xfs@...r.kernel.org
Subject: Re: [PATCH 07/13] xfs: document the invalidate_bdev call in
invalidate_bdev
On Thu, Aug 10, 2023 at 05:52:25PM +0200, Christoph Hellwig wrote:
> On Thu, Aug 10, 2023 at 04:22:15PM +0100, Matthew Wilcox wrote:
> > > blkdev_issue_flush(mp->m_logdev_targp->bt_bdev);
> > > invalidate_bdev(mp->m_logdev_targp->bt_bdev);
> >
> > While I have no complaints with this as a commit message, it's just too
> > verbose for an inline comment, IMO. Something pithier and more generic
> > would seem appropriate. How about:
> >
> > /*
> > * Prevent userspace (eg blkid or xfs_db) from seeing stale data.
> > * XFS is not coherent with the bdev's page cache.
> > */
>
> Well, this completely misses the point. The point is that XFS should
> never have to invalidate the page cache because it's not using it,
> but it has to due to weird races. I tried to condese the message but
> I could not come up with a good one that's not losing information.
Agreed -- it took me a while to set up an arm64 box with just the right
debugging info to figure out why certain fstests were flaky. I do think
it's useful (despite my other reply to willy) to retain the defect
details for hard-to-reproduce errors, and the only way to do that
without encountering the dead url problem is to dump it in a huge
commit message or a comment.
(Too bad there's no way to have a commit whose code comments reference
the commit id of that commit to say "Hey, you need to read this commit
before you touch this line"...)
--D
Powered by blists - more mailing lists