X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ctree.h;h=c76849d8deb79336ce225b8e3aa66e10e7ee5754;hb=e02049d964e77d22348bf940a7027a1aff558f18;hp=2b7e071cbf06907e08fbd1921e4f89e1105e3749;hpb=f1bc62184661120e1a8820b063718aa0f8c9893d;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/ctree.h b/ctree.h index 2b7e071..c76849d 100644 --- a/ctree.h +++ b/ctree.h @@ -958,7 +958,17 @@ struct btrfs_csum_item { #define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7) #define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8) #define BTRFS_BLOCK_GROUP_RESERVED BTRFS_AVAIL_ALLOC_BIT_SINGLE -#define BTRFS_NR_RAID_TYPES 7 + +enum btrfs_raid_types { + BTRFS_RAID_RAID10, + BTRFS_RAID_RAID1, + BTRFS_RAID_DUP, + BTRFS_RAID_RAID0, + BTRFS_RAID_SINGLE, + BTRFS_RAID_RAID5, + BTRFS_RAID_RAID6, + BTRFS_NR_RAID_TYPES +}; #define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \ BTRFS_BLOCK_GROUP_SYSTEM | \ @@ -1857,7 +1867,7 @@ static inline u32 btrfs_item_end_nr(struct extent_buffer *eb, int nr) return btrfs_item_end(eb, btrfs_item_nr(nr)); } -static inline u32 btrfs_item_offset_nr(struct extent_buffer *eb, int nr) +static inline u32 btrfs_item_offset_nr(const struct extent_buffer *eb, int nr) { return btrfs_item_offset(eb, btrfs_item_nr(nr)); }