]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Move btrfs_raid_array to public
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 15 Sep 2015 13:08:06 +0000 (21:08 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Oct 2015 16:28:48 +0000 (18:28 +0200)
commit10f8a055614448ec716820566ba87ca9bc115e13
treed9be3362b1840eb3d1abdeb7b3165e11d836322d
parent73fd2bd6bd4b72c84757c96e494002067ab7e5cf
btrfs: Move btrfs_raid_array to public

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.

Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h