summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-07-23 17:18:07 +0800
committerDavid Sterba <dsterba@suse.com>2015-08-31 19:25:09 +0200
commit045dc8fb6cb41bc804af3069f76ac3c94681ea42 (patch)
tree892b986cca47cb244fd6b092e8acf3f0acc1d8e1 /print-tree.c
parente16cb7cb53e0cf36d918b1e018402d2226c602ec (diff)
btrfs-progs: print-tree: print stripe len of a chunk
Although it is fixed to BTRFS_STRIPE_LEN(64K) now, it's still used in a lot of code, just output it for user who wants to trace the source of stripe_len in btrfs_map_bio() code. Reported-by: Chris Murphy <lists@colorremedies.com> Reported-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/print-tree.c b/print-tree.c
index a72a979f..dc1d2764 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -224,9 +224,11 @@ void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk)
char chunk_flags_str[32] = {0};
bg_flags_to_str(btrfs_chunk_type(eb, chunk), chunk_flags_str);
- printf("\t\tchunk length %llu owner %llu type %s num_stripes %d\n",
+ printf("\t\tchunk length %llu owner %llu stripe_len %llu\n",
(unsigned long long)btrfs_chunk_length(eb, chunk),
(unsigned long long)btrfs_chunk_owner(eb, chunk),
+ (unsigned long long)btrfs_chunk_stripe_len(eb, chunk));
+ printf("\t\ttype %s num_stripes %d\n",
chunk_flags_str, num_stripes);
for (i = 0 ; i < num_stripes ; i++) {
printf("\t\t\tstripe %d devid %llu offset %llu\n", i,