path: root/disk-io.h
diff options
authorQu Wenruo <>2017-05-18 10:51:08 +0800
committerDavid Sterba <>2017-07-03 13:35:11 +0200
commit8690c887d1dcad384d44ca21bf950a4ec2fbffdb (patch)
treebf736b51824e4e834c4d0e8ea79169bf40849d04 /disk-io.h
parent060c7b3a1a40d2e9cacbdb37a02791bacae32491 (diff)
btrfs-progs: Refactor read_tree_block to get rid of btrfs_root
The only reasom read_tree_block() needs a btrfs_root parameter is to get its node/sector size. And long ago, I have already introduced a compactible interface, read_tree_block_fs_info() to pass btrfs_fs_info instead of btrfs_root. Since we have cleaned up all root->sector/node/stripesize users, we should be OK to refactor read_tree_block() function. Signed-off-by: Qu Wenruo <>
Diffstat (limited to 'disk-io.h')
1 files changed, 1 insertions, 8 deletions
diff --git a/disk-io.h b/disk-io.h
index b4d02275..b097785a 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -115,16 +115,9 @@ static inline u64 btrfs_sb_offset(int mirror)
struct btrfs_device;
int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirror);
-struct extent_buffer* read_tree_block_fs_info(
+struct extent_buffer* read_tree_block(
struct btrfs_fs_info *fs_info, u64 bytenr, u32 blocksize,
u64 parent_transid);
-static inline struct extent_buffer* read_tree_block(
- struct btrfs_root *root, u64 bytenr, u32 blocksize,
- u64 parent_transid)
- return read_tree_block_fs_info(root->fs_info, bytenr, blocksize,
- parent_transid);
int read_extent_data(struct btrfs_root *root, char *data, u64 logical,
u64 *len, int mirror);