aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-17 15:39:32 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-17 15:39:32 -0400
commit70b2befd0c8a4064715d8b340270650cc9d15af8 (patch)
tree81171607c9ddf501e5c0233dc24d20d1a5b19858 /fs/btrfs/ctree.h
parentb18c6685810af8e6763760711aece31ccc7a8ea8 (diff)
Btrfs: rework csums and extent item ordering
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ca3ab160f460..d75a4d5bc010 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -44,14 +44,14 @@ extern struct kmem_cache *btrfs_path_cachep;
44 */ 44 */
45struct btrfs_disk_key { 45struct btrfs_disk_key {
46 __le64 objectid; 46 __le64 objectid;
47 __le64 offset;
48 __le32 flags; 47 __le32 flags;
48 __le64 offset;
49} __attribute__ ((__packed__)); 49} __attribute__ ((__packed__));
50 50
51struct btrfs_key { 51struct btrfs_key {
52 u64 objectid; 52 u64 objectid;
53 u64 offset;
54 u32 flags; 53 u32 flags;
54 u64 offset;
55} __attribute__ ((__packed__)); 55} __attribute__ ((__packed__));
56 56
57/* 57/*
@@ -227,7 +227,6 @@ 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;
231 u8 csum[BTRFS_CSUM_SIZE]; 230 u8 csum[BTRFS_CSUM_SIZE];
232} __attribute__ ((__packed__)); 231} __attribute__ ((__packed__));
233 232
@@ -925,17 +924,6 @@ static inline void btrfs_set_file_extent_num_blocks(struct
925 e->num_blocks = cpu_to_le64(val); 924 e->num_blocks = cpu_to_le64(val);
926} 925}
927 926
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
939static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d) 927static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d)
940{ 928{
941 return le16_to_cpu(d->pathlen); 929 return le16_to_cpu(d->pathlen);
@@ -1091,7 +1079,6 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
1091int btrfs_csum_file_block(struct btrfs_trans_handle *trans, 1079int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
1092 struct btrfs_root *root, 1080 struct btrfs_root *root,
1093 u64 objectid, u64 offset, 1081 u64 objectid, u64 offset,
1094 u64 extent_offset,
1095 char *data, size_t len); 1082 char *data, size_t len);
1096int btrfs_csum_verify_file_block(struct btrfs_root *root, 1083int btrfs_csum_verify_file_block(struct btrfs_root *root,
1097 u64 objectid, u64 offset, 1084 u64 objectid, u64 offset,