summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
99f04bd)
When a path is removed the previous checker message is still
kept in the checker context, and will be printed upon each
check. This causes multipath to print out
'path is up'
even though it already has been removed from sysfs.
Signed-off-by: Hannes Reinecke <hare@suse.de>
newstate = path_offline(pp);
if (newstate == PATH_UP)
newstate = get_state(pp, 1);
newstate = path_offline(pp);
if (newstate == PATH_UP)
newstate = get_state(pp, 1);
+ else
+ checker_clear_message(&pp->checker);
if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
condlog(2, "%s: unusable path", pp->dev);
if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
condlog(2, "%s: unusable path", pp->dev);
if (newstate != pp->state) {
int oldstate = pp->state;
pp->state = newstate;
if (newstate != pp->state) {
int oldstate = pp->state;
pp->state = newstate;
- LOG_MSG(1, checker_message(&pp->checker));
+
+ if (strlen(checker_message(&pp->checker)))
+ LOG_MSG(1, checker_message(&pp->checker));
/*
* upon state change, reset the checkint
/*
* upon state change, reset the checkint
pp->tick = pp->checkint;
}
}
pp->tick = pp->checkint;
}
}
- else if (newstate == PATH_DOWN) {
+ else if (newstate == PATH_DOWN &&
+ strlen(checker_message(&pp->checker))) {
if (conf->log_checker_err == LOG_CHKR_ERR_ONCE)
LOG_MSG(3, checker_message(&pp->checker));
else
if (conf->log_checker_err == LOG_CHKR_ERR_ONCE)
LOG_MSG(3, checker_message(&pp->checker));
else