From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH 3/5] libmultipath: pathinfo: skip hidden devices
Date: Fri, 21 Sep 2018 17:52:10 -0500 [thread overview]
Message-ID: <20180921225210.GN3172@octiron.msp.redhat.com> (raw)
In-Reply-To: <20180914125103.1154-3-mwilck@suse.com>
On Fri, Sep 14, 2018 at 02:51:01PM +0200, Martin Wilck wrote:
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> 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>
> ---
> libmultipath/discovery.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
> index 0b1855dd..11da64ba 100644
> --- a/libmultipath/discovery.c
> +++ b/libmultipath/discovery.c
> @@ -1858,9 +1858,18 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
> * 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,
> --
> 2.18.0
next prev parent reply other threads:[~2018-09-21 22:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 12:50 [PATCH 1/5] libmultipath: nvme: fix path detection for kernel 4.16 Martin Wilck
2018-09-14 12:51 ` [PATCH 2/5] libmultipath: nvme: shorter topology output Martin Wilck
2018-09-21 22:51 ` Benjamin Marzinski
2018-09-14 12:51 ` [PATCH 3/5] libmultipath: pathinfo: skip hidden devices Martin Wilck
2018-09-21 22:52 ` Benjamin Marzinski [this message]
2018-09-14 12:51 ` [PATCH 4/5] multipathd: fix version check for DM_DEV_ARM_POLL ioctl Martin Wilck
2018-09-21 22:52 ` Benjamin Marzinski
2018-09-14 12:51 ` [PATCH 5/5] multipathd: decrease log level of uevent messages Martin Wilck
2018-09-21 23:00 ` Benjamin Marzinski
2018-09-21 22:51 ` [PATCH 1/5] libmultipath: nvme: fix path detection for kernel 4.16 Benjamin Marzinski
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=20180921225210.GN3172@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mwilck@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox