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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ef3583cf74d6..796f19d03ab5 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -227,6 +227,7 @@ struct btrfs_file_extent_item {
227} __attribute__ ((__packed__)); 227} __attribute__ ((__packed__));
228 228
229struct btrfs_csum_item { 229struct btrfs_csum_item {
230 __le64 extent_offset;
230 u8 csum[BTRFS_CSUM_SIZE]; 231 u8 csum[BTRFS_CSUM_SIZE];
231} __attribute__ ((__packed__)); 232} __attribute__ ((__packed__));
232 233
@@ -924,6 +925,17 @@ static inline void btrfs_set_file_extent_num_blocks(struct
924 e->num_blocks = cpu_to_le64(val); 925 e->num_blocks = cpu_to_le64(val);
925} 926}
926 927
928static inline u64 btrfs_csum_extent_offset(struct btrfs_csum_item *c)
929{
930 return le64_to_cpu(c->extent_offset);
931}
932
933static inline void btrfs_set_csum_extent_offset(struct btrfs_csum_item *c,
934 u64 val)
935{
936 c->extent_offset = cpu_to_le64(val);
937}
938
927static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d) 939static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d)
928{ 940{
929 return le16_to_cpu(d->pathlen); 941 return le16_to_cpu(d->pathlen);
@@ -1002,6 +1014,8 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
1002int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct 1014int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct
1003 btrfs_root *root); 1015 btrfs_root *root);
1004/* ctree.c */ 1016/* ctree.c */
1017int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root
1018 *root, struct btrfs_path *path, u32 data_size);
1005int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root 1019int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
1006 *root, struct btrfs_key *key, struct btrfs_path *p, int 1020 *root, struct btrfs_key *key, struct btrfs_path *p, int
1007 ins_len, int cow); 1021 ins_len, int cow);
@@ -1071,6 +1085,7 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
1071int btrfs_csum_file_block(struct btrfs_trans_handle *trans, 1085int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
1072 struct btrfs_root *root, 1086 struct btrfs_root *root,
1073 u64 objectid, u64 offset, 1087 u64 objectid, u64 offset,
1088 u64 extent_offset,
1074 char *data, size_t len); 1089 char *data, size_t len);
1075int btrfs_csum_verify_file_block(struct btrfs_root *root, 1090int btrfs_csum_verify_file_block(struct btrfs_root *root,
1076 u64 objectid, u64 offset, 1091 u64 objectid, u64 offset,