Re: [PATCH v4] btrfs: retry verity reads for not-uptodate Merkle folios
From: David Sterba
Date: Mon Aug 17 2026 - 11:59:34 EST
On Mon, Aug 17, 2026 at 04:05:08AM +0100, Matthew Wilcox wrote:
> On Wed, Jul 22, 2026 at 10:54:35AM +0800, Yichong Chen wrote:
> > btrfs_read_merkle_tree_page() can find a folio in the mapping that is not
> > uptodate. After taking the folio lock, the current code treats that state
> > as a read error and returns -EIO.
> >
> > That can make a previous transient read failure sticky. If the failed read
> > left a not-uptodate folio in the mapping, later callers find that folio and
> > fail instead of retrying the read.
> >
> > Keep the existing page-cache insertion and locking order, but retry the
> > Merkle item read when a not-uptodate folio is found in the mapping. Also
> > unlock the folio when read_key_bytes() fails so that a later caller can
> > lock it and retry the read.
> >
> > Fixes: 06ed09351b67 ("btrfs: convert btrfs_read_merkle_tree_page() to use a folio")
>
> I object to this Fixes line. I didn't introduce this problem; it was
> already there before 06ed09351b67.
You're right, however we need to keep the patch as-is because that would
require a rebase and delay sending the main 7.3 pull request, it's below
22 patches.