summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-09-15 21:08:07 +0800
committerDavid Sterba <dsterba@suse.com>2015-10-21 18:28:48 +0200
commit8789f4fe608922f484369382a8e507ca12df7f4e (patch)
treed956b1ad487ffd551896bced20525bb973088ba2 /fs/btrfs/volumes.h
parentaf902047508d3619499cbbc2f7c4c5e16428b2e3 (diff)
downloadlinux-8789f4fe608922f484369382a8e507ca12df7f4e.tar.bz2
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 <dsterba@suse.com> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h1
1 files changed, 1 insertions, 0 deletions
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 */
};