]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async: Postpone bind if network stack is not ready
authorHaomai Wang <haomai@xsky.com>
Tue, 4 Apr 2017 09:28:13 +0000 (17:28 +0800)
committerAmir Vadai <amir@vadai.me>
Tue, 23 May 2017 14:04:32 +0000 (17:04 +0300)
commite94ba0d2ae4d7e1df41f3de406f27fc15ac5473a
treeeaedb81b20cd7fac4254ec7566d6bb728937ee4a
parentfd14e71acaee0216dc853eab3657beeddcaad47e
msg/async: Postpone bind if network stack is not ready

RDMAStack shouldn't access hardware from the parent process.
The only reason to do so, is because bind is called before the fork.
After this patch the bind is postponed until the NetworkStack reports
that it is ready to bind.
For NetworkStack types will always return true, except the RDMAStack
which will return true only after the fork (after
AsyncMessenger::ready() is called).

This patch is based on a patch by Haomai Wang <haomai@xsky.com>

Issue: 995322
Signed-off-by: Amir Vadai <amir@vadai.me>
(cherry picked from commit a5b87e2fb83adec2b0fe060d3b22acfb1b9db1ed)

Change-Id: I5f8be4f93a5fe0f2a7ef3b29d755be52b0790c06
src/msg/async/AsyncMessenger.cc
src/msg/async/AsyncMessenger.h
src/msg/async/Stack.h
src/msg/async/rdma/RDMAStack.h