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 lib/commands/toolcontext.c
Date: Tue, 28 Jun 2011 00:23:00 -0000	[thread overview]
Message-ID: <20110628002307.9943.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-06-28 00:23:07

Modified files:
	.              : WHATS_NEW 
	lib/commands   : toolcontext.c 

Log message:
	Remove enforcement of udev verification when using non-standard /dev location.
	If you change the dev dir, it's your responsibility to adjust udev rules
	or tell lvm not to use udev too.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2027&r2=1.2028
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.122&r2=1.123

--- LVM2/WHATS_NEW	2011/06/27 21:43:58	1.2027
+++ LVM2/WHATS_NEW	2011/06/28 00:23:06	1.2028
@@ -1,5 +1,6 @@
 Version 2.02.86 -  
 =================================
+  Remove enforcement of udev verification when using non-standard /dev location.
   Fix to preserve exclusive activation of mirror while up-converting.
   Reject allocation if number of extents is not divisible by area count.
   Fix issue preventing cluster mirror creation.
--- LVM2/lib/commands/toolcontext.c	2011/06/27 23:43:04	1.122
+++ LVM2/lib/commands/toolcontext.c	2011/06/28 00:23:06	1.123
@@ -200,51 +200,6 @@
 	reset_lvm_errno(1);
 }
 
-/*
- * Prevent people disabling udev fallback if using a non-standard dev dir.
- * FIXME: Remove this function.  lvm.conf provides sufficient control.
- */
-static int _enforce_udev_fallback(struct cmd_context *cmd)
-{
-#ifdef UDEV_SYNC_SUPPORT
-	const char *udev_dev_dir;
-	size_t udev_dev_dir_len;
-	unsigned dirs_match;
-
-	if (!(udev_dev_dir = udev_get_dev_dir()) ||
-	    !*udev_dev_dir) {
-		log_error("Could not get udev dev path.");
-		return 0;
-	}
-	udev_dev_dir_len = strlen(udev_dev_dir);
-
-	/* There's always a slash at the end of dev_dir. But check udev_dev_dir! */
-	if (udev_dev_dir[udev_dev_dir_len - 1] != '/')
-		dirs_match = (udev_dev_dir_len + 1 == strlen(cmd->dev_dir)) &&
-			    !strncmp(cmd->dev_dir, udev_dev_dir, udev_dev_dir_len);
-	else
-		dirs_match = !strcmp(cmd->dev_dir, udev_dev_dir);
-
-	if (!dirs_match) {
-		log_debug("The path %s used for creating device nodes and "
-			  "symlinks that is set in the configuration differs "
-			  "from the path %s that is used by udev. All warnings "
-			  "about udev not working correctly while processing "
-			  "particular nodes and symlinks will be suppressed. "
-			  "These nodes and symlinks will be managed in each "
-			  "directory separately.",
-			   cmd->dev_dir, udev_dev_dir);
-		dm_udev_set_checking(0);
-		init_udev_checking(0);
-
-		/* Device directories differ - we must use the fallback code! */
-		cmd->default_settings.udev_fallback = 1;
-	}
-
-#endif
-	return 1;
-}
-
 static int _process_config(struct cmd_context *cmd)
 {
 	mode_t old_umask;
@@ -337,11 +292,9 @@
 	 * in runtime and still have only udev to create the nodes and symlinks
 	 * without any fallback.
 	 */
-	if ((cmd->default_settings.udev_fallback = cmd->default_settings.udev_rules ?
+	cmd->default_settings.udev_fallback = cmd->default_settings.udev_rules ?
 		find_config_tree_int(cmd, "activation/verify_udev_operations",
-				     DEFAULT_VERIFY_UDEV_OPERATIONS) : 1) &&
-	    !_enforce_udev_fallback(cmd))
-		return_0;
+				     DEFAULT_VERIFY_UDEV_OPERATIONS) : 1;
 
 #else
 	/* We must use old node/symlink creation code if not compiled with udev support at all! */


             reply	other threads:[~2011-06-28  0:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28  0:23 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-23 13:02 zkabelac
2012-03-23  9:42 zkabelac
2012-02-27 10:05 zkabelac
2012-02-08 10:46 zkabelac
2011-07-08 16:49 agk
2010-11-24  9:34 zkabelac
2010-04-30 12:37 zkabelac
2009-07-21 20:00 mpatocka
2009-07-14 12:17 mbroz
2009-06-15 11:56 mbroz
2009-04-02 20:46 taka
2007-02-08 17:31 agk
2007-01-23 16:03 agk
2005-01-27 15:50 agk

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=20110628002307.9943.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).