1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Remember to clear 'global lock held during cache refresh' state after use.

This commit is contained in:
Alasdair Kergon 2009-10-22 17:33:09 +00:00
parent 3687de1b8c
commit 06bb53b1e8
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.54 -
=====================================
Remember to clear 'global lock held during cache refresh' state after use.
Use udev flags support in LVM.
Delay announcing mirror monitoring to syslog until initialisation succeeded.
Handle metadata with unknown segment types more gracefully.

View File

@ -52,8 +52,15 @@ int lvmcache_init(void)
if (!(_lock_hash = dm_hash_create(128)))
return 0;
if (_vg_global_lock_held)
/*
* Reinitialising the cache clears the internal record of
* which locks are held. The global lock can be held during
* this operation so its state must be restored afterwards.
*/
if (_vg_global_lock_held) {
lvmcache_lock_vgname(VG_GLOBAL, 0);
_vg_global_lock_held = 0;
}
return 1;
}