Skip to content
Commit 8789f4fe authored by Zhao Lei's avatar Zhao Lei Committed by David Sterba
Browse files

btrfs: use btrfs_raid_array for btrfs_get_num_tolerated_disk_barrier_failures()



btrfs_raid_array[] is used to define all raid attributes, use it
to get tolerated_failures in btrfs_get_num_tolerated_disk_barrier_failures(),
instead of complex condition in function.

It can make code simple and auto-support other possible raid-type in
future.

Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent af902047
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment