From daca8f6873658af24c62d1b728cae57d30554c0d Mon Sep 17 00:00:00 2001 From: Avner BenHanoch Date: Tue, 6 Dec 2016 09:38:36 +0000 Subject: [PATCH] msg/async/rdma: fix bad message that went to the user 1. the printed value of "bad length" was incorrect, because 'r' was changed before the log line. 2. log appeared to user as error even though everything was calm; hence, reducing its severity issue: 914840 Change-Id: I41520d27fc53fbbe07b61dd915e16448b87769d5 Signed-off-by: Avner BenHanoch --- src/msg/async/rdma/Infiniband.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/rdma/Infiniband.cc b/src/msg/async/rdma/Infiniband.cc index 68a4eb22161..591afeb080c 100644 --- a/src/msg/async/rdma/Infiniband.cc +++ b/src/msg/async/rdma/Infiniband.cc @@ -343,8 +343,8 @@ int Infiniband::recv_msg(CephContext *cct, int sd, IBSYNMsg& im) } else if (r == 0) { // valid disconnect message of length 0 ldout(cct, 10) << __func__ << " got disconnect message " << dendl; } else if ((size_t)r != sizeof(msg)) { // invalid message + ldout(cct, 1) << __func__ << " got bad length (" << r << "): " << cpp_strerror(errno) << dendl; r = -EINVAL; - lderr(cct) << __func__ << " got bad length (" << r << "): " << cpp_strerror(errno) << dendl; } else { // valid message sscanf(msg, "%x:%x:%x:%x:%s", &(im.lid), &(im.qpn), &(im.psn), &(im.peer_qpn),gid); wire_gid_to_gid(gid, &(im.gid));