1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00
lvm2/libdm
Zdenek Kabelac f5f6dcbc62 Fix operation node stacking for consecutive dm ops
With the ability to stack many operations in one udev transaction -
in same cases we are adding and removing same device at the same time
(i.e. deactivate followed by activate).

This leads to a problem of checking stacked operations:
i.e. remove /dev/node1 followed by create /dev/node1

If the node creation is handled with udev - there is a problem as
stacked operation gives warning about existing node1 and will try to
remove it - while next operation needs to recreate it.

Current code removes all previous stacked operation if the fs op is
FS_DEL - patch adds similar behavior for FS_ADD - it will try to
remove any 'delete' operation if udev is in use.

For FS_RENAME operation it seems to be more complex. But as we
are always stacking FS_READ_AHEAD after FS_ADD operation -
should be safe to remove all previous operation on the node
when udev is running.

Code does same checking for stacking libdm and liblvm operations.

As a very simple optimization counters were added for each stacked ops
type to avoid unneeded list scans if some operation does not exists in
the list.

Enable skipping of fs_unlock() (udev sync) if only DEL operations are staked.
as we do not use lv_info for already deleted nodes.
2011-02-04 19:14:39 +00:00
..
datastruct Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
ioctl Suport DM_SECURE_DATA_FLAG. 2011-02-04 16:08:11 +00:00
misc Suport DM_SECURE_DATA_FLAG. 2011-02-04 16:08:11 +00:00
mm Compile code for memory debuging only with DEBUG_MEM 2011-01-28 16:01:32 +00:00
regex Use const char* const * for dm_regex_create() 2010-12-20 13:23:11 +00:00
.exported_symbols Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
libdevmapper.h Suport DM_SECURE_DATA_FLAG. 2011-02-04 16:08:11 +00:00
libdevmapper.pc.in Switch to use Requires.private for devmapper.pc and lvm2app.pc 2010-05-11 08:54:11 +00:00
libdm-common.c Fix operation node stacking for consecutive dm ops 2011-02-04 19:14:39 +00:00
libdm-common.h Add new dm_prepare_selinux_context fn to libdevmapper and use it throughout. 2010-12-13 10:43:56 +00:00
libdm-deptree.c Remove dead assignment in _mirror_emit_segment_line 2010-11-29 12:42:10 +00:00
libdm-file.c Implement dmeventd -R, allowing dmeventd to be restarted without losing 2010-10-20 15:12:12 +00:00
libdm-report.c Initialize pool object for each row 2011-01-25 21:51:30 +00:00
libdm-string.c Move va_end(ap) so we do not leave with return -1 without calling it. 2010-11-23 15:00:52 +00:00
Makefile.in Clean generated files .exported_symbols_generated, example.conf for distclean. 2010-08-03 13:00:45 +00:00