1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

file-locking: skip locking of VG_SYNC_NAMES

VG_SYNC_NAMES is internal name with different meaning,
there is no point to search it in cache.
This commit is contained in:
Zdenek Kabelac 2014-10-21 14:47:46 +02:00
parent 9351dca863
commit ab94045693
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.112 - Version 2.02.112 -
===================================== =====================================
Skip trying to file lock virtual internal vg name.
Fix selection on {vg,lv}_permissions fields to properly match selection criteria. Fix selection on {vg,lv}_permissions fields to properly match selection criteria.
Fix lv_permissions reporting to display read-only{-override} instead of blank. Fix lv_permissions reporting to display read-only{-override} instead of blank.
Fix liblvm2cmd and lvm shell to respect quotes around args in cmd line string. Fix liblvm2cmd and lvm shell to respect quotes around args in cmd line string.

View File

@ -60,12 +60,11 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
return_0; return_0;
break; break;
case LCK_VG: case LCK_VG:
/* Skip cache refresh for VG_GLOBAL - the caller handles it */ if (!strcmp(resource, VG_SYNC_NAMES)) {
if (strcmp(resource, VG_GLOBAL))
lvmcache_drop_metadata(resource, 0);
if (!strcmp(resource, VG_SYNC_NAMES))
fs_unlock(); fs_unlock();
} else if (strcmp(resource, VG_GLOBAL))
/* Skip cache refresh for VG_GLOBAL - the caller handles it */
lvmcache_drop_metadata(resource, 0);
/* LCK_CACHE does not require a real lock */ /* LCK_CACHE does not require a real lock */
if (flags & LCK_CACHE) if (flags & LCK_CACHE)