All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] 'default' hardware handler for multipath
@ 2012-04-02 16:43 Hannes Reinecke
  2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Hannes Reinecke @ 2012-04-02 16:43 UTC (permalink / raw)
  To: linux-scsi; +Cc: dm-devel, Mike Snitzer, Hannes Reinecke

This patchset introduces a 'default' hardware handler for
dm-multipath.
Modern storage arrays typically support two failover methods,
the original proprietary and the modern ALUA-based one.
The device_handler implementation will currently select the
ALUA handler, and falling back to the proprietary one if
ALUA isn't supported.
However, in the built-in hardware table for multipath one
can specify only one hardware handler, causing the original
hardware handler to be overwritten.
By specifying a 'default' hardware handler multipath will not
try to attach a specific hardware handler, but rather using
the currently attached on.

Hannes Reinecke (2):
  scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
  dm-mpath: Allow 'default' hardware handler

 drivers/md/dm-mpath.c                 |    8 ++++++--
 drivers/scsi/device_handler/scsi_dh.c |    8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

-- 
1.7.7


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
  2012-04-02 16:43 [PATCH 0/2] 'default' hardware handler for multipath Hannes Reinecke
@ 2012-04-02 16:43 ` Hannes Reinecke
  2012-04-02 17:06   ` Mike Snitzer
  2012-04-03  1:46   ` [dm-devel] " Jun'ichi Nomura
  2012-04-02 16:43 ` [PATCH 2/2] dm-mpath: Allow 'default' hardware handler Hannes Reinecke
  2012-04-03 21:12 ` [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath Moger, Babu
  2 siblings, 2 replies; 11+ messages in thread
From: Hannes Reinecke @ 2012-04-02 16:43 UTC (permalink / raw)
  To: linux-scsi; +Cc: dm-devel, Mike Snitzer, Hannes Reinecke

This patch allows to pass in a NULL hardware handler to
scsi_dh_attach(), causing the reference count of the existing
hardware handler to be increased.
An error will be returned if no hardware handler is attached.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/device_handler/scsi_dh.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
index 48e46f5..77fa67e 100644
--- a/drivers/scsi/device_handler/scsi_dh.c
+++ b/drivers/scsi/device_handler/scsi_dh.c
@@ -475,10 +475,14 @@ int scsi_dh_attach(struct request_queue *q, const char *name)
 {
 	unsigned long flags;
 	struct scsi_device *sdev;
-	struct scsi_device_handler *scsi_dh;
+	struct scsi_device_handler *scsi_dh = NULL;
 	int err = 0;
 
-	scsi_dh = get_device_handler(name);
+	if (name) {
+		scsi_dh = get_device_handler(name);
+	} else if (sdev->scsi_dh_data) {
+		scsi_dh = sdev->scsi_dh_data->scsi_dh;
+	}
 	if (!scsi_dh)
 		return -EINVAL;
 
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] dm-mpath: Allow 'default' hardware handler
  2012-04-02 16:43 [PATCH 0/2] 'default' hardware handler for multipath Hannes Reinecke
  2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
@ 2012-04-02 16:43 ` Hannes Reinecke
  2012-04-02 17:04   ` Mike Snitzer
  2012-04-03 21:12 ` [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath Moger, Babu
  2 siblings, 1 reply; 11+ messages in thread
From: Hannes Reinecke @ 2012-04-02 16:43 UTC (permalink / raw)
  To: linux-scsi; +Cc: dm-devel, Mike Snitzer, Hannes Reinecke

This patch introduces a 'default' hardware handler for dm-mpath.
When specifying '1 default' dm-multipath will be using the currently
attached hardware handler.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-mpath.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 922a338..bbf950f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -586,15 +586,19 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
 
 	if (m->hw_handler_name) {
 		struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
+		char *hw_handler = NULL;
 
-		r = scsi_dh_attach(q, m->hw_handler_name);
+		if (strncmp(m->hw_handler_name, "default", 6))
+			hw_handler = m->hw_handler_name;
+		
+		r = scsi_dh_attach(q, hw_handler);
 		if (r == -EBUSY) {
 			/*
 			 * Already attached to different hw_handler,
 			 * try to reattach with correct one.
 			 */
 			scsi_dh_detach(q);
-			r = scsi_dh_attach(q, m->hw_handler_name);
+			r = scsi_dh_attach(q, hw_handler);
 		}
 
 		if (r < 0) {
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] dm-mpath: Allow 'default' hardware handler
  2012-04-02 16:43 ` [PATCH 2/2] dm-mpath: Allow 'default' hardware handler Hannes Reinecke
@ 2012-04-02 17:04   ` Mike Snitzer
  2012-04-02 17:07     ` Hannes Reinecke
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Snitzer @ 2012-04-02 17:04 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: linux-scsi, dm-devel

On Mon, Apr 02 2012 at 12:43pm -0400,
Hannes Reinecke <hare@suse.de> wrote:

> This patch introduces a 'default' hardware handler for dm-mpath.
> When specifying '1 default' dm-multipath will be using the currently
> attached hardware handler.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/md/dm-mpath.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 922a338..bbf950f 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -586,15 +586,19 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
>  
>  	if (m->hw_handler_name) {
>  		struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
> +		char *hw_handler = NULL;
>  
> -		r = scsi_dh_attach(q, m->hw_handler_name);
> +		if (strncmp(m->hw_handler_name, "default", 6))
> +			hw_handler = m->hw_handler_name;

Should be: if (strncmp(m->hw_handler_name, "default", 7))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
  2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
@ 2012-04-02 17:06   ` Mike Snitzer
  2012-04-03  1:46   ` [dm-devel] " Jun'ichi Nomura
  1 sibling, 0 replies; 11+ messages in thread
From: Mike Snitzer @ 2012-04-02 17:06 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: linux-scsi, dm-devel

On Mon, Apr 02 2012 at 12:43pm -0400,
Hannes Reinecke <hare@suse.de> wrote:

> This patch allows to pass in a NULL hardware handler to
> scsi_dh_attach(), causing the reference count of the existing
> hardware handler to be increased.
> An error will be returned if no hardware handler is attached.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/scsi/device_handler/scsi_dh.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
> index 48e46f5..77fa67e 100644
> --- a/drivers/scsi/device_handler/scsi_dh.c
> +++ b/drivers/scsi/device_handler/scsi_dh.c
> @@ -475,10 +475,14 @@ int scsi_dh_attach(struct request_queue *q, const char *name)
>  {
>  	unsigned long flags;
>  	struct scsi_device *sdev;
> -	struct scsi_device_handler *scsi_dh;
> +	struct scsi_device_handler *scsi_dh = NULL;
>  	int err = 0;
>  
> -	scsi_dh = get_device_handler(name);
> +	if (name) {
> +		scsi_dh = get_device_handler(name);
> +	} else if (sdev->scsi_dh_data) {
> +		scsi_dh = sdev->scsi_dh_data->scsi_dh;
> +	}

Extra brackets aren't needed.  But otherwise:

Acked-by: Mike Snitzer <snitzer@redhat.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] dm-mpath: Allow 'default' hardware handler
  2012-04-02 17:04   ` Mike Snitzer
@ 2012-04-02 17:07     ` Hannes Reinecke
  2012-04-03  1:45       ` [dm-devel] " Jun'ichi Nomura
  0 siblings, 1 reply; 11+ messages in thread
From: Hannes Reinecke @ 2012-04-02 17:07 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: linux-scsi, dm-devel

On 04/02/2012 07:04 PM, Mike Snitzer wrote:
> On Mon, Apr 02 2012 at 12:43pm -0400,
> Hannes Reinecke <hare@suse.de> wrote:
> 
>> This patch introduces a 'default' hardware handler for dm-mpath.
>> When specifying '1 default' dm-multipath will be using the currently
>> attached hardware handler.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>  drivers/md/dm-mpath.c |    8 ++++++--
>>  1 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
>> index 922a338..bbf950f 100644
>> --- a/drivers/md/dm-mpath.c
>> +++ b/drivers/md/dm-mpath.c
>> @@ -586,15 +586,19 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
>>  
>>  	if (m->hw_handler_name) {
>>  		struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
>> +		char *hw_handler = NULL;
>>  
>> -		r = scsi_dh_attach(q, m->hw_handler_name);
>> +		if (strncmp(m->hw_handler_name, "default", 6))
>> +			hw_handler = m->hw_handler_name;
> 
> Should be: if (strncmp(m->hw_handler_name, "default", 7))
A-hem.

Counting by hand is at times tricky.
I'll be sending an updated patchset.

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] 11+ messages in thread

* Re: [dm-devel] [PATCH 2/2] dm-mpath: Allow 'default' hardware handler
  2012-04-02 17:07     ` Hannes Reinecke
@ 2012-04-03  1:45       ` Jun'ichi Nomura
  0 siblings, 0 replies; 11+ messages in thread
From: Jun'ichi Nomura @ 2012-04-03  1:45 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: device-mapper development, Mike Snitzer, linux-scsi

Hi Hannes,

On 04/03/12 02:07, Hannes Reinecke wrote:
> On 04/02/2012 07:04 PM, Mike Snitzer wrote:
>> On Mon, Apr 02 2012 at 12:43pm -0400,
>> Hannes Reinecke <hare@suse.de> wrote:
>>
>>> This patch introduces a 'default' hardware handler for dm-mpath.
>>> When specifying '1 default' dm-multipath will be using the currently
>>> attached hardware handler.
>>>
>>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>>> ---
>>>  drivers/md/dm-mpath.c |    8 ++++++--
>>>  1 files changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
>>> index 922a338..bbf950f 100644
>>> --- a/drivers/md/dm-mpath.c
>>> +++ b/drivers/md/dm-mpath.c
>>> @@ -586,15 +586,19 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
>>>  
>>>  	if (m->hw_handler_name) {
>>>  		struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
>>> +		char *hw_handler = NULL;
>>>  
>>> -		r = scsi_dh_attach(q, m->hw_handler_name);
>>> +		if (strncmp(m->hw_handler_name, "default", 6))
>>> +			hw_handler = m->hw_handler_name;
>>
>> Should be: if (strncmp(m->hw_handler_name, "default", 7))
> A-hem.
> 
> Counting by hand is at times tricky.
> I'll be sending an updated patchset.

It seems you will hit the following error in parse_hw_handler().
Or is it avoided somehow?

        request_module("scsi_dh_%s", m->hw_handler_name);
        if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {
                ti->error = "unknown hardware handler type";
                ret = -EINVAL;
                goto fail;
        }

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dm-devel] [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
  2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
  2012-04-02 17:06   ` Mike Snitzer
@ 2012-04-03  1:46   ` Jun'ichi Nomura
  1 sibling, 0 replies; 11+ messages in thread
From: Jun'ichi Nomura @ 2012-04-03  1:46 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: device-mapper development, linux-scsi, Mike Snitzer

Hi Hannes,

On 04/03/12 01:43, Hannes Reinecke wrote:
> This patch allows to pass in a NULL hardware handler to
> scsi_dh_attach(), causing the reference count of the existing
> hardware handler to be increased.
> An error will be returned if no hardware handler is attached.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/scsi/device_handler/scsi_dh.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
> index 48e46f5..77fa67e 100644
> --- a/drivers/scsi/device_handler/scsi_dh.c
> +++ b/drivers/scsi/device_handler/scsi_dh.c
> @@ -475,10 +475,14 @@ int scsi_dh_attach(struct request_queue *q, const char *name)
>  {
>  	unsigned long flags;
>  	struct scsi_device *sdev;
> -	struct scsi_device_handler *scsi_dh;
> +	struct scsi_device_handler *scsi_dh = NULL;
>  	int err = 0;
>  
> -	scsi_dh = get_device_handler(name);
> +	if (name) {
> +		scsi_dh = get_device_handler(name);
> +	} else if (sdev->scsi_dh_data) {
> +		scsi_dh = sdev->scsi_dh_data->scsi_dh;
> +	}
>  	if (!scsi_dh)
>  		return -EINVAL;

It won't work. sdev is not initialized...

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
  2012-04-02 16:43 [PATCH 0/2] 'default' hardware handler for multipath Hannes Reinecke
  2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
  2012-04-02 16:43 ` [PATCH 2/2] dm-mpath: Allow 'default' hardware handler Hannes Reinecke
@ 2012-04-03 21:12 ` Moger, Babu
  2012-04-18 14:07   ` Hannes Reinecke
  2 siblings, 1 reply; 11+ messages in thread
From: Moger, Babu @ 2012-04-03 21:12 UTC (permalink / raw)
  To: device-mapper development, linux-scsi; +Cc: Mike Snitzer

Thanks Hannes. We appreciate your work on this.

> -----Original Message-----
> From: dm-devel-bounces@redhat.com [mailto:dm-devel-
> bounces@redhat.com] On Behalf Of Hannes Reinecke
> Sent: Monday, April 02, 2012 11:44 AM
> To: linux-scsi@vger.kernel.org
> Cc: dm-devel@redhat.com; Mike Snitzer
> Subject: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
> 
> This patchset introduces a 'default' hardware handler for dm-multipath.
> Modern storage arrays typically support two failover methods, the original
> proprietary and the modern ALUA-based one.
> The device_handler implementation will currently select the ALUA handler,
> and falling back to the proprietary one if ALUA isn't supported.
> However, in the built-in hardware table for multipath one can specify only
> one hardware handler, causing the original hardware handler to be
> overwritten.
> By specifying a 'default' hardware handler multipath will not try to attach a
> specific hardware handler, but rather using the currently attached on.

I think we still have some issues here. Right now we load the driver
either by adding it in initrd or by using request_module call from device mapper.
If the user passes, hardware_handler   "1 default"  from multipath then request_module will fail. 
How are we going to load the driver if these handlers are not loaded. 

> 
> Hannes Reinecke (2):
>   scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
>   dm-mpath: Allow 'default' hardware handler
> 
>  drivers/md/dm-mpath.c                 |    8 ++++++--
>  drivers/scsi/device_handler/scsi_dh.c |    8 ++++++--
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> --
> 1.7.7
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
  2012-04-03 21:12 ` [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath Moger, Babu
@ 2012-04-18 14:07   ` Hannes Reinecke
  2012-04-18 16:25     ` Moger, Babu
  0 siblings, 1 reply; 11+ messages in thread
From: Hannes Reinecke @ 2012-04-18 14:07 UTC (permalink / raw)
  To: Moger, Babu; +Cc: device-mapper development, linux-scsi, Mike Snitzer

On 04/03/2012 11:12 PM, Moger, Babu wrote:
> Thanks Hannes. We appreciate your work on this.
> 
>> -----Original Message-----
>> From: dm-devel-bounces@redhat.com [mailto:dm-devel-
>> bounces@redhat.com] On Behalf Of Hannes Reinecke
>> Sent: Monday, April 02, 2012 11:44 AM
>> To: linux-scsi@vger.kernel.org
>> Cc: dm-devel@redhat.com; Mike Snitzer
>> Subject: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
>>
>> This patchset introduces a 'default' hardware handler for dm-multipath.
>> Modern storage arrays typically support two failover methods, the original
>> proprietary and the modern ALUA-based one.
>> The device_handler implementation will currently select the ALUA handler,
>> and falling back to the proprietary one if ALUA isn't supported.
>> However, in the built-in hardware table for multipath one can specify only
>> one hardware handler, causing the original hardware handler to be
>> overwritten.
>> By specifying a 'default' hardware handler multipath will not try to attach a
>> specific hardware handler, but rather using the currently attached on.
> 
> I think we still have some issues here. Right now we load the driver
> either by adding it in initrd or by using request_module call from device mapper.
> If the user passes, hardware_handler   "1 default"  from multipath then request_module will fail. 
> How are we going to load the driver if these handlers are not loaded. 
> 
The idea of the 'default' hardware handler is to avoid multipath
overriding the kernel matchine algorithm. To make this work we
obviously have to load the modules prior to start multipathing.

Given that we (ie RH and us) are already loading the device-handler
modules from the initrd independent from multipathing we should be fine.

But thinking a bit more about it, it might be better to handle this
via features.
Implementing a feature like 'default_hw_handler' would not override
the default hardware handler from the hardware table.
So the requested hardware handler would still be loaded, but the
actual initialisation would be controlled via the feature.

Yep, that sound better.
I'll be preparing a patch.

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] 11+ messages in thread

* RE: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
  2012-04-18 14:07   ` Hannes Reinecke
@ 2012-04-18 16:25     ` Moger, Babu
  0 siblings, 0 replies; 11+ messages in thread
From: Moger, Babu @ 2012-04-18 16:25 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: device-mapper development, linux-scsi, Mike Snitzer

Hannes,

> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@suse.de]
> Sent: Wednesday, April 18, 2012 9:08 AM
> To: Moger, Babu
> Cc: device-mapper development; linux-scsi@vger.kernel.org; Mike Snitzer
> Subject: Re: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
> 
> On 04/03/2012 11:12 PM, Moger, Babu wrote:
> > Thanks Hannes. We appreciate your work on this.
> >
> >> -----Original Message-----
> >> From: dm-devel-bounces@redhat.com [mailto:dm-devel-
> >> bounces@redhat.com] On Behalf Of Hannes Reinecke
> >> Sent: Monday, April 02, 2012 11:44 AM
> >> To: linux-scsi@vger.kernel.org
> >> Cc: dm-devel@redhat.com; Mike Snitzer
> >> Subject: [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath
> >>
> >> This patchset introduces a 'default' hardware handler for dm-multipath.
> >> Modern storage arrays typically support two failover methods, the original
> >> proprietary and the modern ALUA-based one.
> >> The device_handler implementation will currently select the ALUA
> handler,
> >> and falling back to the proprietary one if ALUA isn't supported.
> >> However, in the built-in hardware table for multipath one can specify only
> >> one hardware handler, causing the original hardware handler to be
> >> overwritten.
> >> By specifying a 'default' hardware handler multipath will not try to attach a
> >> specific hardware handler, but rather using the currently attached on.
> >
> > I think we still have some issues here. Right now we load the driver
> > either by adding it in initrd or by using request_module call from device
> mapper.
> > If the user passes, hardware_handler   "1 default"  from multipath then
> request_module will fail.
> > How are we going to load the driver if these handlers are not loaded.
> >
> The idea of the 'default' hardware handler is to avoid multipath
> overriding the kernel matchine algorithm. To make this work we
> obviously have to load the modules prior to start multipathing.
> 
> Given that we (ie RH and us) are already loading the device-handler
> modules from the initrd independent from multipathing we should be fine.
> 
> But thinking a bit more about it, it might be better to handle this
> via features.
> Implementing a feature like 'default_hw_handler' would not override
> the default hardware handler from the hardware table.
> So the requested hardware handler would still be loaded, but the
> actual initialisation would be controlled via the feature.

hardware_handler is also used to pass on the arguments to handler. Like.
	hardware_handler        "2 emc 1"
We have to make sure that this feature does not break here. Considering all this 
don't you think it may be better if we make this decision in multipath tools itself.
Common factor here is alua. It is always between alua or some other handler.
Does it make sense to check TPGS in tools? 

> Yep, that sound better.
> I'll be preparing a patch.
> 
> 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] 11+ messages in thread

end of thread, other threads:[~2012-04-18 16:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 16:43 [PATCH 0/2] 'default' hardware handler for multipath Hannes Reinecke
2012-04-02 16:43 ` [PATCH 1/2] scsi_dh: Allow NULL hardware handler name in scsi_dh_attach() Hannes Reinecke
2012-04-02 17:06   ` Mike Snitzer
2012-04-03  1:46   ` [dm-devel] " Jun'ichi Nomura
2012-04-02 16:43 ` [PATCH 2/2] dm-mpath: Allow 'default' hardware handler Hannes Reinecke
2012-04-02 17:04   ` Mike Snitzer
2012-04-02 17:07     ` Hannes Reinecke
2012-04-03  1:45       ` [dm-devel] " Jun'ichi Nomura
2012-04-03 21:12 ` [dm-devel] [PATCH 0/2] 'default' hardware handler for multipath Moger, Babu
2012-04-18 14:07   ` Hannes Reinecke
2012-04-18 16:25     ` Moger, Babu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.