if ((mpp = add_map_with_path(vecs, pp1, 0)) == NULL)
return 1;
- if (pp1->priority < 0)
+ if (pp1->priority == PRIO_UNDEF)
mpp->action = ACT_REJECT;
if (!mpp->paths) {
mpp->size);
mpp->action = ACT_REJECT;
}
- if (pp2->priority < 0)
+ if (pp2->priority == PRIO_UNDEF)
mpp->action = ACT_REJECT;
}
verify_paths(mpp, vecs, NULL);
pp->getprio_selected = 1;
}
if (!pp->getprio) {
- pp->priority = 1;
+ pp->priority = PRIO_DEFAULT;
} else if (apply_format(pp->getprio, &buff[0], pp)) {
condlog(0, "error formatting prio callout command");
- pp->priority = -1;
+ pp->priority = PRIO_UNDEF;
return 1;
} else if (execute_program(buff, prio, 16)) {
condlog(0, "error calling out %s", buff);
- pp->priority = -1;
+ pp->priority = PRIO_UNDEF;
return 1;
} else
pp->priority = atoi(prio);
if (mask & DI_CHECKER && get_state(pp))
goto blank;
- /*
- * Path state of PATH_DOWN does not necessarily prevent
- * path priority callout (or getuid callouot) from
- * succeeding since the path may be being considered
- * failed for reasons other than transport connectivity.
- */
- if (mask & DI_PRIO)
+ /*
+ * Retrieve path priority for even PATH_DOWN paths if it has never
+ * been successfully obtained before.
+ */
+ if (mask & DI_PRIO &&
+ (pp->state != PATH_DOWN || pp->priority != PRIO_UNDEF))
get_prio(pp);
if (mask & DI_WWID && !strlen(pp->wwid))
if (pp->state == PATH_UNCHECKED)
pathinfo(pp, conf->hwtable, DI_CHECKER);
- if (!pp->priority)
+ if (pp->priority == PRIO_UNDEF)
pathinfo(pp, conf->hwtable, DI_PRIO);
}
}