summaryrefslogtreecommitdiffstats
path: root/lib/locking/file_locking.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2007-08-23 15:02:26 +0000
committerAlasdair Kergon <agk@redhat.com>2007-08-23 15:02:26 +0000
commite935d217520c85eae165cbff0e31065f97a98160 (patch)
tree11a1bee289e7661c9d95f27e9039a59cea5abb4a /lib/locking/file_locking.c
parentf608f304071449c72b147e1dfe29a907ff40bfa8 (diff)
downloadlvm2-e935d217520c85eae165cbff0e31065f97a98160.tar.gz
lvm2-e935d217520c85eae165cbff0e31065f97a98160.tar.xz
lvm2-e935d217520c85eae165cbff0e31065f97a98160.zip
Introduce VG_GLOBAL lock type for vgscan/pvscan to trigger clvmd -R.
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r--lib/locking/file_locking.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c
index 2ad86fd1..4d83f629 100644
--- a/lib/locking/file_locking.c
+++ b/lib/locking/file_locking.c
@@ -212,9 +212,12 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
switch (flags & LCK_SCOPE_MASK) {
case LCK_VG:
- if (!*resource)
+ if (!*resource) /* FIXME Deprecated */
dm_snprintf(lockfile, sizeof(lockfile),
"%s/P_orphans", _lock_dir);
+ else if (*resource == '#')
+ dm_snprintf(lockfile, sizeof(lockfile),
+ "%s/P_%s", _lock_dir, resource + 1);
else
dm_snprintf(lockfile, sizeof(lockfile),
"%s/V_%s", _lock_dir, resource);