1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/device
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
..
dev-cache.c Do not scan devices unnecessarily for reseting error counter 2011-01-17 15:16:55 +00:00
dev-cache.h Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
dev-io.c Critical section 2011-02-18 14:16:11 +00:00
dev-luks.c Detect LUKS signature in pvcreate 2010-08-19 23:08:18 +00:00
dev-md.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
dev-swap.c Fix file descriptor leak in swap signature detection 2010-08-19 23:05:45 +00:00
device.c Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51) (robbat2) 2010-12-15 12:49:55 +00:00
device.h Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00