diff options
author | David Teigland <teigland@redhat.com> | 2015-06-17 15:13:04 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-06-23 17:08:54 -0500 |
commit | 6c379babe1e463e561442d11a7d39ed1e81254fb (patch) | |
tree | 01948be540587e8bd599baf80a0c861d26d36270 | |
parent | 3f63e708999d8663e3dd941cb21b1403cbc769d5 (diff) | |
download | lvm2-6c379babe1e463e561442d11a7d39ed1e81254fb.tar.gz |
vgchange: avoid unnecessary lockd_gl during lockstart
-rw-r--r-- | tools/vgchange.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index 87954cd29..1868b7d9c 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -1042,9 +1042,10 @@ static int lockd_vgchange(struct cmd_context *cmd, int argc, char **argv) /* * The lockstart condition takes the global lock to serialize * with any other host that tries to remove the VG while this - * tries to start it. + * tries to start it. (Zero argc means all VGs, in wich case + * process_each_vg will acquire the global lock.) */ - if (!lockd_gl(cmd, "sh", 0)) + if (argc && !lockd_gl(cmd, "sh", 0)) return_ECMD_FAILED; } else if (arg_is_set(cmd, systemid_ARG) || |