diff options
author | Milan Broz <mbroz@redhat.com> | 2011-01-19 23:11:39 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2011-01-19 23:11:39 +0000 |
commit | 74863007ee2230e71a2ee75e2c67965e2568e796 (patch) | |
tree | c66b1bb4cd65b428d568f406c58ca106ee036890 | |
parent | 679830cf580b77305bf1c34f84d6e40d0453bdd1 (diff) | |
download | lvm2-74863007ee2230e71a2ee75e2c67965e2568e796.tar.gz lvm2-74863007ee2230e71a2ee75e2c67965e2568e796.tar.xz lvm2-74863007ee2230e71a2ee75e2c67965e2568e796.zip |
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
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | tools/polldaemon.c | 12 |
2 files changed, 11 insertions, 2 deletions
@@ -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 =================================== diff --git a/tools/polldaemon.c b/tools/polldaemon.c index aac9c17f..94e52a3d 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); |