]> sourceware.org Git - lvm2.git/commitdiff
raid: reject message for 2-legged raid4/5 -> striped
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 8 Nov 2017 17:17:26 +0000 (18:17 +0100)
committerHeinz Mauelshagen <heinzm@redhat.com>
Wed, 8 Nov 2017 17:17:26 +0000 (18:17 +0100)
Commit 763db8aab02d7df551a3e8500d261ef6c9651bdb rejects 2-legged
conversions to striped/raid0 but different messages are displayed
for raid0 or striped. This commit provides the same rejection messages.

lib/metadata/raid_manip.c

index 816c6d4dc3edf00e12c5dbf8e4aa47a4da367f55..a9046664090f0f60a2753cfac18a9f12e2d0e505 100644 (file)
@@ -6424,7 +6424,7 @@ int lv_raid_convert(struct logical_volume *lv,
        stripe_size = new_stripe_size_supplied ? new_stripe_size : seg->stripe_size;
 
        if (segtype_is_striped(new_segtype))
-               new_image_count = stripes ? : seg->area_count;
+               new_image_count = stripes > 1 ? stripes : seg->area_count;
 
        if (!_check_max_raid_devices(new_image_count))
                return_0;
This page took 0.095788 seconds and 5 git commands to generate.