device-mapper-multipath/0095-RHBZ-678673-no-path-groups.patch
Benjamin Marzinski b0ec4a42c8 Modify 0012-RH-udev-sync-support.patch
Modify 0021-RHBZ-548874-add-find-multipaths.patch
Modify 0022-RHBZ-557845-RHEL5-style-partitions.patch
Add 0025-RHBZ-508827-update-multipathd-manpage.patch through
    0101-RHBZ-631009-disable-udev-disk-rules-on-reload.patch
  * sync with current state of RHEL6. Next release should include a updated
    source tarball with most of these fixes rolled in.
Add 0102-RHBZ-690828-systemd-unit-file.patch
  * Add Jóhann B. Guðmundsson's unit file for systemd.
  * Add sub-package sysvinit for SysV init script.
Resolves: bz #690828
2011-07-15 12:25:48 -05:00

31 lines
959 B
Diff

---
libmultipath/dmparser.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: multipath-tools/libmultipath/dmparser.c
===================================================================
--- multipath-tools.orig/libmultipath/dmparser.c
+++ multipath-tools/libmultipath/dmparser.c
@@ -88,6 +88,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;
@@ -96,9 +97,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",
assemble_features(mp), mp->hwhandler,
- VECTOR_SIZE(mp->pg), mp->bestpg);
+ nr_priority_groups, initial_pg_nr);
if (shift >= freechar) {
fprintf(stderr, "mp->params too small\n");