Skip to contentSkip to conversation

master - devs: recognize md devices in subsystem check

PATCH David Teigland 1 participant 1 message May 11, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b5d99146282d2747b96d37efb5d2a7dc02fa6327
Commit:        b5d99146282d2747b96d37efb5d2a7dc02fa6327
Parent:        ccab54677c9f92cf1bd11895251799c043a57602
Author:        David Teigland <[email protected]>
AuthorDate:    Fri May 11 14:00:19 2018 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Fri May 11 14:00:19 2018 -0500

devs: recognize md devices in subsystem check

If md components appear as duplicate PVs, let the
existing subsystem check recognize the md device.

---
 lib/device/dev-type.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
lib/device/dev-type.c +3 -0
index 8d4a403..af4b407 100644
@@ -215,6 +215,9 @@ int dev_subsystem_part_major(struct dev_types *dt, struct device *dev)
 	if (MAJOR(dev->dev) == dt->device_mapper_major)
 		return 1;
 
+	if (MAJOR(dev->dev) == dt->md_major)
+		return 1;
+
 	if (MAJOR(dev->dev) == dt->drbd_major)
 		return 1;