Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH] udev-md-raid-assembly.rules: skip if DM_UDEV_DISABLE_OTHER_RULES_FLAG
@ 2022-02-16 20:59 mwilck
  2022-02-16 22:09 ` NeilBrown
  0 siblings, 1 reply; 13+ messages in thread
From: mwilck @ 2022-02-16 20:59 UTC (permalink / raw)
  To: Jes Sorensen, linux-raid
  Cc: lvm-devel, Peter Rajnoha, Hannes Reinecke, Heming Zhao, Coly Li,
	dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

device-mapper sets the flag DM_UDEV_DISABLE_OTHER_RULES_FLAG to 1 for
devices which are unusable. They may be no set up yet, suspended, or
otherwise unusable (e.g. multipath maps without usable path). This
flag does not necessarily imply SYSTEMD_READY=0 and must therefore
be tested separately.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 udev-md-raid-assembly.rules | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d668cdd..4568b01 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -21,6 +21,11 @@ IMPORT{cmdline}="noiswmd"
 IMPORT{cmdline}="nodmraid"
 
 ENV{nodmraid}=="?*", GOTO="md_inc_end"
+
+# device mapper sets DM_UDEV_DISABLE_OTHER_RULES_FLAG for devices which
+# aren't ready to use
+KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="md_inc_end"
+
 ENV{ID_FS_TYPE}=="ddf_raid_member", GOTO="md_inc"
 ENV{noiswmd}=="?*", GOTO="md_inc_end"
 ENV{ID_FS_TYPE}=="isw_raid_member", ACTION!="change", GOTO="md_inc"
-- 
2.35.1


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

end of thread, other threads:[~2022-03-18 22:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-16 20:59 [PATCH] udev-md-raid-assembly.rules: skip if DM_UDEV_DISABLE_OTHER_RULES_FLAG mwilck
2022-02-16 22:09 ` NeilBrown
2022-02-17 10:58   ` Martin Wilck
2022-02-17 13:09     ` Peter Rajnoha
2022-02-21 23:36       ` NeilBrown
2022-02-22 13:54         ` Martin Wilck
2022-02-22 22:49           ` NeilBrown
2022-02-23  9:47             ` Martin Wilck
2022-02-28  8:48             ` Martin Wilck
2022-03-18 22:42               ` Martin Wilck
2022-02-28 15:28       ` [dm-devel] " Xiao Ni
2022-03-01  7:53         ` Peter Rajnoha
2022-02-17 13:20     ` Peter Rajnoha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox