From 8789f4fe608922f484369382a8e507ca12df7f4e Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Tue, 15 Sep 2015 21:08:07 +0800 Subject: 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: David Sterba Signed-off-by: Zhao Lei Signed-off-by: David Sterba --- fs/btrfs/volumes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs/volumes.h') diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 75d6083d9b3b..04ff0efe2f58 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -334,6 +334,7 @@ struct btrfs_raid_attr { int dev_stripes; /* stripes per dev */ int devs_max; /* max devs to use */ int devs_min; /* min devs needed */ + int tolerated_failures; /* max tolerated fail devs */ int devs_increment; /* ndevs has to be a multiple of this */ int ncopies; /* how many copies to data has */ }; -- cgit v1.2.3