mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
raid: Detect whether or not kernel supports raid0.
This commit is contained in:
parent
4a74e19f80
commit
028715b0f0
@ -60,6 +60,7 @@ struct dev_manager;
|
|||||||
#define SEG_TYPE_NAME_FREE "free"
|
#define SEG_TYPE_NAME_FREE "free"
|
||||||
#define SEG_TYPE_NAME_ZERO "zero"
|
#define SEG_TYPE_NAME_ZERO "zero"
|
||||||
#define SEG_TYPE_NAME_RAID "raid"
|
#define SEG_TYPE_NAME_RAID "raid"
|
||||||
|
#define SEG_TYPE_NAME_RAID0 "raid0"
|
||||||
#define SEG_TYPE_NAME_RAID1 "raid1"
|
#define SEG_TYPE_NAME_RAID1 "raid1"
|
||||||
#define SEG_TYPE_NAME_RAID10 "raid10"
|
#define SEG_TYPE_NAME_RAID10 "raid10"
|
||||||
#define SEG_TYPE_NAME_RAID4 "raid4"
|
#define SEG_TYPE_NAME_RAID4 "raid4"
|
||||||
@ -205,6 +206,8 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
|
|||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
#define RAID_FEATURE_RAID10 (1U << 0) /* version 1.3 */
|
#define RAID_FEATURE_RAID10 (1U << 0) /* version 1.3 */
|
||||||
|
#define RAID_FEATURE_RAID0 (1U << 1) /* version 1.7 */
|
||||||
|
#define RAID_FEATURE_RESHAPING (1U << 2) /* version 1.8 */
|
||||||
|
|
||||||
#ifdef RAID_INTERNAL
|
#ifdef RAID_INTERNAL
|
||||||
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
||||||
|
@ -331,6 +331,7 @@ static int _raid_target_present(struct cmd_context *cmd,
|
|||||||
const char *feature;
|
const char *feature;
|
||||||
} _features[] = {
|
} _features[] = {
|
||||||
{ 1, 3, RAID_FEATURE_RAID10, SEG_TYPE_NAME_RAID10 },
|
{ 1, 3, RAID_FEATURE_RAID10, SEG_TYPE_NAME_RAID10 },
|
||||||
|
{ 1, 7, RAID_FEATURE_RAID0, SEG_TYPE_NAME_RAID0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int _raid_checked = 0;
|
static int _raid_checked = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user