From: Alex Mikheev Date: Sun, 13 Aug 2017 10:55:32 +0000 (+0000) Subject: src/msg/rdma: fixes failure on assert in notify() X-Git-Tag: v13.0.0~111^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=44c895ea51cd3756c6e0e88c0f35537923a00dab;p=ceph.git src/msg/rdma: fixes failure on assert in notify() The commit fixes incorrect eventfd handling introduced in 2e75b876d1e8e9c2ac556808f958fcbfeaad7d52 Signed-off-by: Alex Mikheev --- diff --git a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc index 2066696f015..90fc8e5707f 100644 --- a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc @@ -610,7 +610,10 @@ void RDMAConnectedSocketImpl::cleanup() { void RDMAConnectedSocketImpl::notify() { - int i = 1; + // note: notify_fd is an event fd (man eventfd) + // write argument must be a 64bit integer + uint64_t i = 1; + assert(sizeof(i) == write(notify_fd, &i, sizeof(i))); }