diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-05-09 19:26:58 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-05-09 19:26:58 +0000 |
commit | 3dfd8f12dc4f87bc4bcfe999f3e280bf5f5df264 (patch) | |
tree | 98a83f9d2766129c79c544183b40e3a867f00362 /lib/locking/file_locking.c | |
parent | 98fd1ce3327acde7f49c0e39426c6eeb40249f33 (diff) | |
download | lvm2-3dfd8f12dc4f87bc4bcfe999f3e280bf5f5df264.tar.gz lvm2-3dfd8f12dc4f87bc4bcfe999f3e280bf5f5df264.tar.xz lvm2-3dfd8f12dc4f87bc4bcfe999f3e280bf5f5df264.zip |
more cleanup
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r-- | lib/locking/file_locking.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c index ec7417ac..7ebfdaa5 100644 --- a/lib/locking/file_locking.c +++ b/lib/locking/file_locking.c @@ -210,10 +210,14 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource, switch (flags & LCK_SCOPE_MASK) { case LCK_VG: - if (flags & LCK_CACHE) { + /* Skip cache refresh for VG_GLOBAL - the caller handles it */ + if (strcmp(resource, VG_GLOBAL)) lvmcache_drop_metadata(resource); + + /* LCK_CACHE does not require a real lock */ + if (flags & LCK_CACHE) break; - } + if (*resource == '#') dm_snprintf(lockfile, sizeof(lockfile), "%s/P_%s", _lock_dir, resource + 1); |