1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-24 17:57:48 +03:00

Reset _vgs_locked in lvmcache_init()

Upon successful fork(), _become_daemon() must assert that the locks that
are currently held belong to the parent, not the child.  All of the
child's internal state saying 'this process holds a lock' has to be
reset.

A proper lvmcache_locking_reset() should follow later.
This commit is contained in:
Mike Snitzer 2010-01-11 19:08:18 +00:00
parent 68427c03e9
commit beacd0b303

View File

@ -39,6 +39,13 @@ static int _vg_global_lock_held = 0; /* Global lock held when cache wiped? */
int lvmcache_init(void)
{
/*
* FIXME add a proper lvmcache_locking_reset() that
* resets the cache so no previous locks are locked
* - useful for reset_locking()
*/
_vgs_locked = 0;
dm_list_init(&_vginfos);
if (!(_vgname_hash = dm_hash_create(128)))