1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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().
This commit is contained in:
Alasdair G Kergon 2014-04-18 02:13:46 +01:00
parent 702180b30c
commit e8a3ba1865
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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;
}