summaryrefslogtreecommitdiff
path: root/tools/pvmove.c
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2015-09-02 16:54:22 +0200
committerOndrej Kozina <okozina@redhat.com>2015-09-02 17:25:37 +0200
commita9d954cb3cf974563d27ef1594d924c4de9c5eb9 (patch)
treedaa08680eb3939a5a74b4804f6078b216f1e1974 /tools/pvmove.c
parent6e4f2da9b327e00fb7bef89dffc3b56225b0cde7 (diff)
downloadlvm2-a9d954cb3cf974563d27ef1594d924c4de9c5eb9.tar.gz
pvmove: skip polling later in test mode
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r--tools/pvmove.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 0e31764a2..d6403ada6 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -817,9 +817,6 @@ int pvmove_poll(struct cmd_context *cmd, const char *pv_name,
int r;
struct poll_operation_id *id = NULL;
- if (test_mode())
- return ECMD_PROCESSED;
-
if (uuid) {
id = _create_id(cmd, pv_name, vg_name, lv_name, uuid);
if (!id) {
@@ -828,7 +825,10 @@ int pvmove_poll(struct cmd_context *cmd, const char *pv_name,
}
}
- r = poll_daemon(cmd, background, PVMOVE, &_pvmove_fns, "Moved", id);
+ if (test_mode())
+ r = ECMD_PROCESSED;
+ else
+ r = poll_daemon(cmd, background, PVMOVE, &_pvmove_fns, "Moved", id);
_destroy_id(cmd, id);