diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2015-05-27 16:18:45 +0200 |
---|---|---|
committer | Heinz Mauelshagen <heinzm@redhat.com> | 2015-05-27 16:18:45 +0200 |
commit | 1263c8b27a66548002044332734d7bf982c046a8 (patch) | |
tree | 1d573a03d9b2568f211d3e17b700b09323091442 | |
parent | 335df83056f601040f03e2be0d9363bb4526a9ea (diff) | |
parent | 7eb268614fd9b92db208dc6943532b15f9fe51f3 (diff) | |
download | lvm2-1263c8b27a66548002044332734d7bf982c046a8.tar.gz |
Merge branch 'dev-lvmguy-raid-takeover-reshape-resize_work' into dev-lvmguy-raid-takeover-reshape-resize
-rw-r--r-- | lib/metadata/raid_manip.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 80d8d5e4c..37987281d 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -3808,20 +3808,17 @@ static int _convert_linear_or_raid0_to_raid0145(struct logical_volume *lv, /* raid1 <-> raid10/4/5 with 2 images */ else if ((convert = ((seg_is_raid1(seg) || seg_is_raid4(seg) || seg_is_any_raid5(seg)) && - (segtype_is_raid1(new_segtype) || - segtype_is_raid10(new_segtype) || - segtype_is_raid4(new_segtype) || - segtype_is_any_raid5(new_segtype))))) { + seg->area_count == 2 && + !new_stripes && + (segtype_is_raid1(new_segtype) || + segtype_is_raid10(new_segtype) || + segtype_is_raid4(new_segtype) || + segtype_is_any_raid5(new_segtype))))) { if (seg->segtype == new_segtype) { log_error("No change requested"); return 0; } - if (seg->area_count != 2) { - log_error("Can't convert unless 2 images"); - return 0; - } - if (new_image_count != 2) log_warn("Ignoring new image count"); @@ -3836,8 +3833,8 @@ static int _convert_linear_or_raid0_to_raid0145(struct logical_volume *lv, return lv_update_and_reload(lv); /* raid10 with 2 images -> raid1 with 2 images */ - } else if ((convert = (seg_is_raid10(seg) && seg->area_count == 2 && - segtype_is_raid1(new_segtype)))) { + } else if (seg_is_raid10(seg) && seg->area_count == 2 && + segtype_is_raid1(new_segtype)) { seg->segtype = new_segtype; return lv_update_and_reload(lv); |