Message ID | 20200717132513.8845-1-xiubli@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: check the sesion state and return false in case it is closed | expand |
On Fri, 2020-07-17 at 09:25 -0400, xiubli@redhat.com wrote: > From: Xiubo Li <xiubli@redhat.com> > > If the session is already in closed state, we should skip it. > > Signed-off-by: Xiubo Li <xiubli@redhat.com> > --- > fs/ceph/mds_client.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c > index 887874f8ad2c..2af773168a0a 100644 > --- a/fs/ceph/mds_client.c > +++ b/fs/ceph/mds_client.c > @@ -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!
On 2020/7/17 21:32, Jeff Layton wrote: > On Fri, 2020-07-17 at 09:25 -0400, xiubli@redhat.com wrote: >> From: Xiubo Li <xiubli@redhat.com> >> >> If the session is already in closed state, we should skip it. >> >> Signed-off-by: Xiubo Li <xiubli@redhat.com> >> --- >> fs/ceph/mds_client.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c >> index 887874f8ad2c..2af773168a0a 100644 >> --- a/fs/ceph/mds_client.c >> +++ b/fs/ceph/mds_client.c >> @@ -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. > Thanks!
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 887874f8ad2c..2af773168a0a 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -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;