From: "Darrick J. Wong" <djwong@kernel.org>
To: Yingjie Gao <gaoyingjie@uniontech.com>
Cc: linux-xfs@vger.kernel.org, cem@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] xfs: fix rtgroup cleanup in CoW fork repair
Date: Wed, 27 May 2026 21:45:26 -0700 [thread overview]
Message-ID: <20260528044526.GB6078@frogsfrogsfrogs> (raw)
In-Reply-To: <20260527043134.1550710-3-gaoyingjie@uniontech.com>
On Wed, May 27, 2026 at 12:31:34PM +0800, Yingjie Gao wrote:
> xrep_cow_find_bad_rt() initializes scrub rtgroup state before the
> force-rebuild path calls xrep_cow_mark_file_range(). If that call
> fails, the code jumps directly to out_rtg, which skips the scrub
> rtgroup cleanup and only drops the local rtgroup reference.
>
> Remove the unnecessary jump so the function falls through to out_sr,
> ensuring the realtime cursors, lock state, and sr->rtg reference are
> released before returning.
Cc: <stable@vger.kernel.org> # v6.14
> Fixes: fd97fe111208 ("xfs: fix CoW forks for realtime files")
> Signed-off-by: Yingjie Gao <gaoyingjie@uniontech.com>
With the cc tag, this looks good to me
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/xfs/scrub/cow_repair.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/xfs/scrub/cow_repair.c b/fs/xfs/scrub/cow_repair.c
> index a6ff09ace43d..c25716fc4fee 100644
> --- a/fs/xfs/scrub/cow_repair.c
> +++ b/fs/xfs/scrub/cow_repair.c
> @@ -382,12 +382,9 @@ xrep_cow_find_bad_rt(
> * CoW fork and then scan for staging extents in the refcountbt.
> */
> if ((sc->sm->sm_flags & XFS_SCRUB_IFLAG_FORCE_REBUILD) ||
> - XFS_TEST_ERROR(sc->mp, XFS_ERRTAG_FORCE_SCRUB_REPAIR)) {
> + XFS_TEST_ERROR(sc->mp, XFS_ERRTAG_FORCE_SCRUB_REPAIR))
> error = xrep_cow_mark_file_range(xc, xc->irec.br_startblock,
> xc->irec.br_blockcount);
> - if (error)
> - goto out_rtg;
> - }
>
> out_sr:
> xchk_rtgroup_btcur_free(&sc->sr);
> --
> 2.20.1
>
>
next prev parent reply other threads:[~2026-05-28 4:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 12:32 [PATCH 0/2] xfs: fix CoW fork repair error handling Yingjie Gao
2026-05-26 12:32 ` [PATCH 1/2] xfs: fix error returns in CoW fork repair Yingjie Gao
2026-05-26 14:52 ` Carlos Maiolino
2026-05-26 12:32 ` [PATCH 2/2] xfs: fix rtgroup cleanup " Yingjie Gao
2026-05-26 14:53 ` Carlos Maiolino
2026-05-26 14:51 ` [PATCH 0/2] xfs: fix CoW fork repair error handling Carlos Maiolino
2026-05-27 3:38 ` Yingjie Gao
2026-05-27 3:39 ` [PATCH v2 " Yingjie Gao
2026-05-27 3:39 ` [PATCH v2 1/2] xfs: fix error returns in CoW fork repair Yingjie Gao
2026-05-27 3:39 ` [PATCH v2 2/2] xfs: fix rtgroup cleanup " Yingjie Gao
2026-05-27 4:31 ` [PATCH v3 0/2] xfs: fix CoW fork repair error handling Yingjie Gao
2026-05-27 4:31 ` [PATCH v3 1/2] xfs: fix error returns in CoW fork repair Yingjie Gao
2026-05-28 4:44 ` Darrick J. Wong
2026-05-28 8:08 ` Carlos Maiolino
2026-05-27 4:31 ` [PATCH v3 2/2] xfs: fix rtgroup cleanup " Yingjie Gao
2026-05-28 4:45 ` Darrick J. Wong [this message]
2026-05-30 6:40 ` [PATCH v3 0/2] xfs: fix CoW fork repair error handling Carlos Maiolino
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=20260528044526.GB6078@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=gaoyingjie@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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