Current code switches the path-group when there is a change in priority. However,
this is not the right thing to do when failback is set to manual. This patch fixes
this problem. Call update_path_groups only if failback is immediate.
Signed-off-by: Babu Moger <babu.moger@netapp.com>
condlog(4, "path prio refresh");
if (update_prio(pp, new_path_up) &&
- pp->mpp->pgpolicyfn == (pgpolicyfn *)group_by_prio)
+ (pp->mpp->pgpolicyfn == (pgpolicyfn *)group_by_prio) &&
+ pp->mpp->pgfailback == -FAILBACK_IMMEDIATE)
update_path_groups(pp->mpp, vecs, !new_path_up);
else if (need_switch_pathgroup(pp->mpp, 0)) {
if (pp->mpp->pgfailback > 0 &&