Skip to contentSkip to conversation

FAILED: patch "[PATCH] xfs: don't rescan ifree and icount when frozen" failed to apply to 6.1-stable tree

PATCH [email protected] 1 participant 1 message Nov 4

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.1-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.1.y
git checkout FETCH_HEAD
git cherry-pick -x 18028768415e3c05ab7edb22d740e2f4dc52836a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026110443-freebie-pamphlet-583e@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 18028768415e3c05ab7edb22d740e2f4dc52836a Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <[email protected]>
Date: Mon, 12 Oct 2026 23:08:51 -0700
Subject: [PATCH] xfs: don't rescan ifree and icount when frozen

LOLLM points out that it's pointless to rescan the AGs if we've already frozen the filesystem because there won't be any more perturbations. Fix this to mark the scan incomplete and exit.

Fixes 75efa57d0bf5fc ("xfs: add online scrub for superblock counters")
Assisted-by LOLLM # finding obvious bugs
fs/xfs/scrub/fscounters.c +5 -0
index eb1a095a0fa9..5984fe13a973 100644
@@ -379,6 +379,11 @@ xchk_fscount_aggregate_agcounts(
 	 * to maintain ifree <= icount before giving up.
 	 */
 	if (fsc->ifree > fsc->icount) {
+		if (fsc->frozen) {
+			xchk_set_incomplete(sc);
+			return -EFSCORRUPTED;
+		}
+
 		if (tries--)
 			goto retry;
 		return -EDEADLOCK;