Message ID | 20230524150317.1767981-3-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/14] btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 4ecc5f31c0190e..5fad6e032e6c76 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -348,7 +348,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) + if (bio_op(bio) == REQ_OP_ZONE_APPEND && !bio->bi_status) btrfs_record_physical_zoned(bbio); btrfs_orig_bbio_end_io(bbio); }
When a zoned append command fails there is no written address reported, so don't try to record it. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)