]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: replace connection state bits with states
authorSage Weil <sage@inktank.com>
Sat, 21 Jul 2012 00:24:40 +0000 (17:24 -0700)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:16:00 +0000 (18:16 -0700)
commitaef3069b711668fa52b1bc7a4d961a3a817bee5a
tree72e96abb5bc27d2a185cdea2f08a090302f0ede3
parent6b3d0d877ea4f364af9ee604a0dbbeaadbb9d7c2
libceph: replace connection state bits with states

Use a simple set of 6 enumerated values for the socket states (CON_STATE_*)
and use those instead of the state bits.  All of the con->state checks are
now under the protection of the con mutex, so this is safe.  It also
simplifies many of the state checks because we can check for anything other
than the expected state instead of various bits for races we can think of.

This appears to hold up well to stress testing both with and without socket
failure injection on the server side.

Signed-off-by: Sage Weil <sage@inktank.com>
include/linux/ceph/messenger.h
net/ceph/messenger.c