summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-06-17 13:31:08 -0500
committerDavid Teigland <teigland@redhat.com>2015-06-23 17:08:54 -0500
commitd037aa2e3e7e77f5b3a66cae1d18863b09e1708d (patch)
tree8eeda4f8673706639b33f7baa1f6496d21b6c106
parentc683175e2bc94c49f399dfc05ea74a787b59433d (diff)
downloadlvm2-d037aa2e3e7e77f5b3a66cae1d18863b09e1708d.tar.gz
add a warning for lvmlockd
-rw-r--r--lib/metadata/metadata.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 8f65eb51b..12ef8203c 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3934,6 +3934,16 @@ static struct volume_group *_vg_read_by_vgid(struct cmd_context *cmd,
release_vg(vg);
}
+ /*
+ * When using lvmlockd we should never reach this point.
+ * The VG is locked, then vg_read() is done, which gets
+ * the latest VG from lvmetad, or disk if lvmetad has
+ * been invalidated. When we get here the VG should
+ * always be cached and returned above.
+ */
+ if (lvmlockd_use())
+ log_error(INTERNAL_ERROR "vg_read_by_vgid failed with lvmlockd");
+
/* Mustn't scan if memory locked: ensure cache gets pre-populated! */
if (critical_section())
return_NULL;