aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-22 14:51:18 -0700
committerSage Weil <sage@newdream.net>2010-03-23 07:47:01 -0700
commit87b315a5b5cec5d7086494b203577602f5befc8c (patch)
tree18e1638619a51cdf4605bad5b4270841450cf211 /fs/ceph/messenger.h
parentceph: rename r_sent_stamp r_stamp (diff)
downloadlinux-dev-87b315a5b5cec5d7086494b203577602f5befc8c.tar.xz
linux-dev-87b315a5b5cec5d7086494b203577602f5befc8c.zip
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>
Diffstat (limited to 'fs/ceph/messenger.h')
-rw-r--r--fs/ceph/messenger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h
index 4caaa5911110..a343dae73cdc 100644
--- a/fs/ceph/messenger.h
+++ b/fs/ceph/messenger.h
@@ -223,6 +223,7 @@ extern void ceph_con_init(struct ceph_messenger *msgr,
struct ceph_connection *con);
extern void ceph_con_open(struct ceph_connection *con,
struct ceph_entity_addr *addr);
+extern bool ceph_con_opened(struct ceph_connection *con);
extern void ceph_con_close(struct ceph_connection *con);
extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg);
extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg);