aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-07-07 07:33:28 +0200
committerDavid Sterba <dsterba@suse.com>2022-07-25 19:55:19 +0200
commit7aa51232e2046cdd719a2f5c9a4537b84554d5a4 (patch)
tree3a11db9c20f9bf3b868ceb5c8e4f4df087182944 /fs/btrfs/inode.c
parentbtrfs: simplify the pending I/O counting in struct compressed_bio (diff)
downloadlinux-dev-7aa51232e2046cdd719a2f5c9a4537b84554d5a4.tar.xz
linux-dev-7aa51232e2046cdd719a2f5c9a4537b84554d5a4.zip
btrfs: pass a btrfs_bio to btrfs_repair_one_sector
Pass the btrfs_bio instead of the plain bio to btrfs_repair_one_sector, and remove the start and failed_mirror arguments in favor of deriving them from the btrfs_bio. For this to work ensure that the file_offset field is also initialized for buffered I/O. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f20740812e5b..934cd10dac68 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8012,9 +8012,8 @@ static blk_status_t btrfs_check_read_dio_bio(struct btrfs_dio_private *dip,
} else {
int ret;
- ret = btrfs_repair_one_sector(inode, &bbio->bio, offset,
- bv.bv_page, bv.bv_offset, start,
- bbio->mirror_num,
+ ret = btrfs_repair_one_sector(inode, bbio, offset,
+ bv.bv_page, bv.bv_offset,
submit_dio_repair_bio);
if (ret)
err = errno_to_blk_status(ret);