summaryrefslogtreecommitdiff
path: root/tools/polldaemon.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-03-14 22:03:41 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2021-03-15 11:13:24 +0100
commiteadd58a97dd9a199b74260e8a2bdb5657bf7a88d (patch)
tree96317f899514e94ba8d8735585937f61acfe3b7b /tools/polldaemon.c
parent1a451207b8ddbd15519ff9556c59287023ab50fa (diff)
downloadlvm2-eadd58a97dd9a199b74260e8a2bdb5657bf7a88d.tar.gz
lvpoll: improve merge polling
When multiple polling tasks are watching for same LV, clearly when some of them wins the game - other polling tasks will fail. Improve the logic and report success if the merged LV is actually not a merging origin anymore (since likely someone else has already finished merging).
Diffstat (limited to 'tools/polldaemon.c')
-rw-r--r--tools/polldaemon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index 32733b8ea..c182e548e 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -172,8 +172,13 @@ int wait_for_single_lv(struct cmd_context *cmd, struct poll_operation_id *id,
vg = vg_read(cmd, id->vg_name, NULL, READ_FOR_UPDATE, lockd_state, &error_flags, NULL);
if (!vg) {
/* What more could we do here? */
- log_error("ABORTING: Can't reread VG for %s error flags %x.", id->display_name, error_flags);
- ret = 0;
+ if (error_flags & FAILED_NOTFOUND) {
+ log_print_unless_silent("Can't find VG %s. No longer active.", id->display_name);
+ ret = 1;
+ } else {
+ log_error("ABORTING: Can't reread VG for %s error flags %x.", id->display_name, error_flags);
+ ret = 0;
+ }
goto out;
}