mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
locking: restore blocking signal for VG_GLOBAL lck
During removal of a lot of locking code the signal blocking got lost and signal processing got broken leading to unpredictable behavior of i.e. activation code the can get interrupted in the middle of DM table processing. lvm2 code always expects signals are blocked while lock is held unless it is explictelly placed into section of: sigint_allow();....;sigint_restore(); For checking catched interrupt there is sigint_catched();
This commit is contained in:
parent
fe77d1a710
commit
2101e324f9
@ -1,5 +1,6 @@
|
||||
Version 2.03.11 -
|
||||
==================================
|
||||
Restore lost signal blocking while VG lock is held.
|
||||
Improve estimation of needed extents when creating thin-pool.
|
||||
Use extra 1% when resizing thin-pool metadata LV with --use-policy.
|
||||
Enhance --use-policy percentage rounding.
|
||||
|
@ -183,7 +183,11 @@ static int _lock_vol(struct cmd_context *cmd, const char *resource, uint32_t fla
|
||||
|
||||
block_signals(flags);
|
||||
|
||||
ret = _locking.lock_resource(cmd, resource, flags, NULL);
|
||||
if ((ret = _locking.lock_resource(cmd, resource, flags, NULL)))
|
||||
/* ensure signals are blocked while VG_GLOBAL lock is held */
|
||||
_update_vg_lock_count(resource, flags);
|
||||
else
|
||||
stack;
|
||||
|
||||
_unblock_signals();
|
||||
|
||||
@ -287,8 +291,6 @@ out_hold:
|
||||
else if (lck_type == LCK_UNLOCK)
|
||||
lvmcache_unlock_vgname(resource);
|
||||
|
||||
/* FIXME: we shouldn't need to keep track of this either. */
|
||||
_update_vg_lock_count(resource, flags);
|
||||
return 1;
|
||||
|
||||
out_fail:
|
||||
|
Loading…
Reference in New Issue
Block a user