]> sourceware.org Git - lvm2.git/commitdiff
raid: query lock holder
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 21 Oct 2014 08:53:56 +0000 (10:53 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 24 Oct 2014 14:39:31 +0000 (16:39 +0200)
Ask for lock the proper LV.
Use the top-most LV to query for locally exclusive lock.

The rest of operations are then using 'lv_info()'

TODO:
  Check all devices are reloaded from proper level.
  In general any query on lv_is_active is supposed to be running
  ona lv_lock_holder() volume.

WHATS_NEW
lib/metadata/raid_manip.c
tools/lvconvert.c

index 8b9cf6f09339f859414dc10d9eb6781fa87084fb..3b525959734fbb627b5bc70aedd5e8098b5997ac 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.112 - 
 =====================================
+  Query lock holding LV when replacing and converting raid volumes.
   Add extra validate for locked lv within validate_lv_cache_create().
   Add internal lvseg_name() function.
   Skip trying to file lock virtual internal vg name.
index 821998473a634cc16671577c695ac59ad71d4090..5237dc9097cb4768c3e2acce686636fab0cf02db 100644 (file)
@@ -1555,7 +1555,7 @@ int lv_raid_replace(struct logical_volume *lv,
        if (lv->status & PARTIAL_LV)
                lv->vg->cmd->partial_activation = 1;
 
-       if (!lv_is_active_exclusive_locally(lv)) {
+       if (!lv_is_active_exclusive_locally(lv_lock_holder(lv))) {
                log_error("%s/%s must be active %sto perform this operation.",
                          lv->vg->name, lv->name,
                          vg_is_clustered(lv->vg) ? "exclusive locally " : "");
index e976880f2b632231194019961ed8b497c288e941..fc2884663cfb03aa40e7be8d157bf8f84677d380 100644 (file)
@@ -1902,7 +1902,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
                return lv_raid_replace(lv, lp->replace_pvh, lp->pvh);
 
        if (arg_count(cmd, repair_ARG)) {
-               if (!lv_is_active_exclusive_locally(lv)) {
+               if (!lv_is_active_exclusive_locally(lv_lock_holder(lv))) {
                        log_error("%s/%s must be active %sto perform this"
                                  " operation.", lv->vg->name, lv->name,
                                  vg_is_clustered(lv->vg) ?
This page took 0.052785 seconds and 5 git commands to generate.