1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/locking
Zdenek Kabelac b1bcff7424 Critical section
New strategy for memory locking to decrease the number of call to
to un/lock memory when processing critical lvm functions.

Introducing functions for critical section.

Inside the critical section - memory is always locked.
When leaving the critical section, the memory stays locked
until memlock_unlock() is called - this happens with
sync_local_dev_names() and sync_dev_names() function call.

memlock_reset() is needed to reset locking numbers after fork
(polldaemon).

The patch itself is mostly rename:

memlock_inc  -> critical_section_inc
memlock_dec  -> critical_section_dec
memlock      -> critical_section

Daemons (clmvd, dmevent) are using memlock_daemon_inc&dec
(mlockall()) thus they will never release or relock memory they've
already locked memory.

Macros sync_local_dev_names() and sync_dev_names() are functions.
It's better for debugging - and also we do not need to add memlock.h
to locking.h header (for memlock_unlock() prototyp).
2011-02-18 14:16:11 +00:00
..
.exported_symbols Pre-release cleanups. 2009-05-21 03:04:52 +00:00
cluster_locking.c a few more comments 2011-02-02 23:57:48 +00:00
external_locking.c Use cluster-wide message to request device name sync 2011-02-04 19:18:16 +00:00
file_locking.c Fix for bug 677739: removing final exclusive cmirror snapshot, 2011-02-18 00:36:04 +00:00
locking_types.h Fix bad prototype from previous checkin. 2009-07-15 05:57:11 +00:00
locking.c Critical section 2011-02-18 14:16:11 +00:00
locking.h Critical section 2011-02-18 14:16:11 +00:00
Makefile.in Install plugins to subdirs 2010-05-06 10:07:46 +00:00
no_locking.c Fix for bug 677739: removing final exclusive cmirror snapshot, 2011-02-18 00:36:04 +00:00