aboutsummaryrefslogtreecommitdiff
path: root/scripts/docproc.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-22 22:15:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 11:38:22 -0800
commit0bcd15777405bf024a3ec591731582f7263ea1c0 (patch)
treee6e909ce1c506b160a4f8121701681fd5a697778 /scripts/docproc.c
parentbc327474a0c9f3477be61b2d3e33833ef7b01bf9 (diff)
libceph: start tracking connection socket state
(cherry picked from commit ce2c8903e76e690846a00a0284e4bd9ee954d680) Start explicitly keeping track of the state of a ceph connection's socket, separate from the state of the connection itself. Create placeholder functions to encapsulate the state transitions. -------- | NEW* | transient initial state -------- | con_sock_state_init() v ---------- | CLOSED | initialized, but no socket (and no ---------- TCP connection) ^ \ | \ con_sock_state_connecting() | ---------------------- | \ + con_sock_state_closed() \ |\ \ | \ \ | ----------- \ | | CLOSING | socket event; \ | ----------- await close \ | ^ | | | | | + con_sock_state_closing() | | / \ | | / --------------- | | / \ v | / -------------- | / -----------------| CONNECTING | socket created, TCP | | / -------------- connect initiated | | | con_sock_state_connected() | | v ------------- | CONNECTED | TCP connection established ------------- Make the socket state an atomic variable, reinforcing that it's a distinct transtion with no possible "intermediate/both" states. This is almost certainly overkill at this point, though the transitions into CONNECTED and CLOSING state do get called via socket callback (the rest of the transitions occur with the connection mutex held). We can back out the atomicity later. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil<sage@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/docproc.c')
0 files changed, 0 insertions, 0 deletions