diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-16 10:53:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-16 10:53:01 -0800 |
commit | 087a76d390cbb8c0d21ea0cb3672ab4a7bb76362 (patch) | |
tree | 7c86752ba8d430c37618851ee2806b5b921299bd /fs/btrfs/print-tree.c | |
parent | 759b2656b259d10935647a92dbfae7fafee6a790 (diff) | |
parent | 2939e1a86f758b55cdba73e29397dd3d94df13bc (diff) | |
download | linux-stable-087a76d390cbb8c0d21ea0cb3672ab4a7bb76362.tar.gz linux-stable-087a76d390cbb8c0d21ea0cb3672ab4a7bb76362.tar.bz2 linux-stable-087a76d390cbb8c0d21ea0cb3672ab4a7bb76362.zip |
Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason:
"Jeff Mahoney and Dave Sterba have a really nice set of cleanups in
here, and Christoph pitched in corrections/improvements to make btrfs
use proper helpers for bio walking instead of doing it by hand.
There are some key fixes as well, including some long standing bugs
that took forever to track down in btrfs_drop_extents and during
balance"
* 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (77 commits)
btrfs: limit async_work allocation and worker func duration
Revert "Btrfs: adjust len of writes if following a preallocated extent"
Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors
btrfs: opencode chunk locking, remove helpers
btrfs: remove root parameter from transaction commit/end routines
btrfs: split btrfs_wait_marked_extents into normal and tree log functions
btrfs: take an fs_info directly when the root is not used otherwise
btrfs: simplify btrfs_wait_cache_io prototype
btrfs: convert extent-tree tracepoints to use fs_info
btrfs: root->fs_info cleanup, access fs_info->delayed_root directly
btrfs: root->fs_info cleanup, add fs_info convenience variables
btrfs: root->fs_info cleanup, update_block_group{,flags}
btrfs: root->fs_info cleanup, lock/unlock_chunks
btrfs: root->fs_info cleanup, btrfs_calc_{trans,trunc}_metadata_size
btrfs: pull node/sector/stripe sizes out of root and into fs_info
btrfs: root->fs_info cleanup, io_ctl_init
btrfs: root->fs_info cleanup, use fs_info->dev_root everywhere
btrfs: struct reada_control.root -> reada_control.fs_info
btrfs: struct btrfsic_state->root should be an fs_info
btrfs: alloc_reserved_file_extent trace point should use extent_root
...
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 438575ea8d25..cdafbf92ef0c 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -161,7 +161,7 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset, } } -void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) +void btrfs_print_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *l) { int i; u32 type, nr; @@ -182,8 +182,9 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) nr = btrfs_header_nritems(l); - btrfs_info(root->fs_info, "leaf %llu total ptrs %d free space %d", - btrfs_header_bytenr(l), nr, btrfs_leaf_free_space(root, l)); + btrfs_info(fs_info, "leaf %llu total ptrs %d free space %d", + btrfs_header_bytenr(l), nr, + btrfs_leaf_free_space(fs_info, l)); for (i = 0 ; i < nr ; i++) { item = btrfs_item_nr(i); btrfs_item_key_to_cpu(l, &key, i); @@ -314,7 +315,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) } } -void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) +void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c) { int i; u32 nr; struct btrfs_key key; @@ -325,13 +326,13 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) nr = btrfs_header_nritems(c); level = btrfs_header_level(c); if (level == 0) { - btrfs_print_leaf(root, c); + btrfs_print_leaf(fs_info, c); return; } - btrfs_info(root->fs_info, + btrfs_info(fs_info, "node %llu level %d total ptrs %d free spc %u", btrfs_header_bytenr(c), level, nr, - (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); + (u32)BTRFS_NODEPTRS_PER_BLOCK(fs_info) - nr); for (i = 0; i < nr; i++) { btrfs_node_key_to_cpu(c, &key, i); pr_info("\tkey %d (%llu %u %llu) block %llu\n", @@ -339,7 +340,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) btrfs_node_blockptr(c, i)); } for (i = 0; i < nr; i++) { - struct extent_buffer *next = read_tree_block(root, + struct extent_buffer *next = read_tree_block(fs_info, btrfs_node_blockptr(c, i), btrfs_node_ptr_generation(c, i)); if (IS_ERR(next)) { @@ -355,7 +356,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) if (btrfs_header_level(next) != level - 1) BUG(); - btrfs_print_tree(root, next); + btrfs_print_tree(fs_info, next); free_extent_buffer(next); } } |