path: root/extent_io.h
diff options
authorQu Wenruo <>2018-03-30 13:48:55 +0800
committerDavid Sterba <>2018-04-24 13:00:11 +0200
commitf96ca97fb451801d899650a4d03f6a96fa8c59fb (patch)
tree9f31dba719cd2f013e8461909b2837e83bc99800 /extent_io.h
parent43dea2af140fe21111e7ce8491cad2724d73b2d4 (diff)
btrfs-progs: extent_io: Refactor alloc_extent_buffer() to follow kernel parameters
Instead of using the internal struct extent_io_tree, use struct fs_info. This does not only unify the interface between kernel and btrfs-progs, but also makes later btrfs_print_tree() use fewer parameters. Signed-off-by: Qu Wenruo <> Reviewed-by: Lu Fengqi <> Signed-off-by: David Sterba <>
Diffstat (limited to 'extent_io.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/extent_io.h b/extent_io.h
index 17a4a829..f8f73089 100644
--- a/extent_io.h
+++ b/extent_io.h
@@ -98,6 +98,7 @@ struct extent_buffer {
int refs;
u32 flags;
int fd;
+ struct btrfs_fs_info *fs_info;
char data[] __attribute__((aligned(8)));
@@ -145,7 +146,7 @@ struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
u64 bytenr, u32 blocksize);
struct extent_buffer *find_first_extent_buffer(struct extent_io_tree *tree,
u64 start);
-struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
+struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
u64 bytenr, u32 blocksize);
struct extent_buffer *btrfs_clone_extent_buffer(struct extent_buffer *src);
void free_extent_buffer(struct extent_buffer *eb);