It's only internally used as another way to represent btrfs profiles, it's not exposed through any on-disk format, in fact this btrfs_raid_types is diverted from the on-disk format values. Furthermore, since it's internal structure, its definition can change in the future.
Unified · Split
| @@ -3,6 +3,8 @@ · 2 unmodified lines | |||
| 3 | #ifndef BTRFS_SPACE_INFO_H | 3 | #ifndef BTRFS_SPACE_INFO_H |
| 4 | #define BTRFS_SPACE_INFO_H | 4 | #define BTRFS_SPACE_INFO_H |
| 5 | 5 | ||
| 6 | #include "volumes.h" | ||
| 7 | |||
| 6 | struct btrfs_space_info { | 8 | struct btrfs_space_info { |
| 7 | spinlock_t lock; | 9 | spinlock_t lock; |
| 8 | 10 | ||
| @@ -17,6 +17,19 @@ extern struct mutex uuid_mutex; · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | #define BTRFS_STRIPE_LEN SZ_64K | 18 | #define BTRFS_STRIPE_LEN SZ_64K |
| 19 | 19 | ||
| 20 | enum btrfs_raid_types { | ||
| 21 | BTRFS_RAID_RAID10, | ||
| 22 | BTRFS_RAID_RAID1, | ||
| 23 | BTRFS_RAID_DUP, | ||
| 24 | BTRFS_RAID_RAID0, | ||
| 25 | BTRFS_RAID_SINGLE, | ||
| 26 | BTRFS_RAID_RAID5, | ||
| 27 | BTRFS_RAID_RAID6, | ||
| 28 | BTRFS_RAID_RAID1C3, | ||
| 29 | BTRFS_RAID_RAID1C4, | ||
| 30 | BTRFS_NR_RAID_TYPES | ||
| 31 | }; | ||
| 32 | |||
| 20 | struct btrfs_io_geometry { | 33 | struct btrfs_io_geometry { |
| 21 | /* remaining bytes before crossing a stripe */ | 34 | /* remaining bytes before crossing a stripe */ |
| 22 | u64 len; | 35 | u64 len; |
| @@ -880,19 +880,6 @@ struct btrfs_dev_replace_item { · 879 unmodified lines | |||
| 880 | #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \ | 880 | #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \ |
| 881 | BTRFS_SPACE_INFO_GLOBAL_RSV) | 881 | BTRFS_SPACE_INFO_GLOBAL_RSV) |
| 882 | 882 | ||
| 883 | enum btrfs_raid_types { | ||
| 884 | BTRFS_RAID_RAID10, | ||
| 885 | BTRFS_RAID_RAID1, | ||
| 886 | BTRFS_RAID_DUP, | ||
| 887 | BTRFS_RAID_RAID0, | ||
| 888 | BTRFS_RAID_SINGLE, | ||
| 889 | BTRFS_RAID_RAID5, | ||
| 890 | BTRFS_RAID_RAID6, | ||
| 891 | BTRFS_RAID_RAID1C3, | ||
| 892 | BTRFS_RAID_RAID1C4, | ||
| 893 | BTRFS_NR_RAID_TYPES | ||
| 894 | }; | ||
| 895 | |||
| 896 | #define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \ | 883 | #define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \ |
| 897 | BTRFS_BLOCK_GROUP_SYSTEM | \ | 884 | BTRFS_BLOCK_GROUP_SYSTEM | \ |
| 898 | BTRFS_BLOCK_GROUP_METADATA) | 885 | BTRFS_BLOCK_GROUP_METADATA) |