aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index a4ad39b58a4..c3fa12a6b59 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -192,6 +192,7 @@ struct btrfs_root_item {
192} __attribute__ ((__packed__)); 192} __attribute__ ((__packed__));
193 193
194struct btrfs_file_extent_item { 194struct btrfs_file_extent_item {
195 __le64 generation;
195 /* 196 /*
196 * disk space consumed by the extent, checksum blocks are included 197 * disk space consumed by the extent, checksum blocks are included
197 * in these numbers 198 * in these numbers
@@ -764,6 +765,18 @@ static inline void btrfs_set_file_extent_disk_blocknr(struct
764 e->disk_blocknr = cpu_to_le64(val); 765 e->disk_blocknr = cpu_to_le64(val);
765} 766}
766 767
768static inline u64 btrfs_file_extent_generation(struct btrfs_file_extent_item *e)
769{
770 return le64_to_cpu(e->generation);
771}
772
773static inline void btrfs_set_file_extent_generation(struct
774 btrfs_file_extent_item *e,
775 u64 val)
776{
777 e->generation = cpu_to_le64(val);
778}
779
767static inline u64 btrfs_file_extent_disk_num_blocks(struct 780static inline u64 btrfs_file_extent_disk_num_blocks(struct
768 btrfs_file_extent_item *e) 781 btrfs_file_extent_item *e)
769{ 782{