]> sourceware.org Git - lvm2.git/commitdiff
cache: wipe cache-pool before reuse
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 2 Nov 2014 18:41:46 +0000 (19:41 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 3 Nov 2014 13:19:33 +0000 (14:19 +0100)
Before we reuse cache-pool - we need to ensure metadata volume
has wiped header.

lib/metadata/lv_manip.c

index a42a7f5f6d554da3fea72e6098e6d3c93d39518e..b5fc84ad4f383016468bbbc7c0105e243e187939 100644 (file)
@@ -6678,6 +6678,10 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
                                lp->extents = size;
                        }
                }
+
+               if (seg_is_cache(lp) &&
+                   !wipe_cache_pool(pool_lv))
+                       return_NULL;
        }
 
        /* Resolve origin volume */
This page took 0.040311 seconds and 5 git commands to generate.