* [PATCH] scsi_dh: Use the correct module name when loading device handler
@ 2015-09-26 0:19 Paul Mackerras
2015-09-26 1:21 ` Hannes Reinecke
2015-09-30 15:03 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Paul Mackerras @ 2015-09-26 0:19 UTC (permalink / raw)
To: linux-scsi; +Cc: Christoph Hellwig
This fixes a bug in recent kernels which results in failure to boot
on systems that have multipath SCSI disks. I observed this failure
on a POWER8 server where all the disks are multipath SCSI disks.
The symptoms are several messages like this on the console:
[ 3.018700] device-mapper: table: 253:0: multipath: error attaching hardware handler
[ 3.018828] device-mapper: ioctl: error adding target to table
and the system does not find its disks, and therefore fails to boot.
Bisection revealed that the bug was introduced in commit 566079c849cf,
"dm-mpath, scsi_dh: request scsi_dh modules in scsi_dh, not dm-mpath".
The specific reason for the failure is that where we previously loaded
the "scsi_dh_alua" module, we are now trying to load the "alua" module,
which doesn't exist.
To fix this, we change the request_module call in scsi_dh_lookup()
to prepend "scsi_dh_" to the name, just like the old code in
drivers/md/dm-mpath.c:parse_hw_handler() used to do.
Fixes: 566079c849cf
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
drivers/scsi/scsi_dh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
index edb044a..0a2168e 100644
--- a/drivers/scsi/scsi_dh.c
+++ b/drivers/scsi/scsi_dh.c
@@ -111,7 +111,7 @@ static struct scsi_device_handler *scsi_dh_lookup(const char *name)
dh = __scsi_dh_lookup(name);
if (!dh) {
- request_module(name);
+ request_module("scsi_dh_%s", name);
dh = __scsi_dh_lookup(name);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_dh: Use the correct module name when loading device handler
2015-09-26 0:19 [PATCH] scsi_dh: Use the correct module name when loading device handler Paul Mackerras
@ 2015-09-26 1:21 ` Hannes Reinecke
2015-09-30 15:03 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2015-09-26 1:21 UTC (permalink / raw)
To: Paul Mackerras, linux-scsi; +Cc: Christoph Hellwig
On 09/26/2015 02:19 AM, Paul Mackerras wrote:
> This fixes a bug in recent kernels which results in failure to boot
> on systems that have multipath SCSI disks. I observed this failure
> on a POWER8 server where all the disks are multipath SCSI disks.
> The symptoms are several messages like this on the console:
>
> [ 3.018700] device-mapper: table: 253:0: multipath: error attaching hardware handler
> [ 3.018828] device-mapper: ioctl: error adding target to table
>
> and the system does not find its disks, and therefore fails to boot.
>
> Bisection revealed that the bug was introduced in commit 566079c849cf,
> "dm-mpath, scsi_dh: request scsi_dh modules in scsi_dh, not dm-mpath".
> The specific reason for the failure is that where we previously loaded
> the "scsi_dh_alua" module, we are now trying to load the "alua" module,
> which doesn't exist.
>
> To fix this, we change the request_module call in scsi_dh_lookup()
> to prepend "scsi_dh_" to the name, just like the old code in
> drivers/md/dm-mpath.c:parse_hw_handler() used to do.
>
> Fixes: 566079c849cf
> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
> ---
> drivers/scsi/scsi_dh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
> index edb044a..0a2168e 100644
> --- a/drivers/scsi/scsi_dh.c
> +++ b/drivers/scsi/scsi_dh.c
> @@ -111,7 +111,7 @@ static struct scsi_device_handler *scsi_dh_lookup(const char *name)
>
> dh = __scsi_dh_lookup(name);
> if (!dh) {
> - request_module(name);
> + request_module("scsi_dh_%s", name);
> dh = __scsi_dh_lookup(name);
> }
>
>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi_dh: Use the correct module name when loading device handler
2015-09-26 0:19 [PATCH] scsi_dh: Use the correct module name when loading device handler Paul Mackerras
2015-09-26 1:21 ` Hannes Reinecke
@ 2015-09-30 15:03 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2015-09-30 15:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-scsi, Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-30 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-26 0:19 [PATCH] scsi_dh: Use the correct module name when loading device handler Paul Mackerras
2015-09-26 1:21 ` Hannes Reinecke
2015-09-30 15:03 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).