From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: hch@lst.de, stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/6] xfs: bail out on bitmap errors in xrep_agfl_fill
Date: Fri, 4 Sep 2026 09:12:11 -0700 [thread overview]
Message-ID: <20260904161211.GB1933798@frogsfrogsfrogs> (raw)
In-Reply-To: <app1di2UlKdSwH8r@andromeda.toxiclabs.cc>
On Fri, Sep 04, 2026 at 09:38:59AM +0200, Carlos Maiolino wrote:
> On Thu, Sep 03, 2026 at 11:27:19PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > LOLLM also points out that the xagb_bitmap_set call in xrep_agfl_fill
> > can fail, but we don't check the result of xagb_bitmap_walk, so we
> > silently drop the error and proceed with inconsistent incore data.
> > That shouldn't be allowed.
>
> Looks good.
>
> >
> > While we're at it, fix leaking the used_extents bitmap if the disunion
> > operation fails.
>
> Smells this description belongs to the previous patch?
Yeah, that belongs in "xfs: snapshot old AGFL before rewriting it".
I'll move this sentence to there.
--D
> >
> > Cc: <stable@vger.kernel.org> # v6.6
> > Fixes: 014ad53732d2ba ("xfs: use per-AG bitmaps to reap unused AG metadata blocks during repair")
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > Assisted-by: LOLLM # finding obvious bugs
> > ---
> > fs/xfs/scrub/agheader_repair.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >
> > diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c
> > index 46c95354ca6438..a66b611588c47f 100644
> > --- a/fs/xfs/scrub/agheader_repair.c
> > +++ b/fs/xfs/scrub/agheader_repair.c
> > @@ -699,7 +699,9 @@ xrep_agfl_init_header(
> > */
> > xagb_bitmap_init(&af.used_extents);
> > af.agfl_bno = xfs_buf_to_agfl_bno(agfl_bp);
> > - xagb_bitmap_walk(agfl_extents, xrep_agfl_fill, &af);
> > + error = xagb_bitmap_walk(agfl_extents, xrep_agfl_fill, &af);
> > + if (error && error != -ECANCELED)
> > + goto err_undo;
> > error = xagb_bitmap_disunion(agfl_extents, &af.used_extents);
> > if (error)
> > goto err_undo;
> >
> >
>
next prev parent reply other threads:[~2026-09-04 16:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 6:25 [PATCHSET] xfs: LLM-inspired bug fixes, part 11 Darrick J. Wong
2026-09-04 6:26 ` [PATCH 1/6] xfs: snapshot scrub stats when rendering them Darrick J. Wong
2026-09-04 6:48 ` Carlos Maiolino
2026-09-07 5:58 ` Christoph Hellwig
2026-09-08 4:43 ` Darrick J. Wong
2026-09-04 6:26 ` [PATCH 2/6] xfs: report healthy filesystem events in scrub stats Darrick J. Wong
2026-09-04 6:48 ` Carlos Maiolino
2026-09-07 5:58 ` Christoph Hellwig
2026-09-04 6:26 ` [PATCH 3/6] xfs: report runtime failures in scrub Darrick J. Wong
2026-09-04 6:59 ` Carlos Maiolino
2026-09-07 5:59 ` Christoph Hellwig
2026-09-04 6:26 ` [PATCH 4/6] xfs: remove redundant function declaration Darrick J. Wong
2026-09-04 6:59 ` Carlos Maiolino
2026-09-07 5:59 ` Christoph Hellwig
2026-09-04 6:27 ` [PATCH 5/6] xfs: snapshot old AGFL before rewriting it Darrick J. Wong
2026-09-04 7:34 ` Carlos Maiolino
2026-09-07 6:01 ` Christoph Hellwig
2026-09-04 6:27 ` [PATCH 6/6] xfs: bail out on bitmap errors in xrep_agfl_fill Darrick J. Wong
2026-09-04 7:38 ` Carlos Maiolino
2026-09-04 16:12 ` Darrick J. Wong [this message]
2026-09-04 16:13 ` [PATCH v1.1 " Darrick J. Wong
2026-09-04 19:11 ` Carlos Maiolino
2026-09-07 6:01 ` Christoph Hellwig
2026-09-07 6:28 ` Carlos Maiolino
2026-09-07 6:34 ` Carlos Maiolino
-- strict thread matches above, loose matches on Subject: below --
2026-09-09 6:02 [PATCHSET 1/2] xfs: LLM-inspired bug fixes, part 11 Darrick J. Wong
2026-09-09 6:04 ` [PATCH 6/6] xfs: bail out on bitmap errors in xrep_agfl_fill Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260904161211.GB1933798@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox