FAILED: patch "[PATCH] xfs: use deferred intent items for reaping crosslinked blocks" failed to apply to 6.6-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x cd32a0c0dcdf634f2e0e71f41c272e19dece6264
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025101603-baggage-humming-330b@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From cd32a0c0dcdf634f2e0e71f41c272e19dece6264 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <[email protected]>
Date: Tue, 8 Apr 2025 16:14:32 -0700
Subject: [PATCH] xfs: use deferred intent items for reaping crosslinked blocks
When we're removing rmap records for crosslinked blocks, use deferred intent items so that we can try to free/unmap as many of the old data structure's blocks as we can in the same transaction as the commit.
fs/xfs/scrub/reap.c +5 -4
@@ -416,8 +416,6 @@ xreap_agextent_iter(trace_xreap_dispose_unmap_extent (pag_group (sc->sa.pag), agbno, *aglenp); - rs->force_roll = true; -if (rs->oinfo == &XFS_RMAP_OINFO_COW ) {/* * If we're unmapping CoW staging extents, remove the
@@ -426,11 +424,14 @@ xreap_agextent_iter(*/ xfs_refcount_free_cow_extent (sc->tp, false, fsbno, *aglenp); + rs->force_roll = true;return 0 ; } -return xfs_rmap_free (sc->tp, sc->sa.agf_bp, sc->sa.pag, agbno, - *aglenp, rs->oinfo); +xfs_rmap_free_extent (sc->tp, false, fsbno, *aglenp, + rs->oinfo->oi_owner); + rs->deferred++; +return 0 ; }trace_xreap_dispose_free_extent (pag_group (sc->sa.pag), agbno, *aglenp);
Sasha Levin
maintainerPATCH 1/1 xfs: use deferred intent items for reaping crosslinked blocks
From: "Darrick J. Wong" <[email protected]>
[ Upstream commit cd32a0c0dcdf634f2e0e71f41c272e19dece6264 ]
When we're removing rmap records for crosslinked blocks, use deferred intent items so that we can try to free/unmap as many of the old data structure's blocks as we can in the same transaction as the commit.
--- fs/xfs/scrub/reap.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
fs/xfs/scrub/reap.c +16 -3
@@ -20,6 +20,7 @@#include "xfs_ialloc_btree.h" #include "xfs_rmap.h" #include "xfs_rmap_btree.h" +#include "xfs_refcount.h" #include "xfs_refcount_btree.h" #include "xfs_extent_busy.h" #include "xfs_ag.h"
@@ -376,9 +377,21 @@ xreap_agextent_iter(if (crosslinked) {trace_xreap_dispose_unmap_extent (sc->sa.pag, agbno, *aglenp); - rs->force_roll = true; -return xfs_rmap_free (sc->tp, sc->sa.agf_bp, sc->sa.pag, agbno, - *aglenp, rs->oinfo); +if (rs->oinfo == &XFS_RMAP_OINFO_COW ) { +/* +* If we're unmapping CoW staging extents, remove the +* records from the refcountbt, which will remove the +* rmap record as well. +*/ +xfs_refcount_free_cow_extent (sc->tp, fsbno, *aglenp); + rs->force_roll = true; +return 0 ; + } + +xfs_rmap_free_extent (sc->tp, sc->sa.pag->pag_agno, agbno, + *aglenp, rs->oinfo->oi_owner); + rs->deferred++; +return 0 ; }trace_xreap_dispose_free_extent (sc->sa.pag, agbno, *aglenp);
Signature · 1 line
2.51.0