mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-29 15:22:30 +03:00
pvscan: exit --cache immediately if locking_type=3 || use_lvmetad=0
This commit is contained in:
parent
7c7672b3c0
commit
fc2644ae71
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Exit pvscan --cache immediately if cluster locking used or lvmetad not used.
|
||||
Don't use lvmetad in lvm2-monitor.service ExecStop to avoid a systemd issue.
|
||||
Remove dependency on fedora-storage-init.service in lvm2 systemd units.
|
||||
Depend on lvm2-lvmetad.socket in lvm2-monitor.service systemd unit.
|
||||
|
@ -119,6 +119,21 @@ static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)
|
||||
char *buf;
|
||||
activation_handler handler = NULL;
|
||||
|
||||
/*
|
||||
* Return here immediately if lvmetad is not used.
|
||||
* Also return if locking_type=3 (clustered) as we
|
||||
* dont't support cluster + lvmetad yet.
|
||||
*
|
||||
* This is to avoid taking the global lock uselessly
|
||||
* and to prevent hangs in clustered environment.
|
||||
*/
|
||||
/* TODO: Remove this once lvmetad + cluster supported! */
|
||||
if (find_config_tree_int(cmd, "global/locking_type", 1) == 3 ||
|
||||
!find_config_tree_int(cmd, "global/use_lvmetad", 0)) {
|
||||
log_debug("_pvscan_lvmetad: immediate return");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (arg_count(cmd, activate_ARG)) {
|
||||
if (arg_uint_value(cmd, activate_ARG, CHANGE_AAY) != CHANGE_AAY) {
|
||||
log_error("Only --activate ay allowed with pvscan.");
|
||||
|
Loading…
Reference in New Issue
Block a user