The intention of this code was to warn only once for each unsupported
protocol. But the condition statement is missing.
Fixes: 6ad77db ("libmultipath: Set the scsi timeout parameters by path")
Signed-off-by: Martin Wilck <[email protected]>
---
libmultipath/discovery.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 9d0f6d9..f8b514b 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -888,6 +888,9 @@ scsi_tmo_error_msg(struct path *pp)
/* make sure the bitfield is large enough */
BUILD_BUG_ON((LAST_BUS_PROTOCOL_ID + 1) > bits_per_slot);
+
+ if (is_bit_set_in_bitfield(proto_id, bf))
+ return;
snprint_path_protocol(&proto_buf, pp);
condlog(2, "%s: setting scsi timeouts is unsupported for protocol %s",
pp->dev, get_strbuf_str(&proto_buf));
--
2.52.0