summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-07-03 10:14:27 +0200
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:40 +0200
commitc31efbdf23a09468c9352f05443d5624dbbfd3c7 (patch)
treebc968559afc3b8187c9ae41f4bc18a554522bf10 /fs/btrfs/volumes.h
parentbtrfs: streamline btrfs_get_io_failure_record logic (diff)
downloadlinux-c31efbdf23a09468c9352f05443d5624dbbfd3c7.tar.xz
linux-c31efbdf23a09468c9352f05443d5624dbbfd3c7.zip
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>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 75af2334b2e3..5eea93916fbf 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -288,7 +288,7 @@ struct btrfs_fs_devices {
*/
struct btrfs_io_bio {
unsigned int mirror_num;
- unsigned int stripe_index;
+ struct btrfs_device *device;
u64 logical;
u8 *csum;
u8 csum_inline[BTRFS_BIO_INLINE_CSUM_SIZE];