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 <[email protected]>
---
 multipathd/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 2140e432..69e4808f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -96,12 +96,11 @@ mpath_pr_event_handle(struct path *pp, unsigned int 
nr_keys_needed,
 
 #define LOG_MSG(lvl, pp)                                       \
 do {                                                           \
-       if (pp->mpp && checker_selected(&pp->checker) &&        \
-           lvl <= libmp_verbosity) {                                   \
+       if (pp->mpp && lvl <= libmp_verbosity) {                \
                if (pp->sysfs_state == PATH_DOWN)               \
                        condlog(lvl, "%s: %s - path offline",   \
                                pp->mpp->alias, pp->dev);       \
-               else  {                                         \
+               else if (checker_selected(&pp->checker)) {      \
                        const char *__m =                       \
                                checker_message(&pp->checker);  \
                                                                \
-- 
2.50.1


Reply via email to