public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW_DM udev/10-dm.rules.in
Date: Mon, 07 Dec 2009 12:03:00 -0000	[thread overview]
Message-ID: <20091207120347.20090.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2009-12-07 12:03:47

Modified files:
	.              : WHATS_NEW_DM 
	udev           : 10-dm.rules.in 

Log message:
	Disable udev rules on change event with DISK_RO=1.
	
	There's a new change udev event generated since kernel 2.6.32 that
	notifies userspace about a change in read-only attribute for block
	devices (with DISK_RO=1 environment variable set).
	
	We need to detect this and disable the rule application so the
	meaning of this change event is not interchanged with the regular
	change event used while resuming/renaming DM devices.
	
	If there's anybody awaiting this notification in foreign rules,
	he can still check for this env var and do the appropriate actions
	separately.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.320&r2=1.321
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/udev/10-dm.rules.in.diff?cvsroot=lvm2&r1=1.6&r2=1.7

--- LVM2/WHATS_NEW_DM	2009/11/24 19:04:23	1.320
+++ LVM2/WHATS_NEW_DM	2009/12/07 12:03:47	1.321
@@ -1,5 +1,6 @@
 Version 1.02.41 -
 ====================================
+  Disable udev rules for change events with DISK_RO set.
 
 Version 1.02.40 - 19th November 2009
 ====================================
--- LVM2/udev/10-dm.rules.in	2009/11/01 18:01:31	1.6
+++ LVM2/udev/10-dm.rules.in	2009/12/07 12:03:47	1.7
@@ -19,6 +19,13 @@
 SUBSYSTEM!="block", GOTO="dm_end"
 KERNEL!="dm-[0-9]*", GOTO="dm_end"
 
+# There is a new change event generated in block layer since kernel
+# version 2.6.32. It adds notification for changes in read-only
+# attribute. We don't want to misinterpret the regular meaning of change
+# events for DM devices and we don't want to apply the rules prematurely,
+# therefore we disable them in this situation.
+ENV{DISK_RO}=="1", GOTO="dm_disable"
+
 # Set proper sbin path, /sbin has higher priority than /usr/sbin.
 ENV{DM_SBIN_PATH}="/sbin"
 TEST!="$env{DM_SBIN_PATH}/dmsetup", ENV{DM_SBIN_PATH}="/usr/sbin"


             reply	other threads:[~2009-12-07 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 12:03 prajnoha [this message]
2010-06-23 17:00 prajnoha
2010-08-12 13:07 prajnoha
2010-08-12 13:41 prajnoha
2011-01-28 11:41 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=20091207120347.20090.qmail@sourceware.org \
    --to=prajnoha@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).