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, dlemoal@kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: restore bi_bdev in xfs_zone_gc_write_chunk
Date: Fri, 14 Aug 2026 08:24:23 +0200 [thread overview]
Message-ID: <20260814062422.GA8819@lst.de> (raw)
In-Reply-To: <20260813151150.GE3556460@frogsfrogsfrogs>
On Thu, Aug 13, 2026 at 08:11:50AM -0700, Darrick J. Wong wrote:
> On Thu, Aug 13, 2026 at 04:56:12PM +0200, Christoph Hellwig wrote:
> > xfs_zone_gc_write_chunk relies on bi_bdev to still be valid, which is not
> > true when XFS is used on top of a stacked block device. This can lead to
> > misdirected GC writes, writing of plain text when using dm-crypt, or
> > miscalculated I/O limits in xfs_zone_gc_split_write.
> >
> > Fix this by reassigning bi_bdev.
>
> ewww, what??
>
> Should bio_reuse take a bdev parameter and set_dev itself? I had no
> idea that bi_bdev could get changed by the time the bio completes.
It probably should, and at some point it did, but it got dropped
somewhere in review. But ket's get the fix in without that first.
Also note that dm-crypt actually always clones these days as I figured
out when trying to come up with an xfstests for this. So this is
mostly limited to dm-linear and nvme-multipath.
prev parent reply other threads:[~2026-08-14 6:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 14:56 [PATCH] xfs: restore bi_bdev in xfs_zone_gc_write_chunk Christoph Hellwig
2026-08-13 15:11 ` Darrick J. Wong
2026-08-14 6:24 ` Christoph Hellwig [this message]
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=20260814062422.GA8819@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=dlemoal@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