]> sourceware.org Git - lvm2.git/commitdiff
If other process finishes (or aborts) pvmove operation and
authorMilan Broz <mbroz@redhat.com>
Wed, 19 Jan 2011 23:11:39 +0000 (23:11 +0000)
committerMilan Broz <mbroz@redhat.com>
Wed, 19 Jan 2011 23:11:39 +0000 (23:11 +0000)
polling function cannot find any lv with PVMOVE flag, return
success and do not print  "aborting" message.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=602389

WHATS_NEW
tools/polldaemon.c

index 2dd3ddadb0cb52f600ecd35d5532b5492d245a3f..5cc5e007bdfdf9cc71eb3a084160e7435651bd4c 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -2,6 +2,7 @@ Version 2.02.82 -
 ===================================
   Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.
   Fix possible clvmd DLM lockspace increasing reference count.
+  Do not fail polling if pvmove finished in another process.
 
 Version 2.02.81 - 17th January 2011
 ===================================
index aac9c17fabc5717944282e4b5c21a6e185f8ac34..94e52a3da4e9397c5525cc238ea307f8770fb921 100644 (file)
@@ -193,8 +193,16 @@ static int _wait_for_single_lv(struct cmd_context *cmd, const char *name, const
                        return 0;
                }
 
-               if (!(lv = parms->poll_fns->get_copy_lv(cmd, vg, name, uuid,
-                                                       parms->lv_type))) {
+               lv = parms->poll_fns->get_copy_lv(cmd, vg, name, uuid, parms->lv_type);
+
+               if (!lv && parms->lv_type == PVMOVE) {
+                       log_print("%s: no pvmove in progress - already finished or aborted.",
+                                 name);
+                       unlock_and_free_vg(cmd, vg, vg->name);
+                       return 1;
+               }
+
+               if (!lv) {
                        log_error("ABORTING: Can't find LV in %s for %s",
                                  vg->name, name);
                        unlock_and_free_vg(cmd, vg, vg->name);
This page took 0.048161 seconds and 5 git commands to generate.