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-09-2012, 06:10 PM
"Moger, Babu"
 
Default dm mpath: add 'default_hw_handler' feature

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"

It appears to me that the first line will forcibly load the alua handler even if
the default handler is different.

>
> Leverages 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.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> ---
> drivers/md/dm-mpath.c | 27 +++++++++++++++++++++++----
> 1 files changed, 23 insertions(+), 4 deletions(-)
>
> 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
> @@ -84,6 +84,7 @@ struct multipath {
> unsigned queue_io:1; /* Must we queue all I/O? */
> unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
> unsigned saved_queue_if_no_path:1; /* Saved state during
> suspension */
> + unsigned use_default_hw_handler:1; /* Use attached device
> handler */
>
> unsigned pg_init_retries; /* Number of times to retry pg_init
> */
> unsigned pg_init_count; /* Number of times pg_init
> called */
> @@ -567,6 +568,7 @@ static struct pgpath *parse_path(struct dm_arg_set
> *as, struct path_selector *ps
> int r;
> struct pgpath *p;
> struct multipath *m = ti->private;
> + struct request_queue *q = NULL;
>
> /* we need at least a path arg */
> if (as->argc < 1) {
> @@ -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) {
> /*
> @@ -759,7 +770,7 @@ static int parse_features(struct dm_arg_set *as,
> struct multipath *m)
> const char *arg_name;
>
> static struct dm_arg _args[] = {
> - {0, 5, "invalid number of feature args"},
> + {0, 6, "invalid number of feature args"},
> {1, 50, "pg_init_retries must be between 1 and 50"},
> {0, 60000, "pg_init_delay_msecs must be between 0 and
> 60000"},
> };
> @@ -780,6 +791,11 @@ static int parse_features(struct dm_arg_set *as,
> struct multipath *m)
> continue;
> }
>
> + if (!strcasecmp(arg_name, "default_hw_handler")) {
> + m->use_default_hw_handler = 1;
> + continue;
> + }
> +
> if (!strcasecmp(arg_name, "pg_init_retries") &&
> (argc >= 1)) {
> r = dm_read_arg(_args + 1, as, &m->pg_init_retries,
> &ti->error);
> @@ -1363,13 +1379,16 @@ static int multipath_status(struct dm_target *ti,
> status_type_t type,
> else {
> DMEMIT("%u ", m->queue_if_no_path +
> (m->pg_init_retries > 0) * 2 +
> - (m->pg_init_delay_msecs !=
> DM_PG_INIT_DELAY_DEFAULT) * 2);
> + (m->pg_init_delay_msecs !=
> DM_PG_INIT_DELAY_DEFAULT) * 2 +
> + m->use_default_hw_handler);
> if (m->queue_if_no_path)
> DMEMIT("queue_if_no_path ");
> if (m->pg_init_retries)
> DMEMIT("pg_init_retries %u ", m->pg_init_retries);
> if (m->pg_init_delay_msecs !=
> DM_PG_INIT_DELAY_DEFAULT)
> DMEMIT("pg_init_delay_msecs %u ", m-
> >pg_init_delay_msecs);
> + if (m->use_default_hw_handler)
> + DMEMIT("default_hw_handler ");
> }
>
> if (!m->hw_handler_name || type == STATUSTYPE_INFO)
> --
> 1.7.4.4


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-09-2012, 07:17 PM
Mike Snitzer
 
Default dm mpath: add 'default_hw_handler' feature

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-09-2012, 08:35 PM
"Moger, Babu"
 
Default dm mpath: add 'default_hw_handler' feature

> -----Original Message-----
> From: Mike Snitzer [mailto:snitzer@redhat.com]
> Sent: Wednesday, May 09, 2012 2:17 PM
> To: Moger, Babu
> Cc: dm-devel@redhat.com; agk@redhat.com; hare@suse.de;
> sekharan@us.ibm.com
> Subject: Re: [PATCH v2 4/5] dm mpath: add 'default_hw_handler' feature
>
> 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.
Ok. thanks

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

I was only reviewing the code. Looking at the code again, It should work fine.
I am going to test it anyway.

>
> > > 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'.

Got it.
>
> So are you testing this patch with a device handler having already been
> attached?

Yes. I will provide the feedback only tomorrow.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-09-2012, 11:02 PM
Chandra Seetharaman
 
Default dm mpath: add 'default_hw_handler' feature

Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>

On Tue, 2012-05-08 at 17:56 -0400, Mike Snitzer wrote:
> 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.
>
> Leverages 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.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> ---
> drivers/md/dm-mpath.c | 27 +++++++++++++++++++++++----
> 1 files changed, 23 insertions(+), 4 deletions(-)
>
> 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
> @@ -84,6 +84,7 @@ struct multipath {
> unsigned queue_io:1; /* Must we queue all I/O? */
> unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
> unsigned saved_queue_if_no_path:1; /* Saved state during suspension */
> + unsigned use_default_hw_handler:1; /* Use attached device handler */
>
> unsigned pg_init_retries; /* Number of times to retry pg_init */
> unsigned pg_init_count; /* Number of times pg_init called */
> @@ -567,6 +568,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
> int r;
> struct pgpath *p;
> struct multipath *m = ti->private;
> + struct request_queue *q = NULL;
>
> /* we need at least a path arg */
> if (as->argc < 1) {
> @@ -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) {
> /*
> @@ -759,7 +770,7 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
> const char *arg_name;
>
> static struct dm_arg _args[] = {
> - {0, 5, "invalid number of feature args"},
> + {0, 6, "invalid number of feature args"},
> {1, 50, "pg_init_retries must be between 1 and 50"},
> {0, 60000, "pg_init_delay_msecs must be between 0 and 60000"},
> };
> @@ -780,6 +791,11 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
> continue;
> }
>
> + if (!strcasecmp(arg_name, "default_hw_handler")) {
> + m->use_default_hw_handler = 1;
> + continue;
> + }
> +
> if (!strcasecmp(arg_name, "pg_init_retries") &&
> (argc >= 1)) {
> r = dm_read_arg(_args + 1, as, &m->pg_init_retries, &ti->error);
> @@ -1363,13 +1379,16 @@ static int multipath_status(struct dm_target *ti, status_type_t type,
> else {
> DMEMIT("%u ", m->queue_if_no_path +
> (m->pg_init_retries > 0) * 2 +
> - (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2);
> + (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2 +
> + m->use_default_hw_handler);
> if (m->queue_if_no_path)
> DMEMIT("queue_if_no_path ");
> if (m->pg_init_retries)
> DMEMIT("pg_init_retries %u ", m->pg_init_retries);
> if (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT)
> DMEMIT("pg_init_delay_msecs %u ", m->pg_init_delay_msecs);
> + if (m->use_default_hw_handler)
> + DMEMIT("default_hw_handler ");
> }
>
> if (!m->hw_handler_name || type == STATUSTYPE_INFO)


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-17-2012, 09:15 PM
Chandra Seetharaman
 
Default dm mpath: add 'default_hw_handler' feature

Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>

On Thu, 2012-05-10 at 17:31 -0400, Mike Snitzer wrote:
> When specifying the feature 'default_hw_handler' multipath will 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.
>
> Leverages 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.
>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> Tested-by: Babu Moger <babu.moger@netapp.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
> drivers/md/dm-mpath.c | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
>
> v3: updated to not kstrdup since scsi_dh_attached_handler_name now does
>
> Index: linux-2.6/drivers/md/dm-mpath.c
> ================================================== =================
> --- linux-2.6.orig/drivers/md/dm-mpath.c
> +++ linux-2.6/drivers/md/dm-mpath.c
> @@ -84,6 +84,7 @@ struct multipath {
> unsigned queue_io:1; /* Must we queue all I/O? */
> unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
> unsigned saved_queue_if_no_path:1; /* Saved state during suspension */
> + unsigned use_default_hw_handler:1; /* Use attached device handler */
>
> unsigned pg_init_retries; /* Number of times to retry pg_init */
> unsigned pg_init_count; /* Number of times pg_init called */
> @@ -567,6 +568,7 @@ static struct pgpath *parse_path(struct
> int r;
> struct pgpath *p;
> struct multipath *m = ti->private;
> + struct request_queue *q = NULL;
>
> /* we need at least a path arg */
> if (as->argc < 1) {
> @@ -585,9 +587,19 @@ static struct pgpath *parse_path(struct
> 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, GFP_KERNEL);
> + if (attached_handler_name) {
> + kfree(m->hw_handler_name);
> + m->hw_handler_name = attached_handler_name;
> + }
> + }
>
> + if (m->hw_handler_name) {
> r = scsi_dh_attach(q, m->hw_handler_name);
> if (r == -EBUSY) {
> /*
> @@ -759,7 +771,7 @@ static int parse_features(struct dm_arg_
> const char *arg_name;
>
> static struct dm_arg _args[] = {
> - {0, 5, "invalid number of feature args"},
> + {0, 6, "invalid number of feature args"},
> {1, 50, "pg_init_retries must be between 1 and 50"},
> {0, 60000, "pg_init_delay_msecs must be between 0 and 60000"},
> };
> @@ -780,6 +792,11 @@ static int parse_features(struct dm_arg_
> continue;
> }
>
> + if (!strcasecmp(arg_name, "default_hw_handler")) {
> + m->use_default_hw_handler = 1;
> + continue;
> + }
> +
> if (!strcasecmp(arg_name, "pg_init_retries") &&
> (argc >= 1)) {
> r = dm_read_arg(_args + 1, as, &m->pg_init_retries, &ti->error);
> @@ -1363,13 +1380,16 @@ static int multipath_status(struct dm_ta
> else {
> DMEMIT("%u ", m->queue_if_no_path +
> (m->pg_init_retries > 0) * 2 +
> - (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2);
> + (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2 +
> + m->use_default_hw_handler);
> if (m->queue_if_no_path)
> DMEMIT("queue_if_no_path ");
> if (m->pg_init_retries)
> DMEMIT("pg_init_retries %u ", m->pg_init_retries);
> if (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT)
> DMEMIT("pg_init_delay_msecs %u ", m->pg_init_delay_msecs);
> + if (m->use_default_hw_handler)
> + DMEMIT("default_hw_handler ");
> }
>
> if (!m->hw_handler_name || type == STATUSTYPE_INFO)
>


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 06-26-2012, 06:32 PM
Mike Snitzer
 
Default dm mpath: add 'default_hw_handler' feature

When specifying the feature 'default_hw_handler' multipath will 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.

Leverages 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.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Tested-by: Babu Moger <babu.moger@netapp.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
drivers/md/dm-mpath.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 638dae0..4dd3f59 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -85,6 +85,7 @@ struct multipath {
unsigned queue_io:1; /* Must we queue all I/O? */
unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
unsigned saved_queue_if_no_path:1; /* Saved state during suspension */
+ unsigned use_default_hw_handler:1; /* Use attached device handler */

unsigned pg_init_retries; /* Number of times to retry pg_init */
unsigned pg_init_count; /* Number of times pg_init called */
@@ -568,6 +569,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
int r;
struct pgpath *p;
struct multipath *m = ti->private;
+ struct request_queue *q = NULL;

/* we need at least a path arg */
if (as->argc < 1) {
@@ -586,9 +588,19 @@ 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, GFP_KERNEL);
+ if (attached_handler_name) {
+ kfree(m->hw_handler_name);
+ m->hw_handler_name = attached_handler_name;
+ }
+ }

+ if (m->hw_handler_name) {
r = scsi_dh_attach(q, m->hw_handler_name);
if (r == -EBUSY) {
/*
@@ -760,7 +772,7 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
const char *arg_name;

static struct dm_arg _args[] = {
- {0, 5, "invalid number of feature args"},
+ {0, 6, "invalid number of feature args"},
{1, 50, "pg_init_retries must be between 1 and 50"},
{0, 60000, "pg_init_delay_msecs must be between 0 and 60000"},
};
@@ -781,6 +793,11 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
continue;
}

+ if (!strcasecmp(arg_name, "default_hw_handler")) {
+ m->use_default_hw_handler = 1;
+ continue;
+ }
+
if (!strcasecmp(arg_name, "pg_init_retries") &&
(argc >= 1)) {
r = dm_read_arg(_args + 1, as, &m->pg_init_retries, &ti->error);
@@ -1364,13 +1381,16 @@ static int multipath_status(struct dm_target *ti, status_type_t type,
else {
DMEMIT("%u ", m->queue_if_no_path +
(m->pg_init_retries > 0) * 2 +
- (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2);
+ (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT) * 2 +
+ m->use_default_hw_handler);
if (m->queue_if_no_path)
DMEMIT("queue_if_no_path ");
if (m->pg_init_retries)
DMEMIT("pg_init_retries %u ", m->pg_init_retries);
if (m->pg_init_delay_msecs != DM_PG_INIT_DELAY_DEFAULT)
DMEMIT("pg_init_delay_msecs %u ", m->pg_init_delay_msecs);
+ if (m->use_default_hw_handler)
+ DMEMIT("default_hw_handler ");
}

if (!m->hw_handler_name || type == STATUSTYPE_INFO)
--
1.7.4.4

--
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 01:47 PM.

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