From: Hannes Reinecke <hare@suse.de>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi: don't look for NULL devices handlers by name
Date: Mon, 26 Mar 2018 12:56:38 +0200 [thread overview]
Message-ID: <20180326125638.2510d7dd@pentland.suse.de> (raw)
In-Reply-To: <20180323133705.14556-1-jthumshirn@suse.de>
On Fri, 23 Mar 2018 14:37:05 +0100
Johannes Thumshirn <jthumshirn@suse.de> wrote:
> Currently scsi_dh_lookup() doesn't check for NULL as a device
> name. This combined with nvme over dm-mapth results in the following
> messages emitted by device-mapper:
>
> device-mapper: multipath: Could not failover device 259:67: Handler
> scsi_dh_(null) error 14.
>
> Let scsi_dh_lookup() fail fast on NULL names.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> drivers/scsi/scsi_dh.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
> index b88b5dbbc444..188f30572aa1 100644
> --- a/drivers/scsi/scsi_dh.c
> +++ b/drivers/scsi/scsi_dh.c
> @@ -112,6 +112,9 @@ static struct scsi_device_handler
> *scsi_dh_lookup(const char *name) {
> struct scsi_device_handler *dh;
>
> + if (!name || strlen(name) == 0)
> + return NULL;
> +
> dh = __scsi_dh_lookup(name);
> if (!dh) {
> request_module("scsi_dh_%s", name);
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
next prev parent reply other threads:[~2018-03-26 10:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 13:37 Johannes Thumshirn
2018-03-26 10:56 ` Hannes Reinecke [this message]
2018-03-26 23:00 ` Bart Van Assche
2018-03-28 22:16 ` Martin K. Petersen
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=20180326125638.2510d7dd@pentland.suse.de \
--to=hare@suse.de \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
Powered by JetHome