All of lore.kernel.org
 help / color / mirror / Atom feed
From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/commands/toolcontext.c
Date: 8 Jul 2011 16:49:05 -0000	[thread overview]
Message-ID: <20110708164905.3327.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk at sourceware.org	2011-07-08 16:49:04

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

Log message:
	Ignore activation/verify_udev_operations if dm kernel driver vsn < 4.18.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2039&r2=1.2040
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.124&r2=1.125

--- LVM2/WHATS_NEW	2011/07/08 15:53:59	1.2039
+++ LVM2/WHATS_NEW	2011/07/08 16:49:04	1.2040
@@ -15,6 +15,7 @@
   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.
+  Ignore activation/verify_udev_operations if dm kernel driver vsn < 4.18.
   Add activation/verify_udev_operations to lvm.conf, disabled by default.
   Call vg_mark_partial_lvs() before VG structure is returned from the cache.
   Remove unused internal flag ACTIVATE_EXCL from the code.
--- LVM2/lib/commands/toolcontext.c	2011/07/01 14:09:19	1.124
+++ LVM2/lib/commands/toolcontext.c	2011/07/08 16:49:04	1.125
@@ -200,6 +200,21 @@
 	reset_lvm_errno(1);
 }
 
+/*
+ * Until the DM_UEVENT_GENERATED_FLAG was introduced in kernel patch 
+ * 856a6f1dbd8940e72755af145ebcd806408ecedd
+ * some operations could not be performed by udev, requiring our fallback code.
+ */
+static int _dm_driver_has_stable_udev_support()
+{
+	char vsn[80];
+	unsigned maj, min, patchlevel;
+
+	return driver_version(vsn, sizeof(vsn)) &&
+	       (sscanf(vsn, "%u.%u.%u", &maj, &min, &patchlevel) == 3) &&
+	       (maj == 4 ? min >= 18 : maj > 4);
+}
+
 static int _process_config(struct cmd_context *cmd)
 {
 	mode_t old_umask;
@@ -299,6 +314,13 @@
 		find_config_tree_int(cmd, "activation/verify_udev_operations",
 				     DEFAULT_VERIFY_UDEV_OPERATIONS) : 1;
 
+	/* Do not rely fully on udev if the udev support is known to be incomplete. */
+	if (!cmd->default_settings.udev_fallback && !_dm_driver_has_stable_udev_support()) {
+		log_very_verbose("Kernel driver has incomplete udev support so "
+				 "LVM will check and perform some operations itself.");
+		cmd->default_settings.udev_fallback = 1;
+	}
+
 #else
 	/* We must use old node/symlink creation code if not compiled with udev support at all! */
 	cmd->default_settings.udev_fallback = 1;



             reply	other threads:[~2011-07-08 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 16:49 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-23 13:02 LVM2 ./WHATS_NEW lib/commands/toolcontext.c zkabelac
2012-03-23  9:42 zkabelac
2012-02-27 10:05 zkabelac
2012-02-08 10:46 zkabelac
2011-06-28  0:23 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

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=20110708164905.3327.qmail@sourceware.org \
    --to=agk@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.