diff options
author | Anand Jain <anand.jain@oracle.com> | 2018-04-25 19:01:42 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:07:27 +0200 |
commit | ed23467b180421d37f9a6ce26c8fa8f03aef0a4a (patch) | |
tree | e98b2cdba98f47148d52c45a54c4b171228ac266 /fs/btrfs/volumes.h | |
parent | b545993694a6e3bf6e801071df00e0ad47526bb8 (diff) | |
download | linux-stable-ed23467b180421d37f9a6ce26c8fa8f03aef0a4a.tar.gz linux-stable-ed23467b180421d37f9a6ce26c8fa8f03aef0a4a.tar.bz2 linux-stable-ed23467b180421d37f9a6ce26c8fa8f03aef0a4a.zip |
btrfs: move btrfs_raid_type_names values to btrfs_raid_attr table
Add a new member struct btrfs_raid_attr::raid_name so that
btrfs_raid_array can maintain the name of the raid type, and so we can
drop btrfs_raid_type_names.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 5737e6e68f8b..9056a900aace 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -329,6 +329,7 @@ struct btrfs_raid_attr { 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 */ + const char raid_name[8]; /* name of the raid */ }; extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES]; @@ -550,6 +551,8 @@ static inline enum btrfs_raid_types btrfs_bg_flags_to_raid_index(u64 flags) return BTRFS_RAID_SINGLE; /* BTRFS_BLOCK_GROUP_SINGLE */ } +const char *get_raid_name(enum btrfs_raid_types type); + void btrfs_update_commit_device_size(struct btrfs_fs_info *fs_info); void btrfs_update_commit_device_bytes_used(struct btrfs_transaction *trans); |