Skip to content

Commit acde27f

Browse files
bmarzinsmwilck
authored andcommitted
multipathd: print path offline message even without a checker
If a path has a checker selected and is offline, multipathd will print a "path offline" message. However if the checker isn't selected, for instance because multipathd was started or reconfigured while the path was offline, multipathd was not printing the "path offline" message. Fix that. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Reviewed-by: Martin Wilck <mwilck@suse.com> (cherry picked from commit 1a364a1)
1 parent 70addc2 commit acde27f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

multipathd/main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,11 @@ mpath_pr_event_handle(struct path *pp, unsigned int nr_keys_needed,
9595

9696
#define LOG_MSG(lvl, pp) \
9797
do { \
98-
if (pp->mpp && checker_selected(&pp->checker) && \
99-
lvl <= libmp_verbosity) { \
100-
if (pp->sysfs_state == PATH_DOWN) \
98+
if (pp->mpp && lvl <= libmp_verbosity) { \
99+
if (pp->sysfs_state != PATH_UP) \
101100
condlog(lvl, "%s: %s - path offline", \
102101
pp->mpp->alias, pp->dev); \
103-
else { \
102+
else if (checker_selected(&pp->checker)) { \
104103
const char *__m = \
105104
checker_message(&pp->checker); \
106105
\

0 commit comments

Comments
 (0)