From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
cem@kernel.org, hans.holmberg@wdc.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix zoned GC data corruption due to wrong bv_offset
Date: Tue, 13 May 2025 07:20:37 +0200 [thread overview]
Message-ID: <20250513052036.GA32022@lst.de> (raw)
In-Reply-To: <20250512170400.GH2701446@frogsfrogsfrogs>
On Mon, May 12, 2025 at 10:04:00AM -0700, Darrick J. Wong wrote:
> Hmm. I started wondering why you can't reuse chunk->scratch->offset in
> the bio_add_folio_nofail call below. I /think/ that's because
> xfs_zone_gc_start_chunk increments chunk->scratch->offset after adding
> the folio to the bio?
Exactly, it's a basically a circular buffer.
> And then we can attach the same scratch->folio to different read bios.
> Each bio gets a different offset within the folio, right?
Yes.
> So
> xfs_zone_gc_write_chunk really does need to find the offset_in_folio
> from the read bio. And I guess that's why you use bvec_phys to figure
> that out (instead of, say, wasting space recording it again in the
> xfs_gc_bio), correct?
Yes.
next prev parent reply other threads:[~2025-05-13 5:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 14:43 [PATCH] xfs: fix zoned GC data corruption due to wrong bv_offset Christoph Hellwig
2025-05-12 17:04 ` Darrick J. Wong
2025-05-13 5:20 ` Christoph Hellwig [this message]
2025-05-13 6:56 ` Hans Holmberg
2025-05-13 17:35 ` 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=20250513052036.GA32022@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hans.holmberg@wdc.com \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).