summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/clvmd-command.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2008-05-09 18:45:15 +0000
committerAlasdair Kergon <agk@redhat.com>2008-05-09 18:45:15 +0000
commit98fd1ce3327acde7f49c0e39426c6eeb40249f33 (patch)
tree618e936cde33aff7db5a4806bcbbc2ecdf0b0f80 /daemons/clvmd/clvmd-command.c
parent3d6af3e35e3de157d618f922f61194928aa7f11d (diff)
downloadlvm2-98fd1ce3327acde7f49c0e39426c6eeb40249f33.tar.gz
lvm2-98fd1ce3327acde7f49c0e39426c6eeb40249f33.tar.xz
lvm2-98fd1ce3327acde7f49c0e39426c6eeb40249f33.zip
More P_ and V_ lock cleanup.
Diffstat (limited to 'daemons/clvmd/clvmd-command.c')
-rw-r--r--daemons/clvmd/clvmd-command.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c
index 8e544e90..3b1379fe 100644
--- a/daemons/clvmd/clvmd-command.c
+++ b/daemons/clvmd/clvmd-command.c
@@ -118,10 +118,10 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen,
lockname = &args[2];
/* Check to see if the VG is in use by LVM1 */
status = do_check_lvm1(lockname);
- /* P_#global causes a cache refresh */
- if (strcmp(lockname, "P_#global") == 0)
- do_refresh_cache();
- else if (strncmp(lockname, "P_", 2) == 0)
+ /* P_#global causes a full cache refresh */
+ if (!strcmp(lockname, "P_#global"))
+ do_refresh_cache();
+ else
drop_metadata(lockname + 2);
break;
@@ -254,9 +254,9 @@ int do_pre_command(struct local_client *client)
case CLVMD_CMD_LOCK_VG:
lockname = &args[2];
- /* Do not use lock for cache related commands */
+ /* We take out a real lock unless LCK_CACHE was set */
if (!strncmp(lockname, "V_", 2) ||
- !strcmp(lockname, "P_#global"))
+ !strncmp(lockname, "P_#", 3))
status = lock_vg(client);
break;