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

lvmlockd: vgchange systemid doen't need global lock

The comment explained that the ex global lock was just
used to trigger global cache invalidation, which is no
longer needed.  This extra locking can cause problems
with LVM-activate when local and shared VGs are mixed
(and the incorrect exit code for errors was causing
problems.)
This commit is contained in:
David Teigland 2024-06-27 12:46:15 -05:00
parent 54a8562804
commit 680f7bd676

View File

@ -1533,17 +1533,6 @@ int vgchange_systemid_cmd(struct cmd_context *cmd, int argc, char **argv)
struct processing_handle *handle; struct processing_handle *handle;
int ret; int ret;
/*
* This is a special case where taking the global lock is
* not needed to protect global state, because the change is
* only to an existing VG. But, taking the global lock ex is
* helpful in this case to trigger a global cache validation
* on other hosts, to cause them to see the new system_id or
* lock_type.
*/
if (!lockd_global(cmd, "ex"))
return 0;
if (!(handle = init_processing_handle(cmd, NULL))) { if (!(handle = init_processing_handle(cmd, NULL))) {
log_error("Failed to initialize processing handle."); log_error("Failed to initialize processing handle.");
return ECMD_FAILED; return ECMD_FAILED;