]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: fix messenger retry
authorSage Weil <sage@inktank.com>
Tue, 10 Jul 2012 18:53:34 +0000 (11:53 -0700)
committerSage Weil <sage@inktank.com>
Mon, 30 Jul 2012 16:29:52 +0000 (09:29 -0700)
commitccdce4f8fb2f6a1014be09508b0aab6e3b18479a
tree0290805d3594d770da3937da7fa68841c1e294ac
parent8f7c08837c09ac3e7bd5bca182fba1f55c909037
libceph: fix messenger retry

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>
include/linux/ceph/messenger.h
net/ceph/messenger.c