From: "Darrick J. Wong" <djwong@kernel.org>
To: hch@lst.de, djwong@kernel.org, cem@kernel.org
Cc: stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 1/6] xfs: fix unit conversions in per_binval computation
Date: Wed, 12 Aug 2026 22:24:07 -0700 [thread overview]
Message-ID: <178659861484.833642.4783547308799219818.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <178659861428.833642.7987162774335580459.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
LOLLM noticed that we're doing the unit conversion in the per_binval
computation backwards -- xfs_buf_inval_log_space's second parameter is
supposed to be in bytes, but max_binval is in units of fsblocks. Hence
the conversion should be FSB -> B, not the other way around.
Cc: <stable@vger.kernel.org> # v6.18
Fixes: b2311ec6778fcd ("xfs: compute per-AG extent reap limits dynamically")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/scrub/reap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/scrub/reap.c b/fs/xfs/scrub/reap.c
index fcd14c1703ea04..496c6eab555e91 100644
--- a/fs/xfs/scrub/reap.c
+++ b/fs/xfs/scrub/reap.c
@@ -601,7 +601,7 @@ xreap_configure_agextent_limits(
/* Maximum overhead of invalidating one buffer. */
const unsigned int per_binval =
- xfs_buf_inval_log_space(1, XFS_B_TO_FSBT(mp, max_binval));
+ xfs_buf_inval_log_space(1, XFS_FSB_TO_B(mp, max_binval));
/*
* For each transaction in a reap chain, we can delete some number of
@@ -680,7 +680,7 @@ xreap_configure_agcow_limits(
/* Overhead of invalidating one buffer */
const unsigned int per_binval =
- xfs_buf_inval_log_space(1, XFS_B_TO_FSBT(mp, max_binval));
+ xfs_buf_inval_log_space(1, XFS_FSB_TO_B(mp, max_binval));
/*
* For each transaction in a reap chain, we can delete some number of
next prev parent reply other threads:[~2026-08-13 5:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 5:23 [PATCHSET v2 1/2] xfs: LLM-inspired bug fixes, part 5 Darrick J. Wong
2026-08-13 5:24 ` Darrick J. Wong [this message]
2026-08-13 5:24 ` [PATCH 2/6] xfs: fix short ifork reaping computation in xreap_bmapi_binval Darrick J. Wong
2026-08-13 5:24 ` [PATCH 3/6] xfs: fix name string recording in slowpath pptr tracepoints Darrick J. Wong
2026-08-13 5:24 ` [PATCH 4/6] xfs: don't leak dqacct if rhashtable insertion fails Darrick J. Wong
2026-08-13 5:25 ` [PATCH 5/6] xfs: fix the rtrmap and rtrefcount _maxlevels_ondisk functions Darrick J. Wong
2026-08-13 5:25 ` [PATCH 6/6] xfs: adjust datadev sector count to reflect internal rt volumes Darrick J. Wong
2026-08-19 6:33 ` Christoph Hellwig
2026-08-19 6:36 ` Christoph Hellwig
2026-08-19 23:08 ` Darrick J. Wong
2026-08-24 4:47 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2026-07-30 5:26 [PATCHSET] xfs: LLM-inspired bug fixes, part 5 Darrick J. Wong
2026-07-30 5:26 ` [PATCH 1/6] xfs: fix unit conversions in per_binval computation Darrick J. Wong
2026-07-30 8:18 ` Christoph Hellwig
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=178659861484.833642.4783547308799219818.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