]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: avoid reopening osd connections when address hasn't changed
authorSage Weil <sage@newdream.net>
Mon, 22 Mar 2010 21:51:18 +0000 (14:51 -0700)
committerSage Weil <sage@newdream.net>
Tue, 23 Mar 2010 14:47:01 +0000 (07:47 -0700)
commit43c983a842a998a690a9153b921644e7eef74382
tree18e1638619a51cdf4605bad5b4270841450cf211
parentb18bddf34bffbcdc58b3c1cb8363e26124840adc
ceph: avoid reopening osd connections when address hasn't changed

We get a fault callback on _every_ tcp connection fault.  Normally, we
want to reopen the connection when that happens.  If the address we have
is bad, however, and connection attempts always result in a connection
refused or similar error, explicitly closing and reopening the msgr
connection just prevents the messenger's backoff logic from kicking in.
The result can be a console full of

[ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed

Instead, if we get a fault, and have outstanding requests, but the osd
address hasn't changed and the connection never successfully connected in
the first place, do nothing to the osd connection.  The messenger layer
will back off and retry periodically, because we never connected and thus
the lossy bit is not set.

Instead, touch each request's r_stamp so that handle_timeout can tell the
request is still alive and kicking.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/messenger.c
fs/ceph/messenger.h
fs/ceph/osd_client.c