This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/libdm libdm-common.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2009-09-11 16:11:25

Modified files:
	libdm          : libdm-common.c 

Log message:
	Move dm_cookie_supported check into dm_udev_get_sync_supprt function.
	
	We don't have to call dm_cookie_supported with dm_udev_get_sync_support
	this way. Also, it's necessary for the current code to work properly on
	systems without cookie support (older kernels).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.79&r2=1.80

--- LVM2/libdm/libdm-common.c	2009/09/11 15:57:51	1.79
+++ LVM2/libdm/libdm-common.c	2009/09/11 16:11:25	1.80
@@ -881,7 +881,7 @@
 	if (_udev_running < 0)
 		_udev_running = _check_udev_is_running();
 
-	return _udev_running && _sync_with_udev;
+	return dm_cookie_supported() && _udev_running && _sync_with_udev;
 }
 
 static int _get_cookie_sem(uint32_t cookie, int *semid)
@@ -1064,7 +1064,7 @@
 {
 	int semid;
 
-	if (!dm_udev_get_sync_support() || !dm_cookie_supported()) {
+	if (!dm_udev_get_sync_support()) {
 		dmt->event_nr = *cookie = 0;
 		return 1;
 	}
@@ -1099,7 +1099,7 @@
 {
 	int semid;
 
-	if (!cookie || !dm_udev_get_sync_support() || !dm_cookie_supported())
+	if (!cookie || !dm_udev_get_sync_support())
 		return 1;
 
 	if (!_get_cookie_sem(cookie, &semid))
@@ -1120,7 +1120,7 @@
 	int semid;
 	struct sembuf sb = {0, 0, 0};
 
-	if (!cookie || !dm_udev_get_sync_support() || !dm_cookie_supported())
+	if (!cookie || !dm_udev_get_sync_support())
 		return 1;
 
 	if (!_get_cookie_sem(cookie, &semid))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]