Message ID | 20241101052206.437530-4-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] block: fix bio_split_rw_at to take zone_write_granularity into account | expand |
On 11/1/24 14:21, Christoph Hellwig wrote: > Otherwise it won't catch bios turned into regular writes by the > block level zone write plugging. > > Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On Fri, Nov 01, 2024 at 06:21:46AM GMT, Christoph Hellwig wrote: > Otherwise it won't catch bios turned into regular writes by the > block level zone write plugging. > > Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > fs/btrfs/bio.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index fec5c6cde0a7..0f096e226908 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -366,7 +366,7 @@ static void btrfs_simple_end_io(struct bio *bio) INIT_WORK(&bbio->end_io_work, btrfs_end_bio_work); queue_work(btrfs_end_io_wq(fs_info, bio), &bbio->end_io_work); } else { - if (bio_op(bio) == REQ_OP_ZONE_APPEND && !bio->bi_status) + if (bio_is_zone_append(bio) && !bio->bi_status) btrfs_record_physical_zoned(bbio); btrfs_bio_end_io(bbio, bbio->bio.bi_status); } @@ -409,7 +409,7 @@ static void btrfs_orig_write_end_io(struct bio *bio) else bio->bi_status = BLK_STS_OK; - if (bio_op(bio) == REQ_OP_ZONE_APPEND && !bio->bi_status) + if (bio_is_zone_append(bio) && !bio->bi_status) stripe->physical = bio->bi_iter.bi_sector << SECTOR_SHIFT; btrfs_bio_end_io(bbio, bbio->bio.bi_status); @@ -423,7 +423,7 @@ static void btrfs_clone_write_end_io(struct bio *bio) if (bio->bi_status) { atomic_inc(&stripe->bioc->error); btrfs_log_dev_io_error(bio, stripe->dev); - } else if (bio_op(bio) == REQ_OP_ZONE_APPEND) { + } else if (bio_is_zone_append(bio)) { stripe->physical = bio->bi_iter.bi_sector << SECTOR_SHIFT; }
Otherwise it won't catch bios turned into regular writes by the block level zone write plugging. Fixes: 9b1ce7f0c6f8 ("block: Implement zone append emulation") Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/bio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)