Loading fs/btrfs/volumes.c +15 −0 Original line number Original line Diff line number Diff line Loading @@ -118,6 +118,21 @@ const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { [BTRFS_RAID_RAID6] = BTRFS_BLOCK_GROUP_RAID6, [BTRFS_RAID_RAID6] = BTRFS_BLOCK_GROUP_RAID6, }; }; /* * Table to convert BTRFS_RAID_* to the error code if minimum number of devices * condition is not met. Zero means there's no corresponding * BTRFS_ERROR_DEV_*_NOT_MET value. */ const int btrfs_raid_mindev_error[BTRFS_NR_RAID_TYPES] = { [BTRFS_RAID_RAID10] = BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET, [BTRFS_RAID_RAID1] = BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET, [BTRFS_RAID_DUP] = 0, [BTRFS_RAID_RAID0] = 0, [BTRFS_RAID_SINGLE] = 0, [BTRFS_RAID_RAID5] = BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET, [BTRFS_RAID_RAID6] = BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET, }; static int init_first_rw_device(struct btrfs_trans_handle *trans, static int init_first_rw_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_root *root, struct btrfs_device *device); struct btrfs_device *device); Loading fs/btrfs/volumes.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -340,7 +340,7 @@ struct btrfs_raid_attr { }; }; extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES]; extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES]; extern const int btrfs_raid_mindev_error[BTRFS_NR_RAID_TYPES]; extern const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES]; extern const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES]; struct map_lookup { struct map_lookup { Loading Loading
fs/btrfs/volumes.c +15 −0 Original line number Original line Diff line number Diff line Loading @@ -118,6 +118,21 @@ const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { [BTRFS_RAID_RAID6] = BTRFS_BLOCK_GROUP_RAID6, [BTRFS_RAID_RAID6] = BTRFS_BLOCK_GROUP_RAID6, }; }; /* * Table to convert BTRFS_RAID_* to the error code if minimum number of devices * condition is not met. Zero means there's no corresponding * BTRFS_ERROR_DEV_*_NOT_MET value. */ const int btrfs_raid_mindev_error[BTRFS_NR_RAID_TYPES] = { [BTRFS_RAID_RAID10] = BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET, [BTRFS_RAID_RAID1] = BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET, [BTRFS_RAID_DUP] = 0, [BTRFS_RAID_RAID0] = 0, [BTRFS_RAID_SINGLE] = 0, [BTRFS_RAID_RAID5] = BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET, [BTRFS_RAID_RAID6] = BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET, }; static int init_first_rw_device(struct btrfs_trans_handle *trans, static int init_first_rw_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_root *root, struct btrfs_device *device); struct btrfs_device *device); Loading
fs/btrfs/volumes.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -340,7 +340,7 @@ struct btrfs_raid_attr { }; }; extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES]; extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES]; extern const int btrfs_raid_mindev_error[BTRFS_NR_RAID_TYPES]; extern const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES]; extern const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES]; struct map_lookup { struct map_lookup { Loading