aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-18 16:59:12 -0400
committerSage Weil <sage@newdream.net>2010-05-17 18:25:36 -0400
commit7e70f0ed9f3ee47394576be86c593f66832413e9 (patch)
tree2ef57fc14bff89309081eacde33f6cbaf767e867
parent34b6c855fafc54ef130649809cd580f98e3f8416 (diff)
ceph: attempt mds reconnect if mds closes our session
Currently, if our session is closed (due to a timeout, or explicit close, or whatever), we just sit there doing nothing unless/until the MDS restarts, at which point we try to reconnect. Change client to attempt an immediate reconnect if our session is closed. Note that currently the MDS doesn't support this, and our attempt will fail. We'll get a session CLOSE, our caps and dirty cap state will be dropped, and the client will be free to attempt to reconnect. That's clearly not as nice as a successful reconnect, but it at least allows us to try to carry on, and in the future the MDS will support a reconnect and we will fare better. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--fs/ceph/mds_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index e310b4be5588..525085f36db9 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2958,9 +2958,10 @@ static void con_put(struct ceph_connection *con)
2958static void peer_reset(struct ceph_connection *con) 2958static void peer_reset(struct ceph_connection *con)
2959{ 2959{
2960 struct ceph_mds_session *s = con->private; 2960 struct ceph_mds_session *s = con->private;
2961 struct ceph_mds_client *mdsc = s->s_mdsc;
2961 2962
2962 pr_err("mds%d gave us the boot. IMPLEMENT RECONNECT.\n", 2963 pr_warning("mds%d closed our session\n", s->s_mds);
2963 s->s_mds); 2964 send_mds_reconnect(mdsc, s);
2964} 2965}
2965 2966
2966static void dispatch(struct ceph_connection *con, struct ceph_msg *msg) 2967static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)