aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-03-24 16:06:27 +0000
committerDavid Sterba <[email protected]>2022-04-19 13:44:56 +0000
commit00d825258bcc09c0e1b99aa7f9ad7d2c2fad41fa (patch)
treed0d5be36a3ed71c13c1c76ceca6b2fbfd1777e9a /fs/btrfs/dev-replace.c
parentbtrfs: fix and document the zoned device choice in alloc_new_bio (diff)
downloadkernel-00d825258bcc09c0e1b99aa7f9ad7d2c2fad41fa.tar.gz
kernel-00d825258bcc09c0e1b99aa7f9ad7d2c2fad41fa.zip
btrfs: fix direct I/O read repair for split bios
When a bio is split in btrfs_submit_direct, dip->file_offset contains the file offset for the first bio. But this means the start value used in btrfs_check_read_dio_bio is incorrect for subsequent bios. Add a file_offset field to struct btrfs_bio to pass along the correct offset. Given that check_data_csum only uses start of an error message this means problems with this miscalculation will only show up when I/O fails or checksums mismatch. The logic was removed in f4f39fc5dc30 ("btrfs: remove btrfs_bio::logical member") but we need it due to the bio splitting. CC: [email protected] # 5.16+ Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Naohiro Aota <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Reviewed-by: Sweet Tea Dorminy <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions