FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-02-2012, 05:04 PM
Mike Snitzer
 
Default dm-mpath: Allow 'default' hardware handler

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))

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-02-2012, 05:07 PM
Hannes Reinecke
 
Default dm-mpath: Allow 'default' hardware handler

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)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-03-2012, 01:45 AM
"Jun'ichi Nomura"
 
Default dm-mpath: Allow 'default' hardware handler

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

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

Thread Tools




All times are GMT. The time now is 12:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright İ2007 - 2008, www.linux-archive.org