All of lore.kernel.org
 help / color / mirror / Atom feed
* Make device-mapper udev rules more friendly to udev
@ 2010-06-23 12:45 Xinwei Hu
  2010-06-23 16:21 ` Peter Rajnoha
  0 siblings, 1 reply; 2+ messages in thread
From: Xinwei Hu @ 2010-06-23 12:45 UTC (permalink / raw)
  To: dm-devel

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

Hi all,

  I found there're changes to udev/10-dm.rules.in, which tries to add
support for uevent triggered outside of libdevmapper.
Think this is a great step.

  In current situation, if an admin calls "echo add >
/sys/block/dm-N/uevent", the symlinks in /dev/mapper and
/dev/$VGNAME/ will still be removed anyway. I'm not sure who many
realistic application will trigger the 'add' event in users
space out side the libdevmapper. But I think it'll be more friendly to udev ;)

  The attached 10-dm.rules.in is an attempt on this direction. It
basically import{db} if the events are not trigged by libdevmapper.

  Please comment.

  Thanks.

[-- Attachment #2: lvm-10-dm.rules.in.diff --]
[-- Type: application/octet-stream, Size: 720 bytes --]

74c74,77
< ACTION=="add", ENV{STARTUP}!="1", NAME="", GOTO="dm_end"
---
> ACTION=="add", ENV{STARTUP}!="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", NAME="", GOTO="dm_end"
> 
> # If it's the artificial event from other source
> ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="dm_artificial"
91a95,113
> 
> GOTO="dm_normalrule"
> 
> LABEL="dm_artificial"
> IMPORT{db}="DM_NAME"
> IMPORT{db}="DM_UUID"
> IMPORT{db}="DM_SUSPENDED"
> IMPORT{db}="DM_STATE"
> IMPORT{db}="DM_TABLE_STATE"
> IMPORT{db}="DM_OPENCOUNT"
> IMPORT{db}="DM_LAST_EVENT_NR"
> IMPORT{db}="DM_MAJOR"
> IMPORT{db}="DM_MINOR"
> IMPORT{db}="DM_TARGET_COUNT"
> IMPORT{db}="DM_TARGET_TYPES"
> IMPORT{db}="DM_DEPS"
> IMPORT{db}="DM_TYPE"
> 
> LABEL="dm_normalrule"

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-23 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 12:45 Make device-mapper udev rules more friendly to udev Xinwei Hu
2010-06-23 16:21 ` Peter Rajnoha

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.