device-mapper-multipath/0047-RHBZ-591608-only-switch-pgs-once.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

53 lines
1.6 KiB
Diff

---
multipathd/main.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
Index: multipath-tools/multipathd/main.c
===================================================================
--- multipath-tools.orig/multipathd/main.c
+++ multipath-tools/multipathd/main.c
@@ -965,6 +965,7 @@ check_path (struct vectors * vecs, struc
{
int newstate;
int oldpriority;
+ int new_path_up = 0;
if (!pp->mpp)
return;
@@ -1033,16 +1034,7 @@ check_path (struct vectors * vecs, struc
else
reinstate_path(pp, 0);
- /*
- * schedule [defered] failback
- */
- if (pp->mpp->pgfailback > 0)
- pp->mpp->failback_tick =
- pp->mpp->pgfailback + 1;
- else if (need_switch_pathgroup(pp->mpp, 1) &&
- (pp->mpp->pgfailback == -FAILBACK_IMMEDIATE ||
- followover_should_failback(pp)))
- switch_pathgroup(pp->mpp);
+ new_path_up = 1;
/*
* if at least one path is up in a group, and
@@ -1080,13 +1072,13 @@ check_path (struct vectors * vecs, struc
if (pp->priority != oldpriority &&
pp->mpp->pgpolicyfn == (pgpolicyfn *)group_by_prio)
update_path_groups(pp->mpp, vecs);
- else if (need_switch_pathgroup(pp->mpp, 0)) {
+ else if (need_switch_pathgroup(pp->mpp, new_path_up)) {
if (pp->mpp->pgfailback > 0 &&
- pp->mpp->failback_tick <= 0)
+ (new_path_up || pp->mpp->failback_tick <= 0))
pp->mpp->failback_tick =
pp->mpp->pgfailback + 1;
- else if (pp->mpp->pgfailback ==
- -FAILBACK_IMMEDIATE)
+ else if (pp->mpp->pgfailback == -FAILBACK_IMMEDIATE ||
+ (new_path_up && followover_should_failback(pp)))
switch_pathgroup(pp->mpp);
}
}