Skip to content

Commit 60991fe

Browse files
Erqi Chengregkh
authored andcommitted
ceph: reconnect connection if session hang in opening state
[ Upstream commit 71a228b ] If client mds session is evicted in CEPH_MDS_SESSION_OPENING state, mds won't send session msg to client, and delayed_work skip CEPH_MDS_SESSION_OPENING state session, the session hang forever. Allow ceph_con_keepalive to reconnect a session in OPENING to avoid session hang. Also, ensure that we skip sessions in RESTARTING and REJECTED states since those states can't be resurrected by issuing a keepalive. Link: https://tracker.ceph.com/issues/41551 Signed-off-by: Erqi Chen [email protected] Reviewed-by: "Yan, Zheng" <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 3f2533b commit 60991fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ceph/mds_client.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,9 @@ static void delayed_work(struct work_struct *work)
34103410
pr_info("mds%d hung\n", s->s_mds);
34113411
}
34123412
}
3413-
if (s->s_state < CEPH_MDS_SESSION_OPEN) {
3413+
if (s->s_state == CEPH_MDS_SESSION_NEW ||
3414+
s->s_state == CEPH_MDS_SESSION_RESTARTING ||
3415+
s->s_state == CEPH_MDS_SESSION_REJECTED) {
34143416
/* this mds is failed or recovering, just wait */
34153417
ceph_put_mds_session(s);
34163418
continue;

0 commit comments

Comments
 (0)