]> sourceware.org Git - lvm2.git/commitdiff
raid: fix activation of tracked image
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 14 Dec 2016 20:47:38 +0000 (21:47 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 18 Dec 2016 18:10:38 +0000 (19:10 +0100)
Activation of raid has brough up also splitted image with tracing
(without taking lock for this).

So when raid is now activate - such image is not put into
table (with _rmeta).  When user needs such device, just active it.

WHATS_NEW
lib/activate/dev_manager.c
lib/metadata/metadata-exported.h

index 4ac33773bc2f17d2d687f2fee9456f7c80573e25..eee6e98eda2d836e48ab510ec23066b1e126597f 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,8 +1,9 @@
 Version 2.02.169 - 
 =====================================
+  Fix table load for splitted RAID LV and require explicit activation.
   Always active splitted RAID LV exclusively locally.
   Do not use LV RAID status bit for segment status.
-  Check segtype directly instead of checking RAID in segment status. 
+  Check segtype directly instead of checking RAID in segment status.
   Reusing exiting code for raid image removal.
   Fix pvmove leaving -pvmove0 error device in clustered VG.
   Avoid adding extra '_' at end of raid extracted images or metadata.
index 581e90088c59e1a52a3a24408df9d0c5ff209306..8245454dbba72010469a30255b70824353e391fc 100644 (file)
@@ -2681,12 +2681,15 @@ static int _add_segment_to_dtree(struct dev_manager *dm,
        /* Add any LVs used by this segment */
        for (s = 0; s < seg->area_count; ++s) {
                if ((seg_type(seg, s) == AREA_LV) &&
+                   /* do not bring up tracked image */
+                   !lv_is_raid_image_with_tracking(seg_lv(seg, s)) &&
                    /* origin only for cache without pending delete */
                    (!dm->track_pending_delete || !seg_is_cache(seg)) &&
                    !_add_new_lv_to_dtree(dm, dtree, seg_lv(seg, s),
                                          laopts, NULL))
                        return_0;
                if (seg_is_raid_with_meta(seg) && seg->meta_areas && seg_metalv(seg, s) &&
+                   !lv_is_raid_image_with_tracking(seg_lv(seg, s)) &&
                    !_add_new_lv_to_dtree(dm, dtree, seg_metalv(seg, s),
                                          laopts, NULL))
                        return_0;
index 4bf466b1f8ac4dc82e8e48e08221f841adaffde8..aa40c6c1e3de8cb43134eebf821fd0cbefe8d420 100644 (file)
 
 #define lv_is_raid(lv)         (((lv)->status & RAID) ? 1 : 0)
 #define lv_is_raid_image(lv)   (((lv)->status & RAID_IMAGE) ? 1 : 0)
+#define lv_is_raid_image_with_tracking(lv)     ((lv_is_raid_image(lv) && !((lv)->status & LVM_WRITE)) ? 1 : 0)
 #define lv_is_raid_metadata(lv)        (((lv)->status & RAID_META) ? 1 : 0)
 #define lv_is_raid_type(lv)    (((lv)->status & (RAID | RAID_IMAGE | RAID_META)) ? 1 : 0)
 
This page took 0.053343 seconds and 5 git commands to generate.