]> git.karo-electronics.de Git - karo-tx-linux.git/commit
libceph: fix messenger retry
authorSage Weil <sage@inktank.com>
Tue, 10 Jul 2012 18:53:34 +0000 (11:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:10 +0000 (11:38 -0800)
commit49da293c7dc4401c2c7963a2c70f633b1c8fa8c5
tree7e61b4bfd7e2c192ba47b8db4866f3f9e7c039c2
parent21cbad59b07693104dda76ee4afef41302b2b8fb
libceph: fix messenger retry

(cherry picked from commit 5bdca4e0768d3e0f4efa43d9a2cc8210aeb91ab9)

In ancient times, the messenger could both initiate and accept connections.
An artifact if that was data structures to store/process an incoming
ceph_msg_connect request and send an outgoing ceph_msg_connect_reply.
Sadly, the negotiation code was referencing those structures and ignoring
important information (like the peer's connect_seq) from the correct ones.

Among other things, this fixes tight reconnect loops where the server sends
RETRY_SESSION and we (the client) retries with the same connect_seq as last
time.  This bug pretty easily triggered by injecting socket failures on the
MDS and running some fs workload like workunits/direct_io/test_sync_io.

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