summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2026-10-12 23:08:51 -0700
committerCarlos Maiolino <cem@kernel.org>2026-10-14 10:13:51 +0200
commit18028768415e3c05ab7edb22d740e2f4dc52836a (patch)
treefa9549b35b7aa373c48b28ad7a32a943ecc53d85
parentc9f98b0f4f70c8cfd617dc2886bf2fc0a36ab9da (diff)
downloadlinux-next-18028768415e3c05ab7edb22d740e2f4dc52836a.tar.gz
linux-next-18028768415e3c05ab7edb22d740e2f4dc52836a.zip
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. Cc: stable@vger.kernel.org # v5.2 Fixes: 75efa57d0bf5fc ("xfs: add online scrub for superblock counters") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--fs/xfs/scrub/fscounters.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/scrub/fscounters.c b/fs/xfs/scrub/fscounters.c
index eb1a095a0fa9..5984fe13a973 100644
--- a/fs/xfs/scrub/fscounters.c
+++ b/fs/xfs/scrub/fscounters.c
@@ -379,6 +379,11 @@ retry:
* 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;