linux_old1/include/linux/ceph
Alex Elder ce2c8903e7 libceph: start tracking connection socket state
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>
2012-06-01 08:37:56 -05:00
..
auth.h ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
buffer.h
ceph_debug.h
ceph_frag.h
ceph_fs.h ceph: drop support for preferred_osd pgs 2012-05-07 15:33:36 -07:00
ceph_hash.h
debugfs.h
decode.h ceph: fix bounds check in ceph_decode_need and ceph_encode_need 2012-05-14 12:12:27 -05:00
libceph.h libceph: embed ceph messenger structure in ceph_client 2012-06-01 08:37:56 -05:00
mdsmap.h
messenger.h libceph: start tracking connection socket state 2012-06-01 08:37:56 -05:00
mon_client.h
msgpool.h
msgr.h
osd_client.h ceph: define ceph_auth_handshake type 2012-05-17 08:18:12 -05:00
osdmap.h ceph: drop support for preferred_osd pgs 2012-05-07 15:33:36 -07:00
pagelist.h
rados.h ceph: update common header files 2011-03-21 12:24:21 -07:00
types.h