b0ec4a42c8
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
24 lines
807 B
Diff
24 lines
807 B
Diff
diff --git a/libmultipath/print.c b/libmultipath/print.c
|
|
index 10e5ce5..9753fe2 100644
|
|
--- a/libmultipath/print.c
|
|
+++ b/libmultipath/print.c
|
|
@@ -378,6 +378,7 @@ snprint_pg_selector (char * buff, size_t len, struct pathgroup * pgp)
|
|
static int
|
|
snprint_pg_pri (char * buff, size_t len, struct pathgroup * pgp)
|
|
{
|
|
+ int avg_priority = 0;
|
|
/*
|
|
* path group priority is not updated for every path prio change,
|
|
* but only on switch group code path.
|
|
@@ -385,7 +386,9 @@ snprint_pg_pri (char * buff, size_t len, struct pathgroup * pgp)
|
|
* Printing is another reason to update.
|
|
*/
|
|
path_group_prio_update(pgp);
|
|
- return snprint_int(buff, len, pgp->priority);
|
|
+ if (pgp->enabled_paths)
|
|
+ avg_priority = pgp->priority / pgp->enabled_paths;
|
|
+ return snprint_int(buff, len, avg_priority);
|
|
}
|
|
|
|
static int
|