]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/msg/rdma: fixes failure on assert in notify() 17007/head
authorAlex Mikheev <alexm@mellanox.com>
Sun, 13 Aug 2017 10:55:32 +0000 (10:55 +0000)
committerAlex Mikheev <alexm@mellanox.com>
Sun, 13 Aug 2017 10:55:32 +0000 (10:55 +0000)
The commit fixes incorrect eventfd handling introduced in
2e75b876d1e8e9c2ac556808f958fcbfeaad7d52

Signed-off-by: Alex Mikheev <alexm@mellanox.com>
src/msg/async/rdma/RDMAConnectedSocketImpl.cc

index 2066696f0156175d112d1ebd0cc4199ac4b12183..90fc8e5707f8463a90d59ad852c32eb064ca7b92 100644 (file)
@@ -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)));
 }