summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-16 09:22:45 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-16 09:22:45 -0400
commit6567e837df07e43bffc08ac40858af8133a007bf (patch)
tree3bf186544e5cd5d4ef5c755e1e3b8f678f6df198 /fs/btrfs/ctree.h
parentb4100d64241fed93a3f821ddf59d11ab4443a3ba (diff)
Btrfs: early work to file_write in big extents
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ef3583cf74d..796f19d03ab 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -227,6 +227,7 @@ struct btrfs_file_extent_item {
} __attribute__ ((__packed__));
struct btrfs_csum_item {
+ __le64 extent_offset;
u8 csum[BTRFS_CSUM_SIZE];
} __attribute__ ((__packed__));
@@ -924,6 +925,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);
@@ -1002,6 +1014,8 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct
btrfs_root *root);
/* ctree.c */
+int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root
+ *root, struct btrfs_path *path, u32 data_size);
int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_key *key, struct btrfs_path *p, int
ins_len, int cow);
@@ -1071,6 +1085,7 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 objectid, u64 offset,
+ u64 extent_offset,
char *data, size_t len);
int btrfs_csum_verify_file_block(struct btrfs_root *root,
u64 objectid, u64 offset,