btrfs: record btrfs_device directly in btrfs_io_bio
Instead of recording stripe_index and using that to access correct btrfs_device from btrfs_bio::stripes record the btrfs_device in btrfs_io_bio. This will enable endio handlers to increment device error counters on checksum errors. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
3526302f26
commit
c31efbdf23
@@ -1117,6 +1117,7 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio,
|
||||
|
||||
/* put a new bio on the list */
|
||||
bio = btrfs_io_bio_alloc(bio_max_len >> PAGE_SHIFT ?: 1);
|
||||
btrfs_io_bio(bio)->device = stripe->dev;
|
||||
bio->bi_iter.bi_size = 0;
|
||||
bio_set_dev(bio, stripe->dev->bdev);
|
||||
bio->bi_iter.bi_sector = disk_start >> 9;
|
||||
|
Reference in New Issue
Block a user