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 05-08-2012, 06:22 AM
Hannes Reinecke
 
Default dm mpath: add support for using previously attached scsi_dh

On 05/08/2012 05:19 AM, Mike Snitzer wrote:
> Use the previously attached scsi_dh if "default" is provided as the
> hardware handler name (the new 'use_default_hw_handler' flag is set in
> the multipath structure).
>
> Leverage scsi_dh_attach's ability to increment the scsi_dh's reference
> count if the same scsi_dh name is provided when attaching -- currently
> attached scsi_dh name is determined with scsi_dh_attached_handler_name.
>
Not sure it that's the correct way.

Using 'default' as the hardware handler name has the drawback that
the original information (ie the original hardware handler name)
is lost.

So if there is no 'default', eg if the kernel module hasn't been
loaded, we wouldn't know which hardware handler to load.

I'd rather have a feature 'default_hw_handler' which then could be
passed into the kernel module. With that we would retain both, the
original implementation and the default case.

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 05-08-2012, 01:36 PM
Mike Snitzer
 
Default dm mpath: add support for using previously attached scsi_dh

On Tue, May 08 2012 at 2:22am -0400,
Hannes Reinecke <hare@suse.de> wrote:

> On 05/08/2012 05:19 AM, Mike Snitzer wrote:
> > Use the previously attached scsi_dh if "default" is provided as the
> > hardware handler name (the new 'use_default_hw_handler' flag is set in
> > the multipath structure).
> >
> > Leverage scsi_dh_attach's ability to increment the scsi_dh's reference
> > count if the same scsi_dh name is provided when attaching -- currently
> > attached scsi_dh name is determined with scsi_dh_attached_handler_name.
> >
> Not sure it that's the correct way.
>
> Using 'default' as the hardware handler name has the drawback that
> the original information (ie the original hardware handler name)
> is lost.
>
> So if there is no 'default', eg if the kernel module hasn't been
> loaded, we wouldn't know which hardware handler to load.

What I've done does depend on all relevant scsi_dh being available
very early (either as builtins or loaded before the HBA drivers) so that
the scsi_dh gets attached during the drivers' SCSI device scan.

> I'd rather have a feature 'default_hw_handler' which then could be
> passed into the kernel module. With that we would retain both, the
> original implementation and the default case.

My change retains the original and allows "default" to have multipath
just use what the kernel already detected and attached via .match

Please be more precise with what it is you're proposing (either with
description or working patches).

Thanks!
Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-08-2012, 02:05 PM
Mike Snitzer
 
Default dm mpath: add support for using previously attached scsi_dh

On Tue, May 08 2012 at 2:22am -0400,
Hannes Reinecke <hare@suse.de> wrote:

> On 05/08/2012 05:19 AM, Mike Snitzer wrote:
> > Use the previously attached scsi_dh if "default" is provided as the
> > hardware handler name (the new 'use_default_hw_handler' flag is set in
> > the multipath structure).
> >
> > Leverage scsi_dh_attach's ability to increment the scsi_dh's reference
> > count if the same scsi_dh name is provided when attaching -- currently
> > attached scsi_dh name is determined with scsi_dh_attached_handler_name.
> >
> Not sure it that's the correct way.
>
> Using 'default' as the hardware handler name has the drawback that
> the original information (ie the original hardware handler name)
> is lost.

BTW, on this point: How is the original handler's name lost with my
patches? I set m->hw_handler_name to the original (aka attached)
handler's name (as returned scsi_dh_attached_handler_name).

"default" is only used as a key to trigger the use of the attached
handler (it causes m->use_default_hw_handler to be set).

Was my description or code somehow unclear? Guess so... otherwise I'd
not be clarifying this... unfortunately I'm not seeing where I fell
short.

Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-08-2012, 04:20 PM
Hannes Reinecke
 
Default dm mpath: add support for using previously attached scsi_dh

On 05/08/2012 04:05 PM, Mike Snitzer wrote:

On Tue, May 08 2012 at 2:22am -0400,
Hannes Reinecke<hare@suse.de> wrote:


On 05/08/2012 05:19 AM, Mike Snitzer wrote:

Use the previously attached scsi_dh if "default" is provided as the
hardware handler name (the new 'use_default_hw_handler' flag is set in
the multipath structure).

Leverage scsi_dh_attach's ability to increment the scsi_dh's reference
count if the same scsi_dh name is provided when attaching -- currently
attached scsi_dh name is determined with scsi_dh_attached_handler_name.


Not sure it that's the correct way.

Using 'default' as the hardware handler name has the drawback that
the original information (ie the original hardware handler name)
is lost.


BTW, on this point: How is the original handler's name lost with my
patches? I set m->hw_handler_name to the original (aka attached)
handler's name (as returned scsi_dh_attached_handler_name).

"default" is only used as a key to trigger the use of the attached
handler (it causes m->use_default_hw_handler to be set).

What I meant is that within multipath you can only specify one hardware
handler. So if it's 'default' and no hardware handler is attached we
wouldn't know what to look for.



Was my description or code somehow unclear? Guess so... otherwise I'd
not be clarifying this... unfortunately I'm not seeing where I fell
short.


Meanwhile I've sent the patchset, Please check that for details.

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
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 07:19 PM.

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