1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

commands: recognize raid variations

This commit is contained in:
David Teigland 2017-02-06 11:51:06 -06:00
parent c3faa5816d
commit 2224b6a701
2 changed files with 7 additions and 11 deletions

View File

@ -21,7 +21,7 @@ lvt(thinpool_LVT, "thinpool", NULL)
lvt(cache_LVT, "cache", NULL)
lvt(cachepool_LVT, "cachepool", NULL)
lvt(mirror_LVT, "mirror", NULL)
lvt(raid_LVT, "raid", NULL)
lvt(raid_LVT, "raid", NULL) /* any raid type */
lvt(raid0_LVT, "raid0", NULL)
lvt(raid1_LVT, "raid1", NULL)
lvt(raid4_LVT, "raid4", NULL)

View File

@ -2515,17 +2515,15 @@ static int _lv_is_type(struct cmd_context *cmd, struct logical_volume *lv, int l
case raid_LVT:
return lv_is_raid(lv);
case raid0_LVT:
return seg_is_raid0(seg);
return seg_is_any_raid0(seg);
case raid1_LVT:
return seg_is_raid1(seg);
case raid4_LVT:
return seg_is_raid4(seg);
#if 0
case raid5_LVT:
return seg_is_raid5(seg);
return seg_is_any_raid5(seg);
case raid6_LVT:
return seg_is_raid6(seg);
#endif
return seg_is_any_raid6(seg);
case raid10_LVT:
return seg_is_raid10(seg);
case error_LVT:
@ -2566,18 +2564,16 @@ int get_lvt_enum(struct logical_volume *lv)
return mirror_LVT;
if (lv_is_raid(lv))
return raid_LVT;
if (seg_is_raid0(seg))
if (seg_is_any_raid0(seg))
return raid0_LVT;
if (seg_is_raid1(seg))
return raid1_LVT;
if (seg_is_raid4(seg))
return raid4_LVT;
#if 0
if (seg_is_raid5(seg))
if (seg_is_any_raid5(seg))
return raid5_LVT;
if (seg_is_raid6(seg))
if (seg_is_any_raid6(seg))
return raid6_LVT;
#endif
if (seg_is_raid10(seg))
return raid10_LVT;