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-20-2011, 09:24 PM
Mike Snitzer
 
Default multipathd: use 0 for initial pg if there are no priority groups

dm-multipath now accommodates a DM table that doesn't have any priority
groups, see: http://git.kernel.org/linus/a490a07a67b7a37

That kernel change imposes that multipathd must pass 0 for the initial
priority group if there aren't any priority groups (currently passes 1).

There is no need to check the multipath target version to decide whether
to pass an initial_pg of 0 or 1 because until recently dm-multipath
never accommodated a DM table with no priority groups.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
libmultipath/dmparser.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 1ef3aad..0803bec 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -52,6 +52,7 @@ assemble_map (struct multipath * mp)
int i, j;
int shift, freechar;
int minio;
+ int nr_priority_groups, initial_pg_nr;
char * p;
struct pathgroup * pgp;
struct path * pp;
@@ -60,9 +61,12 @@ assemble_map (struct multipath * mp)
p = mp->params;
freechar = sizeof(mp->params);

+ nr_priority_groups = VECTOR_SIZE(mp->pg);
+ initial_pg_nr = (nr_priority_groups ? mp->bestpg : 0);
+
shift = snprintf(p, freechar, "%s %s %i %i",
mp->features, mp->hwhandler,
- VECTOR_SIZE(mp->pg), mp->bestpg);
+ nr_priority_groups, initial_pg_nr);

if (shift >= freechar) {
fprintf(stderr, "mp->params too small
");
--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-21-2011, 04:35 AM
Christophe Varoqui
 
Default multipathd: use 0 for initial pg if there are no priority groups

On mer., 2011-04-20 at 17:24 -0400, Mike Snitzer wrote:
> dm-multipath now accommodates a DM table that doesn't have any priority
> groups, see: http://git.kernel.org/linus/a490a07a67b7a37
>
> That kernel change imposes that multipathd must pass 0 for the initial
> priority group if there aren't any priority groups (currently passes 1).
>
> There is no need to check the multipath target version to decide whether
> to pass an initial_pg of 0 or 1 because until recently dm-multipath
> never accommodated a DM table with no priority groups.
>
Applied.

--
Christophe Varoqui
OpenSVC - Software to scale
http://www.opensvc.com/

--
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 09:57 PM.

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