diff options
author | Sage Weil <sage@newdream.net> | 2010-06-21 16:38:35 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-08-01 23:11:40 -0400 |
commit | cb170a22153730eb9c82b6c85ead2001dba6c41a (patch) | |
tree | d5a4d6135fae1fda0f033c206237f54567cad707 /fs/ceph | |
parent | ed0552a1a21d2f2692b84c366ce04ad17377780c (diff) |
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')
-rw-r--r-- | fs/ceph/mds_client.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 462602ec7fb1..552b934c9cd0 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, | |||
2470 | wake_up_session_caps(s, 1); | 2470 | wake_up_session_caps(s, 1); |
2471 | } | 2471 | } |
2472 | } | 2472 | } |
2473 | |||
2474 | for (i = 0; i < newmap->m_max_mds && i < mdsc->max_sessions; i++) { | ||
2475 | s = mdsc->sessions[i]; | ||
2476 | if (!s) | ||
2477 | continue; | ||
2478 | if (!ceph_mdsmap_is_laggy(newmap, i)) | ||
2479 | continue; | ||
2480 | if (s->s_state == CEPH_MDS_SESSION_OPEN || | ||
2481 | s->s_state == CEPH_MDS_SESSION_HUNG || | ||
2482 | s->s_state == CEPH_MDS_SESSION_CLOSING) { | ||
2483 | dout(" connecting to export targets of laggy mds%d\n", | ||
2484 | i); | ||
2485 | __open_export_target_sessions(mdsc, s); | ||
2486 | } | ||
2487 | } | ||
2473 | } | 2488 | } |
2474 | 2489 | ||
2475 | 2490 | ||