All of lore.kernel.org
 help / color / mirror / Atom feed
From: prajnoha@sourceware.org <prajnoha@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW_DM tools/dmsetup.c
Date: 17 Jun 2011 14:55:52 -0000	[thread overview]
Message-ID: <20110617145552.11785.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha at sourceware.org	2011-06-17 14:55:51

Modified files:
	.              : WHATS_NEW_DM 
	tools          : dmsetup.c 

Log message:
	Disable udev fallback and add --udevfallback option to dmsetup.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.472&r2=1.473
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/dmsetup.c.diff?cvsroot=lvm2&r1=1.160&r2=1.161

--- LVM2/WHATS_NEW_DM	2011/06/13 03:32:45	1.472
+++ LVM2/WHATS_NEW_DM	2011/06/17 14:55:51	1.473
@@ -1,5 +1,6 @@
 Version 1.02.65 - 
 ==================================
+  Disable udev fallback by default and add --udevfallback option to dmsetup.
   Warn if a table is loaded while a device is known to be in suspended state.
   Add dm_get_suspended_counter() for number of devs in suspended state by lib.
   Fix "all" report field prefix matching to include label fields with pv_all.
--- LVM2/tools/dmsetup.c	2011/04/22 11:56:41	1.160
+++ LVM2/tools/dmsetup.c	2011/06/17 14:55:51	1.161
@@ -135,6 +135,7 @@
 	UDEVCOOKIE_ARG,
 	NOUDEVRULES_ARG,
 	NOUDEVSYNC_ARG,
+	UDEVFALLBACK_ARG,
 	OPTIONS_ARG,
 	READAHEAD_ARG,
 	ROWS_ARG,
@@ -648,11 +649,11 @@
 	if (!_set_task_add_node(dmt))
                 goto out;
 
-	if (_udev_cookie) {
+	if (_udev_cookie)
 		cookie = _udev_cookie;
-		if (_udev_only)
-			udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
-	}
+
+	if (_udev_only)
+		udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
 
 	if (!dm_task_set_cookie(dmt, &cookie, udev_flags) ||
 	    !dm_task_run(dmt))
@@ -702,11 +703,11 @@
 		udev_flags |= DM_UDEV_DISABLE_DM_RULES_FLAG |
 			      DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG;
 
-	if (_udev_cookie) {
+	if (_udev_cookie)
 		cookie = _udev_cookie;
-		if (_udev_only)
-			udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
-	}
+
+	if (_udev_only)
+		udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
 
 	if (!dm_task_set_cookie(dmt, &cookie, udev_flags) ||
 	    !dm_task_run(dmt))
@@ -1006,7 +1007,7 @@
 	else
 		dirs_diff = strcmp(dev_dir, udev_dev_dir);
 
-	_udev_only = _udev_cookie && !dirs_diff;
+	_udev_only = !dirs_diff && (_udev_cookie || !_switches[UDEVFALLBACK_ARG]);
 
 	if (dirs_diff) {
 		log_debug("The path %s used for creating device nodes that is "
@@ -1225,11 +1226,11 @@
 		udev_flags |= DM_UDEV_DISABLE_DM_RULES_FLAG |
 			      DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG;
 
-	if (_udev_cookie) {
+	if (_udev_cookie)
 		cookie = _udev_cookie;
-		if (_udev_only)
-			udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
-	}
+
+	if (_udev_only)
+		udev_flags |= DM_UDEV_DISABLE_LIBRARY_FALLBACK;
 
 	if (udev_wait_flag && !dm_task_set_cookie(dmt, &cookie, udev_flags))
 		goto out;
@@ -2744,8 +2745,8 @@
 	fprintf(out, "dmsetup [--version] [-h|--help [-c|-C|--columns]]\n"
 		"        [-v|--verbose [-v|--verbose ...]]\n"
 		"        [-r|--readonly] [--noopencount] [--nolockfs] [--inactive]\n"
-		"        [--udevcookie] [--noudevrules] [--noudevsync] [-y|--yes]\n"
-		"        [--readahead [+]<sectors>|auto|none]\n"
+		"        [--udevcookie] [--noudevrules] [--noudevsync] [--udevfallback]\n"
+		"        [-y|--yes] [--readahead [+]<sectors>|auto|none]\n"
 		"        [-c|-C|--columns] [-o <fields>] [-O|--sort <sort_fields>]\n"
 		"        [--nameprefixes] [--noheadings] [--separator <separator>]\n\n");
 	for (i = 0; _commands[i].name; i++)
@@ -3115,6 +3116,7 @@
 		{"udevcookie", 1, &ind, UDEVCOOKIE_ARG},
 		{"noudevrules", 0, &ind, NOUDEVRULES_ARG},
 		{"noudevsync", 0, &ind, NOUDEVSYNC_ARG},
+		{"udevfallback", 0, &ind, UDEVFALLBACK_ARG},
 		{"options", 1, &ind, OPTIONS_ARG},
 		{"readahead", 1, &ind, READAHEAD_ARG},
 		{"rows", 0, &ind, ROWS_ARG},
@@ -3243,6 +3245,8 @@
 			_switches[NOUDEVRULES_ARG]++;
 		if (ind == NOUDEVSYNC_ARG)
 			_switches[NOUDEVSYNC_ARG]++;
+		if (ind == UDEVFALLBACK_ARG)
+			_switches[UDEVFALLBACK_ARG]++;
 		if (c == 'G' || ind == GID_ARG) {
 			_switches[GID_ARG]++;
 			_int_args[GID_ARG] = atoi(optarg);



             reply	other threads:[~2011-06-17 14:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 14:55 prajnoha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24  8:24 LVM2 ./WHATS_NEW_DM tools/dmsetup.c prajnoha
2012-04-24  8:00 prajnoha
2012-03-01 21:56 zkabelac
2012-02-15 12:08 prajnoha
2012-02-15 12:06 prajnoha
2012-02-15 12:02 prajnoha
2012-02-13 12:06 zkabelac
2011-08-11 17:06 mbroz
2011-07-08 17:08 agk
2011-03-29 21:49 zkabelac
2011-03-02  2:44 agk
2010-08-03 13:04 zkabelac
2010-08-03 12:56 zkabelac
2010-07-08 14:29 zkabelac
2009-06-03 20:44 agk
2009-06-03 18:35 agk
2009-04-24 11:30 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=20110617145552.11785.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.