Btrfs: rework csums and extent item ordering
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
committed by
David Woodhouse
parent
b18c668581
commit
70b2befd0c
@@ -44,14 +44,14 @@ extern struct kmem_cache *btrfs_path_cachep;
|
||||
*/
|
||||
struct btrfs_disk_key {
|
||||
__le64 objectid;
|
||||
__le64 offset;
|
||||
__le32 flags;
|
||||
__le64 offset;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct btrfs_key {
|
||||
u64 objectid;
|
||||
u64 offset;
|
||||
u32 flags;
|
||||
u64 offset;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
/*
|
||||
@@ -227,7 +227,6 @@ struct btrfs_file_extent_item {
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct btrfs_csum_item {
|
||||
__le64 extent_offset;
|
||||
u8 csum[BTRFS_CSUM_SIZE];
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
@@ -925,17 +924,6 @@ 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);
|
||||
@@ -1091,7 +1079,6 @@ 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,
|
||||
|
Reference in New Issue
Block a user