libceph: set CLOSED state bit in con_init
authorAlex Elder <elder@inktank.com>
Tue, 29 May 2012 16:04:58 +0000 (11:04 -0500)
committerAlex Elder <elder@dreamhost.com>
Fri, 1 Jun 2012 13:37:56 +0000 (08:37 -0500)
commita5988c490ef66cb04ea2f610681949b25c773b3c
treea2bf615fb7df0bf61ea23720a2ffe6337cba254a
parente10006f807ffc4d5b1d861305d18d9e8145891ca
libceph: set CLOSED state bit in con_init

Once a connection is fully initialized, it is really in a CLOSED
state, so make that explicit by setting the bit in its state field.

It is possible for a connection in NEGOTIATING state to get a
failure, leading to ceph_fault() and ultimately ceph_con_close().
Clear that bits if it is set in that case, to reflect that the
connection truly is closed and is no longer participating in a
connect sequence.

Issue a warning if ceph_con_open() is called on a connection that
is not in CLOSED state.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
net/ceph/messenger.c