This array is used to record attributes of each raid type,
make it public, and many functions will benifit with this array.
For example, num_tolerated_disk_barrier_failures(), we can
avoid complex conditions in this function, and get raid attribute
simply by accessing above array.
It can also make code logic simple, reduce duplication code, and
increase maintainability.
We can also add more raid attributes in this array, to make it
widely used.
Zhao Lei (3):
btrfs: Move btrfs_raid_array to public
btrfs: use btrfs_raid_array for
btrfs_get_num_tolerated_disk_barrier_failures()
btrfs: use btrfs_raid_array in btrfs_reduce_alloc_profile
fs/btrfs/disk-io.c | 35 ++++++++-----
fs/btrfs/extent-tree.c | 48 ++++++++----------
fs/btrfs/volumes.c | 135 ++++++++++++++++++++++++++++---------------------
fs/btrfs/volumes.h | 5 ++
4 files changed, 125 insertions(+), 98 deletions(-)
--
1.8.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html