diff options
author | David Sterba <dsterba@suse.com> | 2022-10-27 02:41:32 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:52 +0100 |
commit | b762041629e73d8e24a10aae4bf256774fbbd082 (patch) | |
tree | 6d36289aa11f7cee4b322139eb72ffa241f25e4b /fs/btrfs | |
parent | 535a7e5d6b7e04da0336c632c834a575e82b5082 (diff) |
btrfs: pass btrfs_inode to btrfs_submit_data_read_bio
The function is for internal interfaces so we should use the
btrfs_inode.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 2 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 5 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 01fc62d39ed2..5406a2f817b2 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -412,7 +412,7 @@ static inline void btrfs_inode_split_flags(u64 inode_item_flags, #define CSUM_FMT_VALUE(size, bytes) size, bytes void btrfs_submit_data_write_bio(struct btrfs_inode *inode, struct bio *bio, int mirror_num); -void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio, +void btrfs_submit_data_read_bio(struct btrfs_inode *inode, struct bio *bio, int mirror_num, enum btrfs_compression_type compress_type); void btrfs_submit_dio_repair_bio(struct inode *inode, struct bio *bio, int mirror_num); blk_status_t btrfs_submit_bio_start(struct btrfs_inode *inode, struct bio *bio); diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 13fba51be32d..ac69e5f1605c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -138,7 +138,7 @@ static void submit_one_bio(struct btrfs_bio_ctrl *bio_ctrl) else if (btrfs_op(bio) == BTRFS_MAP_WRITE) btrfs_submit_data_write_bio(BTRFS_I(inode), bio, mirror_num); else - btrfs_submit_data_read_bio(inode, bio, mirror_num, + btrfs_submit_data_read_bio(BTRFS_I(inode), bio, mirror_num, bio_ctrl->compress_type); /* The bio is owned by the end_io handler now */ @@ -861,7 +861,8 @@ int btrfs_repair_one_sector(struct inode *inode, struct btrfs_bio *failed_bbio, * error here. */ if (submit_buffered) - btrfs_submit_data_read_bio(inode, repair_bio, failrec->this_mirror, 0); + btrfs_submit_data_read_bio(BTRFS_I(inode), repair_bio, + failrec->this_mirror, 0); else btrfs_submit_dio_repair_bio(inode, repair_bio, failrec->this_mirror); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 538f55088bdf..e3bbd19edea3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2768,10 +2768,10 @@ void btrfs_submit_data_write_bio(struct btrfs_inode *inode, struct bio *bio, int btrfs_submit_bio(fs_info, bio, mirror_num); } -void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio, +void btrfs_submit_data_read_bio(struct btrfs_inode *inode, struct bio *bio, int mirror_num, enum btrfs_compression_type compress_type) { - struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); + struct btrfs_fs_info *fs_info = inode->root->fs_info; blk_status_t ret; if (compress_type != BTRFS_COMPRESS_NONE) { @@ -2779,7 +2779,7 @@ void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio, * btrfs_submit_compressed_read will handle completing the bio * if there were any errors, so just return here. */ - btrfs_submit_compressed_read(inode, bio, mirror_num); + btrfs_submit_compressed_read(&inode->vfs_inode, bio, mirror_num); return; } @@ -2790,7 +2790,7 @@ void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio, * Lookup bio sums does extra checks around whether we need to csum or * not, which is why we ignore skip_sum here. */ - ret = btrfs_lookup_bio_sums(inode, bio, NULL); + ret = btrfs_lookup_bio_sums(&inode->vfs_inode, bio, NULL); if (ret) { btrfs_bio_end_io(btrfs_bio(bio), ret); return; |