ceph: remove incorrect session state check
PATCH 1/1 ceph: remove incorrect session state check
From: Xiubo Li <[email protected]>
Once the session is opened the s->s_ttl will be set, and when receiving a new mdsmap and the MDS map is changed, it will be possibly will close some sessions and open new ones. And then some sessions will be in CLOSING state evening without unmounting.
URL: https://tracker.ceph.com/issues/54979
--- fs/ceph/mds_client.c | 6 ------ 1 file changed, 6 deletions(-)
fs/ceph/mds_client.c +0 -6
@@ -4779,8 +4779,6 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)bool check_session_state (struct ceph_mds_session *s) { -struct ceph_fs_client *fsc = s->s_mdsc->fsc; -switch (s->s_state) {case CEPH_MDS_SESSION_OPEN :if (s->s_ttl &&time_after (jiffies, s->s_ttl)) {
@@ -4789,10 +4787,6 @@ bool check_session_state(struct ceph_mds_session *s) }break ;case CEPH_MDS_SESSION_CLOSING : -/* Should never reach this when not force unmounting */ -WARN_ON_ONCE (s->s_ttl && -READ_ONCE (fsc->mount_state) !=CEPH_MOUNT_SHUTDOWN ); - fallthrough;case CEPH_MDS_SESSION_NEW :case CEPH_MDS_SESSION_RESTARTING :case CEPH_MDS_SESSION_CLOSED :
Signature · 1 line
2.27.0
Quoted 27 lines · On Tue, 2022-03-22 at 11:15 +0800, [email protected] wrote:
From: Xiubo Li <[email protected]>
Once the session is opened the
s->s_ttlwill be set, and when receiving a new mdsmap and the MDS map is changed, it will be possibly will close some sessions and open new ones. And then some sessions will be in CLOSING state evening without unmounting.URL: https://tracker.ceph.com/issues/54979
Signed-off-by Xiubo Li <[email protected]>--- fs/ceph/mds_client.c | 6 ------ 1 file changed, 6 deletions(-)fs/ceph/mds_client.c +0
-2@@ -4779,8 +4779,6 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)bool check_session_state (struct ceph_mds_session *s) { -struct ceph_fs_client *fsc = s->s_mdsc->fsc; -switch (s->s_state) {case CEPH_MDS_SESSION_OPEN :if (s->s_ttl &&time_after (jiffies, s->s_ttl)) {
fs/ceph/mds_client.c bool check_session_state(struct ceph_mds_session *s) · line 4792
Quoted 10 lines
fs/ceph/mds_client.c +0
-4@@ -4789,10 +4787,6 @@ bool check_session_state(struct ceph_mds_session *s) }break ;case CEPH_MDS_SESSION_CLOSING : -/* Should never reach this when not force unmounting */ -WARN_ON_ONCE (s->s_ttl && -READ_ONCE (fsc->mount_state) !=CEPH_MOUNT_SHUTDOWN ); - fallthrough;case CEPH_MDS_SESSION_NEW :case CEPH_MDS_SESSION_RESTARTING :case CEPH_MDS_SESSION_CLOSED :