Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/activate/activate.c lib/a ...

PATCH [email protected] 1 participant 1 message Feb 4, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-02-04 19:14:41

Modified files:

	.              : WHATS_NEW 
	lib/activate   : activate.c fs.c 
	libdm          : libdm-common.c 

Log message:
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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1902&r2=1.1903
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.189&r2=1.190
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.58&r2=1.59
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.108&r2=1.109

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.83 - 
 ===================================
+  Fix operation node stacking for consecutive dm ops.
   Increase hash table size to 1024 lv names and 64 pv uuids.
   Remove fs_unlock() from lv_resume path.
   Fix wipe size when setting up mda.
lib/activate/activate.c +1 -1
@@ -469,7 +469,7 @@
 	if (with_open_count) {
 		if (locking_is_clustered())
 			sync_local_dev_names(cmd); /* Wait to have udev in sync */
-		else //if (fs_has_non_delete_ops())
+		else if (fs_has_non_delete_ops())
 			fs_unlock(); /* For non clustered - wait if there are non-delete ops */
 	}
 
lib/activate/fs.c +79 -5

136 lines not on this page · raw message

libdm/libdm-common.c +66 -8

122 lines not on this page · raw message