summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-06-21 13:38:35 -0700
committerSage Weil <sage@newdream.net>2010-08-01 20:11:40 -0700
commitcb170a22153730eb9c82b6c85ead2001dba6c41a (patch)
treed5a4d6135fae1fda0f033c206237f54567cad707 /fs/ceph/mds_client.c
parented0552a1a21d2f2692b84c366ce04ad17377780c (diff)
downloadop-kernel-dev-cb170a22153730eb9c82b6c85ead2001dba6c41a.zip
op-kernel-dev-cb170a22153730eb9c82b6c85ead2001dba6c41a.tar.gz
ceph: connect to export targets if mds is laggy
If an MDS we are talking to may have failed, we need to open sessions to its potential export targets to ensure that any in-progress migration that may have involved some of our caps is properly handled. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 462602e..552b934 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2470,6 +2470,21 @@ static void check_new_map(struct ceph_mds_client *mdsc,
wake_up_session_caps(s, 1);
}
}
+
+ for (i = 0; i < newmap->m_max_mds && i < mdsc->max_sessions; i++) {
+ s = mdsc->sessions[i];
+ if (!s)
+ continue;
+ if (!ceph_mdsmap_is_laggy(newmap, i))
+ continue;
+ if (s->s_state == CEPH_MDS_SESSION_OPEN ||
+ s->s_state == CEPH_MDS_SESSION_HUNG ||
+ s->s_state == CEPH_MDS_SESSION_CLOSING) {
+ dout(" connecting to export targets of laggy mds%d\n",
+ i);
+ __open_export_target_sessions(mdsc, s);
+ }
+ }
}
OpenPOWER on IntegriCloud