]> sourceware.org Git - lvm2.git/commitdiff
lv_manip: extension of raid0 causes livelock
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 13 Jul 2016 13:16:23 +0000 (15:16 +0200)
committerHeinz Mauelshagen <heinzm@redhat.com>
Wed, 13 Jul 2016 13:17:24 +0000 (15:17 +0200)
A livelock occurs on extension in lv_manip when adjusting the region size,
which doesn't apply to any raid0/raid0_meta LVs (these don't have a bitmap).

Fix by prohibiting the region size adjustment on any such LVs.

- resolves rhbz1354604

lib/metadata/lv_manip.c

index 5cf96181bbbfd1751c1e7aa2a02429eda3cf5da2..d11b1259f5bf1eec84515956d4a0fc1b145e6639 100644 (file)
@@ -3921,14 +3921,16 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
 
        /*
         * The MD bitmap is limited to being able to track 2^21 regions.
-        * The region_size must be adjusted to meet that criteria.
+        * The region_size must be adjusted to meet that criteria
+        * unless raid0/raid0_meta, which doesn't have a bitmap.
         */
-       while (seg_is_raid(seg) && (seg->region_size < (lv->size / (1 << 21)))) {
-               seg->region_size *= 2;
-               log_very_verbose("Adjusting RAID region_size from %uS to %uS"
-                                " to support large LV size",
-                                seg->region_size/2, seg->region_size);
-       }
+       if (seg_is_raid(seg) && !seg_is_any_raid0(seg))
+               while (seg->region_size < (lv->size / (1 << 21))) {
+                       seg->region_size *= 2;
+                       log_very_verbose("Adjusting RAID region_size from %uS to %uS"
+                                        " to support large LV size",
+                                        seg->region_size/2, seg->region_size);
+               }
 
        return 1;
 }
This page took 0.049453 seconds and 5 git commands to generate.