[dm-devel] [PATCH 15/57] libmultipath: correctly display checker status

Hannes Reinecke hare at suse.de
Wed Apr 27 11:10:16 UTC 2016


The '%d chk' message should only be used if there are active paths,
otherwise the path checker most certainly haven't been run.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 libmultipath/print.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/print.c b/libmultipath/print.c
index 96a1680..7fec6e9 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -177,7 +177,7 @@ snprint_queueing (char * buff, size_t len, struct multipath * mpp)
 		if (mpp->retry_tick > 0)
 			return snprintf(buff, len, "%i sec",
 					mpp->retry_tick);
-		else if (mpp->retry_tick == 0)
+		else if (mpp->retry_tick == 0 && mpp->nr_active > 0)
 			return snprintf(buff, len, "%i chk",
 					mpp->no_path_retry);
 		else
-- 
2.6.6




More information about the dm-devel mailing list