From: "Darrick J. Wong" <djwong@kernel.org>
To: cem@kernel.org, hch@lst.de
Cc: stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH v1.1 3/5] xfs: compute dquot checksum after resetting dd_lsn in repair
Date: Wed, 2 Sep 2026 22:49:52 -0700 [thread overview]
Message-ID: <20260903054952.GV1933798@frogsfrogsfrogs> (raw)
In-Reply-To: <178832750773.3508131.8667220003399042973.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
LOLLM complains that xrep_quota_block updates dd_lsn after calculating
the crc of the ondisk dquot. That's clearly broken, so fix that.
Cc: <stable@vger.kernel.org> # v6.8
Fixes: a5b91555403e3a ("xfs: repair quotas")
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/quota_repair.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/scrub/quota_repair.c b/fs/xfs/scrub/quota_repair.c
index ca3ac6728339d1..5c22bb6ccffa4e 100644
--- a/fs/xfs/scrub/quota_repair.c
+++ b/fs/xfs/scrub/quota_repair.c
@@ -363,11 +363,18 @@ xrep_quota_block(
ddq->d_rtbcount, &ddq->d_rtbtimer,
defq->rtb.time);
+ /*
+ * This transaction operates on raw disk buffers, so we don't
+ * have a dquot log item to assign the LSN for us. Instead,
+ * set it to zero so that log recovery will always replay any
+ * logged dquot item atop this buffer.
+ */
+ dqblk->dd_lsn = 0;
+
/* We only support v5 filesystems so always set these. */
uuid_copy(&dqblk->dd_uuid, &sc->mp->m_sb.sb_meta_uuid);
xfs_update_cksum((char *)dqblk, sizeof(struct xfs_dqblk),
XFS_DQUOT_CRC_OFF);
- dqblk->dd_lsn = 0;
}
switch (dqtype) {
case XFS_DQTYPE_USER:
next prev parent reply other threads:[~2026-09-03 5:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 5:41 [PATCHSET 5/5] xfs: LLM-inspired bug fixes, part 9 Darrick J. Wong
2026-09-02 5:48 ` [PATCH 1/5] xfs: signal inode btree xref error if get_rec returns an error Darrick J. Wong
2026-09-02 7:21 ` Christoph Hellwig
2026-09-02 5:49 ` [PATCH 2/5] xfs: truncate quota file correctly when repairing quota file Darrick J. Wong
2026-09-02 7:22 ` Christoph Hellwig
2026-09-02 5:49 ` [PATCH 3/5] xfs: compute dquot checksum after resetting dd_lsn in repair Darrick J. Wong
2026-09-02 7:23 ` Christoph Hellwig
2026-09-02 15:37 ` Darrick J. Wong
2026-09-03 5:35 ` Christoph Hellwig
2026-09-03 5:43 ` Darrick J. Wong
2026-09-03 5:49 ` Darrick J. Wong [this message]
2026-09-07 6:29 ` [PATCH v1.1 " Carlos Maiolino
2026-09-02 5:49 ` [PATCH 4/5] xfs: fix backwards skipping logic in xrep_quota_block Darrick J. Wong
2026-09-02 7:24 ` Christoph Hellwig
2026-09-07 6:29 ` Carlos Maiolino
2026-09-02 5:49 ` [PATCH 5/5] xfs: fix backwards mergeability logic in refcount scrubber Darrick J. Wong
2026-09-02 7:25 ` Christoph Hellwig
2026-09-07 6:29 ` [PATCHSET 5/5] xfs: LLM-inspired bug fixes, part 9 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=20260903054952.GV1933798@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.