*/
case BTRFS_ROOT_ITEM_KEY:
printf(" ");
- print_objectid(stdout, offset, type);
+ /*
+ * Normally offset of ROOT_ITEM should present the generation
+ * of creation time of the root.
+ * However if this is reloc tree, offset is the subvolume
+ * id of its source. Here we do extra check on this.
+ */
+ if (objectid == BTRFS_TREE_RELOC_OBJECTID)
+ print_objectid(stdout, offset, type);
+ else
+ printf("%lld", offset);
printf(")");
break;
default:
btrfs_inode_uid(eb, ii),
btrfs_inode_gid(eb, ii),
(unsigned long long)btrfs_inode_rdev(eb,ii),
- (unsigned long long)btrfs_inode_flags(eb,ii),
(unsigned long long)btrfs_inode_sequence(eb, ii),
+ (unsigned long long)btrfs_inode_flags(eb,ii),
flags_str);
print_timespec(eb, btrfs_inode_atime(ii), "\t\tatime ", "\n");
print_timespec(eb, btrfs_inode_ctime(ii), "\t\tctime ", "\n");
printf("node %llu level %d items %d free %u generation %llu owner %llu\n",
(unsigned long long)eb->start,
btrfs_header_level(eb), nr,
- (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr,
+ (u32)BTRFS_NODEPTRS_PER_BLOCK(root->fs_info) - nr,
(unsigned long long)btrfs_header_generation(eb),
(unsigned long long)btrfs_header_owner(eb));
print_uuids(eb);