Commit f04fbcc6 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

btrfs: move definition of btrfs_raid_types to volumes.h

It's only internally used as another way to represent btrfs profiles,
it's not exposed through any on-disk format, in fact this
btrfs_raid_types is diverted from the on-disk format values.

Furthermore, since it's internal structure, its definition can change in
the future.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 385de0ef
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#ifndef BTRFS_SPACE_INFO_H #ifndef BTRFS_SPACE_INFO_H
#define BTRFS_SPACE_INFO_H #define BTRFS_SPACE_INFO_H
#include "volumes.h"
struct btrfs_space_info { struct btrfs_space_info {
spinlock_t lock; spinlock_t lock;
......
...@@ -17,6 +17,19 @@ extern struct mutex uuid_mutex; ...@@ -17,6 +17,19 @@ extern struct mutex uuid_mutex;
#define BTRFS_STRIPE_LEN SZ_64K #define BTRFS_STRIPE_LEN SZ_64K
enum btrfs_raid_types {
BTRFS_RAID_RAID10,
BTRFS_RAID_RAID1,
BTRFS_RAID_DUP,
BTRFS_RAID_RAID0,
BTRFS_RAID_SINGLE,
BTRFS_RAID_RAID5,
BTRFS_RAID_RAID6,
BTRFS_RAID_RAID1C3,
BTRFS_RAID_RAID1C4,
BTRFS_NR_RAID_TYPES
};
struct btrfs_io_geometry { struct btrfs_io_geometry {
/* remaining bytes before crossing a stripe */ /* remaining bytes before crossing a stripe */
u64 len; u64 len;
......
...@@ -880,19 +880,6 @@ struct btrfs_dev_replace_item { ...@@ -880,19 +880,6 @@ struct btrfs_dev_replace_item {
#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \ #define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
BTRFS_SPACE_INFO_GLOBAL_RSV) BTRFS_SPACE_INFO_GLOBAL_RSV)
enum btrfs_raid_types {
BTRFS_RAID_RAID10,
BTRFS_RAID_RAID1,
BTRFS_RAID_DUP,
BTRFS_RAID_RAID0,
BTRFS_RAID_SINGLE,
BTRFS_RAID_RAID5,
BTRFS_RAID_RAID6,
BTRFS_RAID_RAID1C3,
BTRFS_RAID_RAID1C4,
BTRFS_NR_RAID_TYPES
};
#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \ #define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \
BTRFS_BLOCK_GROUP_SYSTEM | \ BTRFS_BLOCK_GROUP_SYSTEM | \
BTRFS_BLOCK_GROUP_METADATA) BTRFS_BLOCK_GROUP_METADATA)
......
Markdown is supported
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