From: Mike Snitzer <snitzer@redhat.com>
To: "Moger, Babu" <Babu.Moger@netapp.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>,
"agk@redhat.com" <agk@redhat.com>
Subject: Re: [PATCH v2 4/5] dm mpath: add 'default_hw_handler' feature
Date: Wed, 9 May 2012 15:17:08 -0400 [thread overview]
Message-ID: <20120509191708.GA26785@redhat.com> (raw)
In-Reply-To: <77471C95FAFD844C8CA02DD4F4C5FE2B05D2D0@SACEXCMBX02-PRD.hq.netapp.com>
On Wed, May 09 2012 at 2:10pm -0400,
Moger, Babu <Babu.Moger@netapp.com> wrote:
> Mike,
>
> > -----Original Message-----
> > From: Mike Snitzer [mailto:snitzer@redhat.com]
> > Sent: Tuesday, May 08, 2012 4:56 PM
> > To: dm-devel@redhat.com
> > Cc: agk@redhat.com; hare@suse.de; Moger, Babu; sekharan@us.ibm.com;
> > Mike Snitzer
> > Subject: [PATCH v2 4/5] dm mpath: add 'default_hw_handler' feature
> >
> > From: Hannes Reinecke <hare@suse.de>
> >
> > When specifying the feature 'default_hw_handler' multipath will be use
> > the currently attached hardware handler instead of trying to attach the
> > one specified during table load. If no hardware handler is attached the
> > specified hardware handler will be used.
>
> I am trying to test these patches right now. What is the expectation from
> Multipath tools for this to work correctly. Do I have to pass following
> Parameters?
>
> hardware_handler "1 alua"
> features "1 default_hw_handler"
Yes.
> It appears to me that the first line will forcibly load the alua handler even if
> the default handler is different.
Are you saying that based on testing or based on code review?
> > diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> > index c351607..0fc6849 100644
> > --- a/drivers/md/dm-mpath.c
> > +++ b/drivers/md/dm-mpath.c
> > @@ -585,9 +587,18 @@ static struct pgpath *parse_path(struct dm_arg_set
> > *as, struct path_selector *ps
> > goto bad;
> > }
> >
> > - if (m->hw_handler_name) {
> > - struct request_queue *q = bdev_get_queue(p->path.dev-
> > >bdev);
> > + if (m->use_default_hw_handler || m->hw_handler_name)
> > + q = bdev_get_queue(p->path.dev->bdev);
> > +
> > + if (m->use_default_hw_handler) {
> > + const char *attached_handler_name = scsi_dh_attached_handler_name(q);
> > + if (attached_handler_name) {
> > + kfree(m->hw_handler_name);
> > + m->hw_handler_name = kstrdup(attached_handler_name, GFP_KERNEL);
> > + }
> > + }
> >
> > + if (m->hw_handler_name) {
> > r = scsi_dh_attach(q, m->hw_handler_name);
> > if (r == -EBUSY) {
> > /*
The above hunk is what will cause the currently attached device handler
to be used. But if a device handler is _not_ attached then we fallback
to using the provided 'hardware_handler'.
So are you testing this patch with a device handler having already been
attached?
Mike
next prev parent reply other threads:[~2012-05-09 19:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 21:56 [PATCH v2 0/5] dm mpath: add 'default_hw_handler' and 'no_partitions' features Mike Snitzer
2012-05-08 21:56 ` [PATCH v2 1/5] dm mpath: only try to load the scsi_dh module if the scsi_dh doesn't exist Mike Snitzer
2012-05-09 6:57 ` Hannes Reinecke
2012-05-09 22:54 ` Chandra Seetharaman
2012-05-08 21:56 ` [PATCH v2 2/5] scsi_dh: add scsi_dh_attached_handler_name Mike Snitzer
2012-05-09 6:57 ` Hannes Reinecke
2012-05-09 17:40 ` Moger, Babu
2012-05-09 20:41 ` [PATCH v3 " Mike Snitzer
2012-05-09 20:41 ` Mike Snitzer
2012-05-09 22:54 ` Chandra Seetharaman
2012-05-09 22:54 ` Chandra Seetharaman
2012-05-08 21:56 ` [PATCH v2 3/5] dm mpath: reduce size of multipath structure Mike Snitzer
2012-05-09 6:58 ` Hannes Reinecke
2012-05-08 21:56 ` [PATCH v2 4/5] dm mpath: add 'default_hw_handler' feature Mike Snitzer
2012-05-09 18:10 ` Moger, Babu
2012-05-09 19:17 ` Mike Snitzer [this message]
2012-05-09 20:35 ` Moger, Babu
2012-05-09 23:02 ` Chandra Seetharaman
2012-05-10 21:31 ` [PATCH v3 " Mike Snitzer
2012-05-17 21:15 ` Chandra Seetharaman
2012-05-08 21:56 ` [PATCH v2 5/5] dm mpath: add ability to disable partition creation Mike Snitzer
2012-05-09 23:04 ` Chandra Seetharaman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120509191708.GA26785@redhat.com \
--to=snitzer@redhat.com \
--cc=Babu.Moger@netapp.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.