summaryrefslogtreecommitdiff
path: root/tools/vgimport.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-04-13 17:00:01 -0500
committerDavid Teigland <teigland@redhat.com>2016-04-19 14:00:02 -0500
commit5e9e43074a6c5e251ee44768421879b03ad2e530 (patch)
tree632250a3b826e2bcd5b4d3246dfcc779cfd09db6 /tools/vgimport.c
parent593900b795e194608e9e2088aa8f75f4f42484c1 (diff)
downloadlvm2-5e9e43074a6c5e251ee44768421879b03ad2e530.tar.gz
lvmetad: rework command connection setup and checking
The lvmetad connection is created within the init_connections() path during command startup, rather than via the old lvmetad_active() check. The old lvmetad_active() checks are replaced with lvmetad_used() which is a simple check that tests if the command is using/connected to lvmetad. The old lvmetad_set_active(cmd, 0) calls, which stopped the command from using lvmetad (to revert to disk scanning), are replaced with lvmetad_make_unused(cmd).
Diffstat (limited to 'tools/vgimport.c')
-rw-r--r--tools/vgimport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/vgimport.c b/tools/vgimport.c
index f5980a19c..5bcf7e089 100644
--- a/tools/vgimport.c
+++ b/tools/vgimport.c
@@ -98,12 +98,12 @@ int vgimport(struct cmd_context *cmd, int argc, char **argv)
if (lvmetad_used()) {
if (!lvmetad_pvscan_all_devs(cmd, NULL, 1)) {
log_warn("WARNING: Not using lvmetad because cache update failed.");
- lvmetad_set_active(cmd, 0);
+ lvmetad_make_unused(cmd);
}
if (lvmetad_used() && lvmetad_is_disabled(cmd, &reason)) {
log_warn("WARNING: Not using lvmetad because %s.", reason);
- lvmetad_set_active(cmd, 0);
+ lvmetad_make_unused(cmd);
}
}