diff options
author | David Teigland <teigland@redhat.com> | 2016-04-21 15:58:34 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-04-21 15:58:34 -0500 |
commit | 4d095c2fbb4383fc4830b9b714f8a7fd45b40fcd (patch) | |
tree | 1aeedabe62231f5944b08ad53718e5a98669503b | |
parent | 11dd36245450ed664c4a6bd177f17a8077c820a1 (diff) | |
download | lvm2-4d095c2fbb4383fc4830b9b714f8a7fd45b40fcd.tar.gz |
poll daemon: only call lvmetad_connect when needed
When lvm is not using lvmetad, the lvmetad_connect()
in the forked polling process is not needed and was
generating unwanted warnings.
-rw-r--r-- | tools/polldaemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c index c2211d734..6b15a0d7e 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -597,7 +597,7 @@ static int _poll_daemon(struct cmd_context *cmd, struct poll_operation_id *id, /* FIXME Use wait_event (i.e. interval = 0) and */ /* fork one daemon per copy? */ - if (daemon_mode == 1) { + if ((daemon_mode == 1) && find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) { if (!lvmetad_connect(cmd)) log_warn("WARNING: lvm polling process %d cannot connect to lvmetad.", getpid()); } |