Skip to content

Commit cdb330f

Browse files
Luis Henriquesidryomov
authored andcommitted
ceph: don't WARN if we're still opening a session to an MDS
If MDSs aren't available while mounting a filesystem, the session state will transition from SESSION_OPENING to SESSION_CLOSING. And in that scenario check_session_state() will be called from delayed_work() and trigger this WARN. Avoid this by only WARNing after a session has already been established (i.e., the s_ttl will be different from 0). Fixes: 62575e2 ("ceph: check session state after bumping session->s_seq") Signed-off-by: Luis Henriques <lhenriques@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent ed9eb71 commit cdb330f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/ceph/mds_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4456,7 +4456,7 @@ bool check_session_state(struct ceph_mds_session *s)
44564456
break;
44574457
case CEPH_MDS_SESSION_CLOSING:
44584458
/* Should never reach this when we're unmounting */
4459-
WARN_ON_ONCE(true);
4459+
WARN_ON_ONCE(s->s_ttl);
44604460
fallthrough;
44614461
case CEPH_MDS_SESSION_NEW:
44624462
case CEPH_MDS_SESSION_RESTARTING:

0 commit comments

Comments
 (0)