Re: [PATCH] xfs: restore bi_bdev in xfs_zone_gc_write_chunk
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
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.