libceph: define and use an explicit CONNECTED state
authorAlex Elder <elder@inktank.com>
Wed, 23 May 2012 19:35:23 +0000 (14:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:28 +0000 (11:38 -0800)
commita94af04be86f81d5e3973a37e6a861f329418f1e
treef9894d5ba822a10d31b1cf310dfd14f47c214bb6
parentabb46df87f784b398bcdb5091175d24456e42f11
libceph: define and use an explicit CONNECTED state

(cherry picked from commit e27947c767f5bed15048f4e4dad3e2eb69133697)

There is no state explicitly defined when a ceph connection is fully
operational.  So define one.

It's set when the connection sequence completes successfully, and is
cleared when the connection gets closed.

Be a little more careful when examining the old state when a socket
disconnect event is reported.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ceph/messenger.h
net/ceph/messenger.c