Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: cem@kernel.org, stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/5] xfs: compute dquot checksum after resetting dd_lsn in repair
Date: Wed, 2 Sep 2026 22:43:30 -0700	[thread overview]
Message-ID: <20260903054330.GA127607@frogsfrogsfrogs> (raw)
In-Reply-To: <20260903053517.GC16469@lst.de>

On Thu, Sep 03, 2026 at 07:35:17AM +0200, Christoph Hellwig wrote:
> On Wed, Sep 02, 2026 at 08:37:03AM -0700, Darrick J. Wong wrote:
> > On Wed, Sep 02, 2026 at 09:23:41AM +0200, Christoph Hellwig wrote:
> > > On Tue, Sep 01, 2026 at 10:49:16PM -0700, Darrick J. Wong wrote:
> > > > 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.
> > > 
> > > Yeah:
> > > 
> > > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > > 
> > > Also why do we set the lsn to 0, shouldn't that contain a valid value
> > > (probably the current LSN, but I'd have to look deeper at what this
> > > does in detail)
> > 
> > Hmm.  When I wrote this dquot repair code I was mirroring what
> > xfs_qm_init_dquot_blk does (memsets the new dquot buffer to zeroes,
> > doesn't explicitly touch dd_lsn).
> > 
> > It probably ought to be set to the current LSN but we don't really have
> > a dquot log item for determining that, and assigning 0 here means that
> > any subsequent logged dquot item will always be recovered into the
> > ondisk dquot that xrep_quota_block writes.
> 
> Can we capture this for the future in comments somewhere?

Will add that and repost.

--D

  reply	other threads:[~2026-09-03  5:43 UTC|newest]

Thread overview: 15+ 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 [this message]
2026-09-03  5:49   ` [PATCH v1.1 " Darrick J. Wong
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-02  5:49 ` [PATCH 5/5] xfs: fix backwards mergeability logic in refcount scrubber Darrick J. Wong
2026-09-02  7:25   ` 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=20260903054330.GA127607@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