public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: agk@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW_DM libdm/libdm-common.c libdm ...
Date: Wed, 02 Mar 2011 00:29:00 -0000	[thread overview]
Message-ID: <20110302002959.28365.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-03-02 00:29:58

Modified files:
	.              : WHATS_NEW_DM 
	libdm          : libdm-common.c libdm-deptree.c 
	libdm/ioctl    : libdm-iface.c 
	tools          : dmsetup.c 

Log message:
	Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.
	Include an implicit dm_task_update_nodes() within dm_udev_wait().

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.450&r2=1.451
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.110&r2=1.111
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.95&r2=1.96
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/dmsetup.c.diff?cvsroot=lvm2&r1=1.154&r2=1.155

--- LVM2/WHATS_NEW_DM	2011/03/01 23:27:06	1.450
+++ LVM2/WHATS_NEW_DM	2011/03/02 00:29:57	1.451
@@ -1,5 +1,7 @@
 Version 1.02.64 - 
 ===================================
+  Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.
+  Include an implicit dm_task_update_nodes() within dm_udev_wait().
   Fix _create_and_load_v4 not to lose the --addnodeoncreate setting (1.02.62).
   Add inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7).
   Log debug open_count in _node_has_closed_parents().
--- LVM2/libdm/libdm-common.c	2011/02/04 22:07:44	1.110
+++ LVM2/libdm/libdm-common.c	2011/03/02 00:29:57	1.111
@@ -1044,6 +1044,8 @@
 
 int dm_udev_wait(uint32_t cookie)
 {
+	update_devs();
+
 	return 1;
 }
 
@@ -1380,7 +1382,7 @@
 	return 1;
 }
 
-int dm_udev_wait(uint32_t cookie)
+static int _udev_wait(uint32_t cookie)
 {
 	int semid;
 	struct sembuf sb = {0, 0, 0};
@@ -1420,4 +1422,11 @@
 	return _udev_notify_sem_destroy(cookie, semid);
 }
 
+int dm_udev_wait(uint32_t cookie)
+{
+	int r = _udev_wait(cookie);
+
+	update_devs();
+}
+
 #endif		/* UDEV_SYNC_SUPPORT */
--- LVM2/libdm/libdm-deptree.c	2011/02/18 16:13:56	1.90
+++ LVM2/libdm/libdm-deptree.c	2011/03/02 00:29:57	1.91
@@ -1922,7 +1922,6 @@
 		if (!dm_udev_wait(dm_tree_get_cookie(dnode)))
 			stack;
 		dm_tree_set_cookie(dnode, 0);
-		dm_task_update_nodes();
 	}
 
 	return r;
--- LVM2/libdm/ioctl/libdm-iface.c	2011/03/01 23:27:07	1.95
+++ LVM2/libdm/ioctl/libdm-iface.c	2011/03/02 00:29:57	1.96
@@ -2025,7 +2025,8 @@
 		}
 	}
 
-	if (ioctl_with_uevent && !_check_uevent_generated(dmi)) {
+	if (ioctl_with_uevent && dm_udev_get_sync_support() &&
+	    !_check_uevent_generated(dmi)) {
 		log_debug("Uevent not generated! Calling udev_complete "
 			  "internally to avoid process lock-up.");
 		_udev_complete(dmt);
--- LVM2/tools/dmsetup.c	2011/02/18 16:17:57	1.154
+++ LVM2/tools/dmsetup.c	2011/03/02 00:29:58	1.155
@@ -658,22 +658,16 @@
 
 	r = 1;
 
+      out:
 	if (!_udev_cookie)
 		(void) dm_udev_wait(cookie);
 
-	if (_switches[VERBOSE_ARG])
+	if (r && _switches[VERBOSE_ARG])
 		r = _display_info(dmt);
 
 	dm_task_destroy(dmt);
 
 	return r;
-
-      out:
-	if (!_udev_cookie)
-		(void) dm_udev_wait(cookie);
-	dm_task_destroy(dmt);
-
-	return r;
 }
 
 static int _rename(int argc, char **argv, void *data __attribute__((unused)))
@@ -721,6 +715,7 @@
       out:
 	if (!_udev_cookie)
 		(void) dm_udev_wait(cookie);
+
 	dm_task_destroy(dmt);
 
 	return r;
@@ -1242,14 +1237,15 @@
 
 	r = dm_task_run(dmt);
 
-	if (r && display && _switches[VERBOSE_ARG])
-		r = _display_info(dmt);
-
       out:
 	if (!_udev_cookie && udev_wait_flag)
 		(void) dm_udev_wait(cookie);
 
+	if (r && display && _switches[VERBOSE_ARG])
+		r = _display_info(dmt);
+
 	dm_task_destroy(dmt);
+
 	return r;
 }
 


             reply	other threads:[~2011-03-02  0:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02  0:29 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 12:48 prajnoha
2012-03-05 12:43 prajnoha
2012-01-09 12:26 zkabelac
2011-11-18 19:34 zkabelac
2009-01-07 12:17 prajnoha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110302002959.28365.qmail@sourceware.org \
    --to=agk@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).