ceph: check the sesion state and return false in case it is closed
PATCH 1/1 ceph: check the sesion state and return false in case it is closed
From: Xiubo Li <[email protected]>
If the session is already in closed state, we should skip it.
Signed-off-by Xiubo Li <[email protected]>
--- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+)
fs/ceph/mds_client.c +1 -0
@@ -4302,6 +4302,7 @@ bool check_session_state(struct ceph_mds_session *s) }if (s->s_state ==CEPH_MDS_SESSION_NEW || s->s_state ==CEPH_MDS_SESSION_RESTARTING || + s->s_state ==CEPH_MDS_SESSION_CLOSED || s->s_state ==CEPH_MDS_SESSION_REJECTED )/* this mds is failed or recovering, just wait */ return false;
Signature · 1 line
2.27.0.221.ga08a83d.dirty
Quoted 14 lines · On Fri, 2020-07-17 at 09:25 -0400, [email protected] wrote:
From: Xiubo Li <[email protected]>
If the session is already in closed state, we should skip it.
Signed-off-by Xiubo Li <[email protected]>--- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+)fs/ceph/mds_client.c +0
-0
fs/ceph/mds_client.c bool check_session_state(struct ceph_mds_session *s) · line 4308
Quoted 7 lines
fs/ceph/mds_client.c +1
-0@@ -4302,6 +4302,7 @@ bool check_session_state(struct ceph_mds_session *s) }if (s->s_state ==CEPH_MDS_SESSION_NEW || s->s_state ==CEPH_MDS_SESSION_RESTARTING || + s->s_state ==CEPH_MDS_SESSION_CLOSED || s->s_state ==CEPH_MDS_SESSION_REJECTED )/* this mds is failed or recovering, just wait */ return false;
Looks good. I merged this into testing and rebased the metrics patches on top.
Thanks!
Signature · 1 line
Jeff Layton <[email protected]>
Quoted 10 lines · Jeff Layton
Quoted 9 lines · On Fri, 2020-07-17 at 09:25 -0400, [email protected] wrote:
From: Xiubo Li <[email protected]>
If the session is already in closed state, we should skip it.
Signed-off-by Xiubo Li <[email protected]>--- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+)
Quoted 14 lines
fs/ceph/mds_client.c bool check_session_state(struct ceph_mds_session *s) · line 4308
Quoted 12 lines
fs/ceph/mds_client.c +1
-0@@ -4302,6 +4302,7 @@ bool check_session_state(struct ceph_mds_session *s) }if (s->s_state ==CEPH_MDS_SESSION_NEW || s->s_state ==CEPH_MDS_SESSION_RESTARTING || + s->s_state ==CEPH_MDS_SESSION_CLOSED || s->s_state ==CEPH_MDS_SESSION_REJECTED )/* this mds is failed or recovering, just wait */ return false;Looks good. I merged this into testing and rebased the metrics patches on top.
Thanks Jeff.
Quoted 1 line
Thanks!