mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
ceph: don't WARN if we're force umounting
Force umount will try to close the sessions by setting the session state to _CLOSING. We don't want to WARN in this situation, since it's expected. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
a6d37ccdd2
commit
42ad631b4d
@ -4541,6 +4541,8 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
|
|||||||
|
|
||||||
bool check_session_state(struct ceph_mds_session *s)
|
bool check_session_state(struct ceph_mds_session *s)
|
||||||
{
|
{
|
||||||
|
struct ceph_fs_client *fsc = s->s_mdsc->fsc;
|
||||||
|
|
||||||
switch (s->s_state) {
|
switch (s->s_state) {
|
||||||
case CEPH_MDS_SESSION_OPEN:
|
case CEPH_MDS_SESSION_OPEN:
|
||||||
if (s->s_ttl && time_after(jiffies, s->s_ttl)) {
|
if (s->s_ttl && time_after(jiffies, s->s_ttl)) {
|
||||||
@ -4549,8 +4551,9 @@ bool check_session_state(struct ceph_mds_session *s)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CEPH_MDS_SESSION_CLOSING:
|
case CEPH_MDS_SESSION_CLOSING:
|
||||||
/* Should never reach this when we're unmounting */
|
/* Should never reach this when not force unmounting */
|
||||||
WARN_ON_ONCE(s->s_ttl);
|
WARN_ON_ONCE(s->s_ttl &&
|
||||||
|
READ_ONCE(fsc->mount_state) != CEPH_MOUNT_SHUTDOWN);
|
||||||
fallthrough;
|
fallthrough;
|
||||||
case CEPH_MDS_SESSION_NEW:
|
case CEPH_MDS_SESSION_NEW:
|
||||||
case CEPH_MDS_SESSION_RESTARTING:
|
case CEPH_MDS_SESSION_RESTARTING:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user