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:
parent
68427c03e9
commit
beacd0b303
7
lib/cache/lvmcache.c
vendored
7
lib/cache/lvmcache.c
vendored
@ -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)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user