Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, cem@kernel.org, hch@lst.de
Cc: stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 1/6] xfs: set xfarray killable sort correctly
Date: Mon, 13 Jul 2026 23:06:12 -0700	[thread overview]
Message-ID: <178400716837.268162.4871292933498780753.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <178400716782.268162.4846177784022689546.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

LOLLM noticed that we *disable* interruptible sorts when the KILLABLE
flag is set.  This is backwards.  Fix the incorrect logic, and rename
the variable to make the connection more obvious.

Cc: <stable@vger.kernel.org> # v6.10
Fixes: 271557de7cbfde ("xfs: reduce the rate of cond_resched calls inside scrub")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
---
 fs/xfs/scrub/scrub.h   |    6 +++---
 fs/xfs/scrub/xfarray.c |    3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)


diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h
index a3f1abc9139035..6d7d3523b71f25 100644
--- a/fs/xfs/scrub/scrub.h
+++ b/fs/xfs/scrub/scrub.h
@@ -11,7 +11,7 @@ struct xfs_scrub;
 struct xchk_relax {
 	unsigned long	next_resched;
 	unsigned int	resched_nr;
-	bool		interruptible;
+	bool		killable;
 };
 
 /* Yield to the scheduler at most 10x per second. */
@@ -21,7 +21,7 @@ struct xchk_relax {
 	(struct xchk_relax){ \
 		.next_resched	= XCHK_RELAX_NEXT, \
 		.resched_nr	= 0, \
-		.interruptible	= true, \
+		.killable	= true, \
 	}
 
 /*
@@ -45,7 +45,7 @@ static inline int xchk_maybe_relax(struct xchk_relax *widget)
 		widget->next_resched = XCHK_RELAX_NEXT;
 	}
 
-	if (widget->interruptible && fatal_signal_pending(current))
+	if (widget->killable && fatal_signal_pending(current))
 		return -EINTR;
 
 	return 0;
diff --git a/fs/xfs/scrub/xfarray.c b/fs/xfs/scrub/xfarray.c
index c7c4a71b6fa7c6..2ce24bfe4c0fab 100644
--- a/fs/xfs/scrub/xfarray.c
+++ b/fs/xfs/scrub/xfarray.c
@@ -487,8 +487,7 @@ xfarray_sortinfo_alloc(
 	xfarray_sortinfo_lo(si)[0] = 0;
 	xfarray_sortinfo_hi(si)[0] = array->nr - 1;
 	si->relax = INIT_XCHK_RELAX;
-	if (flags & XFARRAY_SORT_KILLABLE)
-		si->relax.interruptible = false;
+	si->relax.killable = !!(flags & XFARRAY_SORT_KILLABLE);
 
 	trace_xfarray_sort(si, nr_bytes);
 	*infop = si;


  reply	other threads:[~2026-07-14  6:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  6:04 [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 2 Darrick J. Wong
2026-07-14  6:06 ` Darrick J. Wong [this message]
2026-07-14  6:11   ` [PATCH 1/6] xfs: set xfarray killable sort correctly Christoph Hellwig
2026-07-14 16:42     ` Darrick J. Wong
2026-07-14  6:06 ` [PATCH 2/6] xfs: fix off-by-one error when calling xchk_xref_has_rt_owner Darrick J. Wong
2026-07-14  6:12   ` Christoph Hellwig
2026-07-14  6:06 ` [PATCH 3/6] xfs: handle non-inode owners for rtrmap record checking Darrick J. Wong
2026-07-14  6:14   ` Christoph Hellwig
2026-07-14 16:32     ` Darrick J. Wong
2026-07-14  6:06 ` [PATCH 4/6] xfs: fully check the parent handle when it points to the rootdir Darrick J. Wong
2026-07-14  6:14   ` Christoph Hellwig
2026-07-14  6:07 ` [PATCH 5/6] xfs: clamp timestamp nanoseconds correctly Darrick J. Wong
2026-07-14  6:15   ` Christoph Hellwig
2026-07-14 16:34     ` Darrick J. Wong
2026-07-14  6:07 ` [PATCH 6/6] xfs: don't zap bmbt forks if they are MAXLEVELS tall Darrick J. Wong
2026-07-14  6:16   ` Christoph Hellwig
2026-07-14 16:40     ` Darrick J. Wong
2026-07-20  8:57 ` [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 2 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=178400716837.268162.4871292933498780753.stgit@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