]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: handle dead tcp connections during connection negotiation historic/wip-7139
authorIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 16 Jan 2014 17:30:48 +0000 (19:30 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 21 Jan 2014 10:40:17 +0000 (12:40 +0200)
commit8b0cce9860eceea8df8828f61faae4521555f3b5
tree5473fefa68ef80d18717dc9c82206fd689d12305
parent38ff2a061c2fada5a7b87af756f2bda021291be4
libceph: handle dead tcp connections during connection negotiation

Keepalive mechanism that we are currently using doesn't handle dead
(e.g. half-open in RFC 793 sense) TCP connections: a) it's based on
pending ceph_osd_requests which are not necessarily present, and b)
keepalive byte is only sent if connection is in CON_STATE_OPEN state
because of protocol restrictions.  This does not cover connection
handshake and negotiation stages and can lead to kernel client hanging
forever.  Fix it by forcibly resetting the connection if after two
mount_timeouts we still haven't transitioned to CON_STATE_OPEN.

Fixes: http://tracker.ceph.com/issues/7139
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
include/linux/ceph/messenger.h
net/ceph/ceph_common.c
net/ceph/messenger.c