btrfs: remove raid-stripe-tree encoding field from stripe_extent
Remove the encoding field from 'struct btrfs_stripe_extent'. It was originally intended to encode the RAID type as well as if we're a data or a parity stripe. But the RAID type can be inferred form the block-group and the data vs. parity differentiation can be done easier with adding a new key type for parity stripes in the RAID stripe tree. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
e2c1887329
commit
2422547e99
@@ -747,21 +747,9 @@ struct btrfs_raid_stride {
|
||||
__le64 physical;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
/* The stripe_extent::encoding, 1:1 mapping of enum btrfs_raid_types. */
|
||||
#define BTRFS_STRIPE_RAID0 1
|
||||
#define BTRFS_STRIPE_RAID1 2
|
||||
#define BTRFS_STRIPE_DUP 3
|
||||
#define BTRFS_STRIPE_RAID10 4
|
||||
#define BTRFS_STRIPE_RAID5 5
|
||||
#define BTRFS_STRIPE_RAID6 6
|
||||
#define BTRFS_STRIPE_RAID1C3 7
|
||||
#define BTRFS_STRIPE_RAID1C4 8
|
||||
|
||||
struct btrfs_stripe_extent {
|
||||
__u8 encoding;
|
||||
__u8 reserved[7];
|
||||
/* An array of raid strides this stripe is composed of. */
|
||||
struct btrfs_raid_stride strides[];
|
||||
__DECLARE_FLEX_ARRAY(struct btrfs_raid_stride, strides);
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
#define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0)
|
||||
|
||||
Reference in New Issue
Block a user