25 int num_stripes = btrfs_chunk_num_stripes(eb, chunk);
29 (
unsigned long long)btrfs_chunk_length(eb, chunk),
30 (
unsigned long long)btrfs_chunk_owner(eb, chunk),
31 (
unsigned long long)btrfs_chunk_type(eb, chunk),
35 (
unsigned long long)btrfs_stripe_devid_nr(eb, chunk, i),
36 (
unsigned long long)btrfs_stripe_offset_nr(eb, chunk, i));
43 "total_bytes %llu bytes used %llu\n",
44 (
unsigned long long)btrfs_device_id(eb, dev_item),
45 (
unsigned long long)btrfs_device_total_bytes(eb, dev_item),
46 (
unsigned long long)btrfs_device_bytes_used(eb, dev_item));
52 "objectid %llu offset %llu count %u\n",
53 (
unsigned long long)btrfs_extent_data_ref_root(eb, ref),
54 (
unsigned long long)btrfs_extent_data_ref_objectid(eb, ref),
55 (
unsigned long long)btrfs_extent_data_ref_offset(eb, ref),
56 btrfs_extent_data_ref_count(eb, ref));
73 if (item_size <
sizeof(*ei)) {
74 #ifdef BTRFS_COMPAT_EXTENT_TREE_V0
76 BUG_ON(item_size !=
sizeof(*ei0));
79 btrfs_extent_refs_v0(eb, ei0));
87 flags = btrfs_extent_flags(eb, ei);
90 (
unsigned long long)btrfs_extent_refs(eb, ei),
91 (
unsigned long long)btrfs_extent_generation(eb, ei),
92 (
unsigned long long)flags);
97 btrfs_tree_block_key(eb, info, &
key);
100 (
unsigned long long)btrfs_disk_key_objectid(&
key),
102 (
unsigned long long)btrfs_disk_key_offset(&
key),
103 btrfs_tree_block_level(eb, info));
109 ptr = (
unsigned long)iref;
110 end = (
unsigned long)ei + item_size;
113 type = btrfs_extent_inline_ref_type(eb, iref);
114 offset = btrfs_extent_inline_ref_offset(eb, iref);
118 "root %llu\n", (
unsigned long long)offset);
122 "parent %llu\n", (
unsigned long long)offset);
126 print_extent_data_ref(eb, dref);
131 "parent %llu count %u\n",
132 (
unsigned long long)offset,
133 btrfs_shared_data_ref_count(eb, sref));
138 ptr += btrfs_extent_inline_ref_size(type);
143 #ifdef BTRFS_COMPAT_EXTENT_TREE_V0
144 static void print_extent_ref_v0(
struct extent_buffer *eb,
int slot)
149 printk(
"\t\textent back ref root %llu gen %llu "
150 "owner %llu num_refs %lu\n",
151 (
unsigned long long)btrfs_ref_root_v0(eb, ref0),
152 (
unsigned long long)btrfs_ref_generation_v0(eb, ref0),
153 (
unsigned long long)btrfs_ref_objectid_v0(eb, ref0),
154 (
unsigned long)btrfs_ref_count_v0(eb, ref0));
177 nr = btrfs_header_nritems(l);
180 (
unsigned long long)btrfs_header_bytenr(l), nr,
182 for (i = 0 ; i <
nr ; i++) {
183 item = btrfs_item_nr(l, i);
184 btrfs_item_key_to_cpu(l, &key, i);
185 type = btrfs_key_type(&key);
189 (
unsigned long long)key.
objectid, type,
190 (
unsigned long long)key.
offset,
191 btrfs_item_offset(l, item), btrfs_item_size(l, item));
198 btrfs_inode_generation(l, ii),
199 (
unsigned long long)btrfs_inode_size(l, ii),
200 btrfs_inode_mode(l, ii));
204 btrfs_dir_item_key_to_cpu(l, di, &found_key);
206 (
unsigned long long)found_key.
objectid,
207 btrfs_dir_type(l, di));
213 btrfs_disk_root_bytenr(l, ri),
214 btrfs_disk_root_refs(l, ri));
217 print_extent_item(l, i);
228 print_extent_data_ref(l, dref);
234 btrfs_shared_data_ref_count(l, sref));
239 if (btrfs_file_extent_type(l, fi) ==
243 btrfs_file_extent_inline_len(l, fi));
249 btrfs_file_extent_disk_bytenr(l, fi),
251 btrfs_file_extent_disk_num_bytes(l, fi));
253 "nr %llu ram %llu\n",
255 btrfs_file_extent_offset(l, fi),
257 btrfs_file_extent_num_bytes(l, fi),
259 btrfs_file_extent_ram_bytes(l, fi));
262 #ifdef BTRFS_COMPAT_EXTENT_TREE_V0
263 print_extent_ref_v0(l, i);
273 btrfs_disk_block_group_used(l, bi));
287 "\t\tchunk objectid %llu chunk offset %llu "
290 btrfs_dev_extent_chunk_tree(l, dev_extent),
292 btrfs_dev_extent_chunk_objectid(l, dev_extent),
294 btrfs_dev_extent_chunk_offset(l, dev_extent),
296 btrfs_dev_extent_length(l, dev_extent));
312 nr = btrfs_header_nritems(c);
313 level = btrfs_header_level(c);
319 (
unsigned long long)btrfs_header_bytenr(c),
322 for (i = 0; i <
nr; i++) {
323 btrfs_node_key_to_cpu(c, &key, i);
328 (
unsigned long long)key.
offset,
329 (
unsigned long long)btrfs_node_blockptr(c, i));
331 for (i = 0; i <
nr; i++) {
333 btrfs_node_blockptr(c, i),
334 btrfs_level_size(root, level - 1),
335 btrfs_node_ptr_generation(c, i));
336 if (btrfs_is_leaf(next) &&
339 if (btrfs_header_level(next) !=