Hidden block devices (in practice: members of nvme native multipath
devices) can't be used by multipath anyway. Current multipath code
(with default blacklisting) skips them, too, but emits a misleading
"blacklisted: udev property missing" message.
Signed-off-by: Martin Wilck <mwilck@suse.com>
* limited by DI_BLACKLIST and occurs before this debug
* message with the mask value.
*/
* limited by DI_BLACKLIST and occurs before this debug
* message with the mask value.
*/
- if (pp->udev && (is_claimed_by_foreign(pp->udev) ||
- filter_property(conf, pp->udev) > 0))
- return PATHINFO_SKIPPED;
+ if (pp->udev) {
+ const char *hidden =
+ udev_device_get_sysattr_value(pp->udev, "hidden");
+
+ if (hidden && !strcmp(hidden, "1")) {
+ condlog(3, "%s: hidden", pp->dev);
+ return PATHINFO_SKIPPED;
+ }
+ if (is_claimed_by_foreign(pp->udev) ||
+ filter_property(conf, pp->udev) > 0)
+ return PATHINFO_SKIPPED;
+ }
if (filter_devnode(conf->blist_devnode,
conf->elist_devnode,
if (filter_devnode(conf->blist_devnode,
conf->elist_devnode,