From: Petr Rockai <mornfall@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: dev-mornfall-activate - udev: add a few comments about variables used to recognize events
Date: Tue, 4 Jun 2013 19:25:45 +0000 (UTC) [thread overview]
Message-ID: <20130604192545.7C7786115D@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=baf9ef2047675279c72f27abeb2c328f5de2c78d
Commit: baf9ef2047675279c72f27abeb2c328f5de2c78d
Parent: f39f5b86c3f94fe83744054012d6d8b33bb7d7a0
Author: Peter Rajnoha <prajnoha@redhat.com>
AuthorDate: Fri May 3 11:01:57 2013 +0200
Committer: Peter Rajnoha <prajnoha@redhat.com>
CommitterDate: Fri May 3 11:01:57 2013 +0200
udev: add a few comments about variables used to recognize events
---
udev/10-dm.rules.in | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 512d156..3a157d5 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -77,11 +77,29 @@ LABEL="dm_flags_done"
# before (e.g. in initrd). If udev is used in initrd, we require the udev init
# script to not remove the existing udev database so we can reuse the information
# stored at the time of device activation in the initrd.
+# The DM_ACTIVATION variable tells when any device stacked above should be
+# (re)activated as well.
ACTION!="add", GOTO="dm_no_coldplug"
ENV{DM_UDEV_RULES_VSN}!="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="dm_disable"
ENV{DM_ACTIVATION}="1"
LABEL="dm_no_coldplug"
+# Putting it together, following table is used to recognize genuine and spurious events.
+# N.B. Spurious events are generated based on use of the WATCH udev
+# rule or by triggering an event manually by "udevadm trigger" call
+# or by "echo <event_name> > /sys/block/dm-X/uevent".
+#
+# EVENT DM_UDEV_PRIMARY_SOURCE_FLAG DM_ACTIVATION
+# ======================================================================
+# add event (genuine) 0 0
+# change event (genuine) 1 1
+# add event (spurious)
+# |_ dev still not active 0 0
+# \_ dev already active 1 1
+# change event (spurious)
+# |_ dev still not active 0 0
+# \_ dev already active 1 0
+
# "dm" sysfs subdirectory is available in newer versions of DM
# only (kernels >= 2.6.29). We have to check for its existence
# and use dmsetup tool instead to get the DM name, uuid and
reply other threads:[~2013-06-04 19:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20130604192545.7C7786115D@fedorahosted.org \
--to=mornfall@fedoraproject.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.