summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-27 09:16:29 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-27 09:16:29 -0400
commit71951f35a6e413f2bfbd41829af8cf10a890aeb6 (patch)
treeeef4dd2ab8dd6af6353c9600b6613b8ca50691c4 /fs/btrfs/ctree.h
parent9a6f11ed8f421fb1cc7b37390e32316ff4701f5d (diff)
downloadlwn-71951f35a6e413f2bfbd41829af8cf10a890aeb6.tar.gz
lwn-71951f35a6e413f2bfbd41829af8cf10a890aeb6.zip
Btrfs: add generation field to file extent
Signed-off-by: Chris Mason <chris.mason@oracle.com>
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 a4ad39b58a4b..c3fa12a6b59e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -192,6 +192,7 @@ struct btrfs_root_item {
} __attribute__ ((__packed__));
struct btrfs_file_extent_item {
+ __le64 generation;
/*
* disk space consumed by the extent, checksum blocks are included
* in these numbers
@@ -764,6 +765,18 @@ static inline void btrfs_set_file_extent_disk_blocknr(struct
e->disk_blocknr = cpu_to_le64(val);
}
+static inline u64 btrfs_file_extent_generation(struct btrfs_file_extent_item *e)
+{
+ return le64_to_cpu(e->generation);
+}
+
+static inline void btrfs_set_file_extent_generation(struct
+ btrfs_file_extent_item *e,
+ u64 val)
+{
+ e->generation = cpu_to_le64(val);
+}
+
static inline u64 btrfs_file_extent_disk_num_blocks(struct
btrfs_file_extent_item *e)
{