mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ceph: close stopped mds' session
If a mds has stopped, close its session and clean up its session requests/caps. The process is similar to handling SESSION_CLOSE initiated by mds. Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
parent
0a07fc8cd0
commit
2827528da0
1 changed files with 16 additions and 0 deletions
|
|
@ -3136,6 +3136,22 @@ static void check_new_map(struct ceph_mds_client *mdsc,
|
|||
__unregister_session(mdsc, s);
|
||||
__wake_requests(mdsc, &s->s_waiting);
|
||||
ceph_put_mds_session(s);
|
||||
} else if (i >= newmap->m_num_mds) {
|
||||
/* force close session for stopped mds */
|
||||
get_session(s);
|
||||
__unregister_session(mdsc, s);
|
||||
__wake_requests(mdsc, &s->s_waiting);
|
||||
kick_requests(mdsc, i);
|
||||
mutex_unlock(&mdsc->mutex);
|
||||
|
||||
mutex_lock(&s->s_mutex);
|
||||
cleanup_session_requests(mdsc, s);
|
||||
remove_session_caps(s);
|
||||
mutex_unlock(&s->s_mutex);
|
||||
|
||||
ceph_put_mds_session(s);
|
||||
|
||||
mutex_lock(&mdsc->mutex);
|
||||
} else {
|
||||
/* just close it */
|
||||
mutex_unlock(&mdsc->mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue