]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
AsyncConnection: create writable event for in progress connection 10003/head
authorHaomai Wang <haomai@xsky.com>
Thu, 12 May 2016 04:01:35 +0000 (12:01 +0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 29 Jun 2016 08:33:01 +0000 (10:33 +0200)
commit3dbb08a069c8e8238d2884a78b04f0a0d01a36e3
treee25cd7afbf478ea17339c6a4ec639684116d0021
parent38a25420a0120288029d65cf924f1cbe5f3eb3fd
AsyncConnection: create writable event for in progress connection

Previously we use a tricky with ceph msgr protocol, if initiator side got
in progress connection state, it will wait until read event. Because if
tcp session built successfully server side will send the banner firstly
and initiator side will get read event. Otherwise, if connection failed,
read event also be called.

But actually man(2)[http://man7.org/linux/man-pages/man2/connect.2.html]
specify if we want to get notification whether connection built, we need
to listen writable event. It means when connection built, send buffer
is ready to be written.

This patch follow the strict nonblock connect process. Not fully sure fix
http://tracker.ceph.com/issues/15849

Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit a74ce419133881ff8618733a0501c4a47e1368e3)
src/msg/async/AsyncConnection.cc