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
80 lines
2.3 KiB
Diff
80 lines
2.3 KiB
Diff
---
|
|
multipathd/main.c | 45 +++++++++++++++++++++++++++++++++++----------
|
|
1 file changed, 35 insertions(+), 10 deletions(-)
|
|
|
|
Index: multipath-tools/multipathd/main.c
|
|
===================================================================
|
|
--- multipath-tools.orig/multipathd/main.c
|
|
+++ multipath-tools/multipathd/main.c
|
|
@@ -943,14 +943,41 @@ retry_count_tick(vector mpvec)
|
|
}
|
|
}
|
|
|
|
-int update_path_groups(struct multipath *mpp, struct vectors *vecs)
|
|
+int update_prio(struct path *pp, int refresh_all)
|
|
+{
|
|
+ int oldpriority;
|
|
+ struct pathgroup * pgp;
|
|
+ int i, j, changed = 0;
|
|
+
|
|
+ if (refresh_all) {
|
|
+ vector_foreach_slot (pp->mpp->pg, pgp, i) {
|
|
+ vector_foreach_slot (pgp->paths, pp, j) {
|
|
+ oldpriority = pp->priority;
|
|
+ pathinfo(pp, conf->hwtable, DI_PRIO);
|
|
+ if (pp->priority != oldpriority)
|
|
+ changed = 1;
|
|
+ }
|
|
+ }
|
|
+ return changed;
|
|
+ }
|
|
+ oldpriority = pp->priority;
|
|
+ pathinfo(pp, conf->hwtable, DI_PRIO);
|
|
+
|
|
+ if (pp->priority == oldpriority)
|
|
+ return 0;
|
|
+ return 1;
|
|
+}
|
|
+
|
|
+int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh)
|
|
{
|
|
int i;
|
|
struct path * pp;
|
|
|
|
update_mpp_paths(mpp, vecs->pathvec);
|
|
- vector_foreach_slot (mpp->paths, pp, i)
|
|
- pathinfo(pp, conf->hwtable, DI_PRIO);
|
|
+ if (!refresh) {
|
|
+ vector_foreach_slot (mpp->paths, pp, i)
|
|
+ pathinfo(pp, conf->hwtable, DI_PRIO);
|
|
+ }
|
|
setup_map(mpp);
|
|
mpp->action = ACT_RELOAD;
|
|
if (domap(mpp) <= 0) {
|
|
@@ -969,7 +996,6 @@ void
|
|
check_path (struct vectors * vecs, struct path * pp)
|
|
{
|
|
int newstate;
|
|
- int oldpriority;
|
|
int new_path_up = 0;
|
|
|
|
if (!pp->mpp)
|
|
@@ -1072,12 +1098,11 @@ check_path (struct vectors * vecs, struc
|
|
* path prio refreshing
|
|
*/
|
|
condlog(4, "path prio refresh");
|
|
- oldpriority = pp->priority;
|
|
- pathinfo(pp, conf->hwtable, DI_PRIO);
|
|
- if (pp->priority != oldpriority &&
|
|
- pp->mpp->pgpolicyfn == (pgpolicyfn *)group_by_prio)
|
|
- update_path_groups(pp->mpp, vecs);
|
|
- else if (need_switch_pathgroup(pp->mpp, new_path_up)) {
|
|
+ if (update_prio(pp, new_path_up) &&
|
|
+ pp->mpp->pgpolicyfn == (pgpolicyfn *)group_by_prio &&
|
|
+ pp->mpp->pgfailback != -FAILBACK_FOLLOWOVER)
|
|
+ update_path_groups(pp->mpp, vecs, !new_path_up);
|
|
+ else if (need_switch_pathgroup(pp->mpp, 0)) {
|
|
if (pp->mpp->pgfailback > 0 &&
|
|
(new_path_up || pp->mpp->failback_tick <= 0))
|
|
pp->mpp->failback_tick =
|