From 74863007ee2230e71a2ee75e2c67965e2568e796 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Wed, 19 Jan 2011 23:11:39 +0000 Subject: [PATCH] If other process finishes (or aborts) pvmove operation and 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 | 1 + tools/polldaemon.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 2dd3ddadb..5cc5e007b 100644 --- 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 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 =================================== diff --git a/tools/polldaemon.c b/tools/polldaemon.c index aac9c17fa..94e52a3da 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -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);