From e9848871d6ed60ee5f60c5a266afc01c2210e87f Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Mon, 23 Aug 2010 11:34:40 +0000 Subject: [PATCH] Fix pvmove --abort return code It prints error code even if abort operation succeeds: pvmove --abort /dev/sdb Command failed with status code 5. --- WHATS_NEW | 1 + tools/polldaemon.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 04c362b73..b7f19233b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.74 - ================================== + Fix return code of pvmove --abort PV. Fix pvmove --abort to remove even for empty pvmove LV. Add configure --with-default-data-alignment. Update heuristic used for default and detected data alignment. diff --git a/tools/polldaemon.c b/tools/polldaemon.c index 147d5320d..2d5a8cdfd 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -120,8 +120,10 @@ static int _check_lv_status(struct cmd_context *cmd, "can't abort."); return 0; } - parms->poll_fns->finish_copy(cmd, vg, lv, lvs_changed); - return 0; + if (!parms->poll_fns->finish_copy(cmd, vg, lv, lvs_changed)) + return_0; + + return 1; } progress = parms->poll_fns->poll_progress(cmd, lv, name, parms);