summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2017-02-03 22:16:00 +0100
committerHeinz Mauelshagen <heinzm@redhat.com>2017-02-03 22:16:35 +0100
commit7e92535d475da7403f2ec8eeb2c5af6209fa2ba8 (patch)
tree94f052a9f1960a0a5266f2116e8d2eb73e3f3516
parent60ddd05f163cbf53670e5c8deabfc384168eae0f (diff)
downloadlvm2-7e92535d475da7403f2ec8eeb2c5af6209fa2ba8.tar.gz
lvconvert: add segtype raid5_n and conversions to/from it
Change: - missed a return_0 - use lvseg_name() rather than my own function Related: rhbz1366296
-rw-r--r--lib/metadata/raid_manip.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index f845164b1..3543a6917 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -2227,7 +2227,7 @@ static int _convert_raid1_to_mirror(struct logical_volume *lv,
log_debug_metadata("Changing image count to %u on %s.",
new_image_count, display_lvname(lv));
if (!_lv_raid_change_image_count(lv, new_image_count, allocate_pvs, removal_lvs, 0, 0))
- return 0;
+ return_0;
}
/* Remove rmeta LVs */
@@ -2703,15 +2703,6 @@ static const char *_get_segtype_alias(const struct segment_type *segtype)
return "";
}
-/* Return "linear" for striped segtype with 1 area instead of "striped" */
-static const char *_get_segtype_name(const struct segment_type *segtype, unsigned new_image_count)
-{
- if (!segtype || (segtype_is_striped(segtype) && new_image_count == 1))
- return "linear";
-
- return segtype->name;
-}
-
static int _log_possible_conversion_types(const struct logical_volume *lv, const struct segment_type *new_segtype)
{
unsigned possible_conversions = 0;
@@ -2732,7 +2723,7 @@ static int _log_possible_conversion_types(const struct logical_volume *lv, const
log_error("Converting %s from %s%s%s%s is "
"directly possible to the following layout%s:",
- display_lvname(lv), _get_segtype_name(seg->segtype, seg->area_count),
+ display_lvname(lv), lvseg_name(seg),
*alias ? " (same as " : "", alias, *alias ? ")" : "",
possible_conversions > 1 ? "s" : "");