summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-16 09:23:09 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-16 09:23:09 -0400
commit23218726a232be24b4c8e2913e0037f3e5353dca (patch)
treee83e23311992f0d1ab7ba98bc35669895976c205 /ctree.h
parent3eaaf935e56e03e3c1db110f055c756bd3415c88 (diff)
early work to file_write in big extents
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index fb1f5d51..5cf28be9 100644
--- a/ctree.h
+++ b/ctree.h
@@ -223,6 +223,7 @@ struct btrfs_file_extent_item {
} __attribute__ ((__packed__));
struct btrfs_csum_item {
+ __le64 extent_offset;
u8 csum[BTRFS_CSUM_SIZE];
} __attribute__ ((__packed__));
@@ -911,6 +912,17 @@ static inline void btrfs_set_file_extent_num_blocks(struct
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);