]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: distinguish two phases of connect sequence
authorAlex Elder <elder@inktank.com>
Thu, 24 May 2012 16:55:03 +0000 (11:55 -0500)
committerSage Weil <sage@inktank.com>
Fri, 6 Jul 2012 04:14:30 +0000 (21:14 -0700)
commit4f25cfbee0b29d925c10c298573cb8c40caaf315
treef660bc222db9b74305b8a2b8cc25d508bd0596a5
parente82884fceaea275ffd539f73ce8f4b601b94e78a
libceph: distinguish two phases of connect sequence

Currently a ceph connection enters a "CONNECTING" state when it
begins the process of (re-)connecting with its peer.  Once the two
ends have successfully exchanged their banner and addresses, an
additional NEGOTIATING bit is set in the ceph connection's state to
indicate the connection information exhange has begun.  The
CONNECTING bit/state continues to be set during this phase.

Rather than have the CONNECTING state continue while the NEGOTIATING
bit is set, interpret these two phases as distinct states.  In other
words, when NEGOTIATING is set, clear CONNECTING.  That way only
one of them will be active at a time.

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