__le64 disk_blocknr;
__le64 disk_num_blocks;
/*
- * the logical offset in file bytes (no csums)
+ * the logical offset in file blocks (no csums)
* this extent record is for. This allows a file extent to point
* into the middle of an existing extent on disk, sharing it
* between two snapshots (useful if some bytes in the middle of the
struct btrfs_dir_item *di;
struct btrfs_inode_map_item *mi;
struct btrfs_inode_item *ii;
+ struct btrfs_file_extent_item *fi;
u32 type;
printf("leaf %Lu ptrs %d free space %d parent %Lu generation %Lu\n",
btrfs_disk_key_flags(&mi->key),
btrfs_disk_key_offset(&mi->key));
break;
+ case BTRFS_EXTENT_DATA_KEY:
+ fi = btrfs_item_ptr(l, i,
+ struct btrfs_file_extent_item);
+ printf("\t\textent data disk block %Lu nr %Lu\n",
+ btrfs_file_extent_disk_blocknr(fi),
+ btrfs_file_extent_disk_num_blocks(fi));
+ printf("\t\textent data offset %Lu nr %Lu\n",
+ btrfs_file_extent_offset(fi),
+ btrfs_file_extent_num_blocks(fi));
+ break;
case BTRFS_STRING_ITEM_KEY:
printf("\t\titem data %.*s\n", btrfs_item_size(item),
btrfs_leaf_data(l) + btrfs_item_offset(item));