Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   dm mpath: only try to load the scsi_dh module if the scsi_dh doesn't exist (http://www.linux-archive.org/device-mapper-development/664589-dm-mpath-only-try-load-scsi_dh-module-if-scsi_dh-doesnt-exist.html)

Hannes Reinecke 05-09-2012 06:57 AM

dm mpath: only try to load the scsi_dh module if the scsi_dh doesn't exist
 
On 05/08/2012 11:56 PM, Mike Snitzer wrote:
> There have been reports of multipath table loads hanging due to
> __request_module hanging (for some unknown reason).
>
> More often than not, the scsi_dh is already available and there is no
> need to request_module().
>
> Reported-by: Ben Marzinski <bmarzins@redhat.com>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> ---
> drivers/md/dm-mpath.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 922a338..754f38f 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -718,8 +718,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
> return 0;
>
> m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
> - request_module("scsi_dh_%s", m->hw_handler_name);
> - if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {
> + if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name),
> + "scsi_dh_%s", m->hw_handler_name)) {
> ti->error = "unknown hardware handler type";
> ret = -EINVAL;
> goto fail;

Acked-by: Hannes Reinecke <hare@suse.de>

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)

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

Chandra Seetharaman 05-09-2012 10:54 PM

dm mpath: only try to load the scsi_dh module if the scsi_dh doesn't exist
 
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>

On Tue, 2012-05-08 at 17:56 -0400, Mike Snitzer wrote:
> There have been reports of multipath table loads hanging due to
> __request_module hanging (for some unknown reason).
>
> More often than not, the scsi_dh is already available and there is no
> need to request_module().
>
> Reported-by: Ben Marzinski <bmarzins@redhat.com>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> ---
> drivers/md/dm-mpath.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 922a338..754f38f 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -718,8 +718,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
> return 0;
>
> m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
> - request_module("scsi_dh_%s", m->hw_handler_name);
> - if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {
> + if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name),
> + "scsi_dh_%s", m->hw_handler_name)) {
> ti->error = "unknown hardware handler type";
> ret = -EINVAL;
> goto fail;


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


All times are GMT. The time now is 05:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.