Skip to content

Commit

Permalink
ceph: check the sesion state and return false in case it is closed
Browse files Browse the repository at this point in the history
If the session is already in closed state, we should skip it.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Xiubo Li authored and Ilya Dryomov committed Aug 3, 2020
1 parent 94f17c0 commit aaf5a47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -4303,6 +4303,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;
Expand Down

0 comments on commit aaf5a47

Please sign in to comment.