} __attribute__ ((__packed__));
struct btrfs_csum_item {
+ __le64 extent_offset;
u8 csum[BTRFS_CSUM_SIZE];
} __attribute__ ((__packed__));
e->num_blocks = cpu_to_le64(val);
}
+static inline u64 btrfs_csum_extent_offset(struct btrfs_csum_item *c)
+{
+ return le64_to_cpu(c->extent_offset);
+}
+
+static inline void btrfs_set_csum_extent_offset(struct btrfs_csum_item *c,
+ u64 val)
+{
+ c->extent_offset = cpu_to_le64(val);
+}
+
static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d)
{
return le16_to_cpu(d->pathlen);
struct btrfs_device_item *devi;
struct btrfs_inode_item *ii;
struct btrfs_file_extent_item *fi;
+ struct btrfs_csum_item *ci;
char *p;
u32 type;
printf("\t\textent data refs %u\n",
btrfs_extent_refs(ei));
break;
+ case BTRFS_CSUM_ITEM_KEY:
+ ci = btrfs_item_ptr(l, i,
+ struct btrfs_csum_item);
+ printf("\t\tcsum item\n");
+ break;
case BTRFS_EXTENT_DATA_KEY:
fi = btrfs_item_ptr(l, i,
struct btrfs_file_extent_item);