Re: [PATCH 3/5] libmultipath: pathinfo: skip hidden devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 14, 2018 at 02:51:01PM +0200, Martin Wilck wrote:

Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>

> 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@xxxxxxxx>
> ---
>  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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux