diff options
author | Alasdair G Kergon <agk@redhat.com> | 2014-04-18 02:13:46 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2014-04-18 02:13:46 +0100 |
commit | e8a3ba18659404b4ebded504a37623eeae8cc830 (patch) | |
tree | 50971ae0ca419d8d3b5589726110d4c7ea26ac38 | |
parent | 702180b30c83183722d36500d05da20966759ecf (diff) | |
download | lvm2-e8a3ba18659404b4ebded504a37623eeae8cc830.tar.gz |
pvscan: Use lvmetad_used().
Config variables that are processed during setup prior to calling into
particular tools must not be accessed directly afterwards in case the
values already got overridden.
_process_config() already used the tests I'm removing here to call
lvmetad_set_active() and set up lvmetad_used().
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | tools/pvscan.c | 5 |
2 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,6 @@ Version 2.02.107 - ================================== + Use lvmetad_used() in pvscan instead of config_tree. Configure --enable-udev-systemd-background-jobs if not disabled explicitly. Add lvmdump -s to collect system info and context (currently systemd only). Refactor allocation code to make A_POSITIONAL_FILL explicit. diff --git a/tools/pvscan.c b/tools/pvscan.c index dff2bb0f4..4121c7b02 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -201,9 +201,8 @@ static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv) * and to prevent hangs in clustered environment. */ /* TODO: Remove this once lvmetad + cluster supported! */ - if (find_config_tree_int(cmd, global_locking_type_CFG, NULL) == 3 || - !find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) { - log_debug_lvmetad("_pvscan_lvmetad: immediate return"); + if (!lvmetad_used()) { + log_verbose("Ignoring pvscan --cache command because lvmetad is not in use."); return ret; } |