multipathd/main.c: delete redundant judgment before LOG_MSG()
PATCH 1/1 multipathd/main.c: delete redundant judgment before LOG_MSG()
From: "li.minghui" <[email protected]>
Problem:the LOG_MSG() doesn't note the path info "path offline" when the path is in offline with the pp->offline = 1.
Reasons:There is no need to judge the strlen(b) again before calling LOG_MSG(a, b) because there exists the judgmnet of strlen(b) in defination of LOG_MSG(a,b).
--- multipathd/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
multipathd/main.c +3 -6
@@ -1454,8 +1454,7 @@ void repair_path(struct path * pp)return ;checker_repair (&pp->checker); -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker)); }/*
@@ -1590,8 +1589,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)int oldstate = pp->state; pp->state = newstate; -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker));/* * upon state change, reset the checkint
@@ -1703,8 +1701,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks) pp->tick = pp->checkint; } } -else if (newstate ==PATH_DOWN && -strlen (checker_message (&pp->checker))) { +else if (newstate ==PATH_DOWN ) {int log_checker_err; conf =get_multipath_config ();
Signature · 1 line
2.8.1.windows.1
Benjamin Marzinski
maintainerQuoted 8 lines · On Tue, Oct 18, 2016 at 05:11:45PM +0800, [email protected] wrote:
From: "li.minghui" <[email protected]>
Problem:the
LOG_MSG()doesn't note the path info "path offline" when the path is in offline with thepp->offline= 1.Reasons:There is no need to judge the strlen(b) again before calling
LOG_MSG(a, b)because there exists the judgmnet of strlen(b) in defination ofLOG_MSG(a,b).
ACK
-Ben
Quoted 40 lines
--- multipathd/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)multipathd/main.c +3
-6@@ -1454,8 +1454,7 @@ void repair_path(struct path * pp)return ;checker_repair (&pp->checker); -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker)); }/* @@ -1590,8 +1589,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)int oldstate = pp->state; pp->state = newstate; -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker));/* * upon state change, reset the checkint @@ -1703,8 +1701,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks) pp->tick = pp->checkint; } } -else if (newstate ==PATH_DOWN && -strlen (checker_message (&pp->checker))) { +else if (newstate ==PATH_DOWN ) {int log_checker_err; conf =get_multipath_config ();Signature · 1 line
2.8.1.windows.1
Merged.
Quoted 57 lines · Benjamin Marzinski
Quoted 8 lines · On Tue, Oct 18, 2016 at 05:11:45PM +0800, [email protected] wrote:
From: "li.minghui" <[email protected]>
Problem:the
LOG_MSG()doesn't note the path info "path offline" when the path is in offline with thepp->offline= 1.Reasons:There is no need to judge the strlen(b) again before calling
LOG_MSG(a, b)because there exists the judgmnet of strlen(b) in defination ofLOG_MSG(a,b).ACK
-Ben
multipathd/main.c check_path (struct vectors * vecs, struct path *
Quoted 19 lines
--- multipathd/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)multipathd/main.c +1
-2@@ -1454,8 +1454,7 @@ void repair_path(struct path * pp)return ;checker_repair (&pp->checker); -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker)); }/* @@ -1590,8 +1589,7 @@ check_path (struct vectors * vecs, struct path *pp, int ticks)
multipathd/main.c check_path (struct vectors * vecs, struct path *
Quoted 10 lines
multipathd/main.c +1
-2int oldstate = pp->state; pp->state = newstate; -if (strlen (checker_message (&pp->checker))) -LOG_MSG (1 ,checker_message (&pp->checker)); +LOG_MSG (1 ,checker_message (&pp->checker));/* * upon state change, reset the checkint @@ -1703,8 +1701,7 @@ check_path (struct vectors * vecs, struct path *pp, int ticks)
Quoted 11 lines
multipathd/main.c +1
-3pp->tick = pp->checkint; } } -else if (newstate ==PATH_DOWN && -strlen (checker_message (&pp->checker))) { +else if (newstate ==PATH_DOWN ) {int log_checker_err; conf =get_multipath_config (); --2.8.1.windows.1