ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Luis Henriques <lhenriques@suse.de>,
	Ilya Dryomov <idryomov@gmail.com>, Xiubo Li <xiubli@redhat.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: don't WARN if we're still opening a session to an MDS
Date: Thu, 15 Jul 2021 10:02:41 -0400	[thread overview]
Message-ID: <98f3852d84645b88963f987bb3373bb56ddd8d3e.camel@kernel.org> (raw)
In-Reply-To: <20210715134039.10466-1-lhenriques@suse.de>

On Thu, 2021-07-15 at 14:40 +0100, Luis Henriques wrote:
> 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: 62575e270f66 ("ceph: check session state after bumping session->s_seq")
> Signed-off-by: Luis Henriques <lhenriques@suse.de>
> ---
>  fs/ceph/mds_client.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index e5af591d3bd4..86f09b1110a2 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -4468,7 +4468,7 @@ bool check_session_state(struct ceph_mds_session *s)
>  		break;
>  	case CEPH_MDS_SESSION_CLOSING:
>  		/* Should never reach this when we're unmounting */
> -		WARN_ON_ONCE(true);
> +		WARN_ON_ONCE(s->s_ttl);
>  		fallthrough;
>  	case CEPH_MDS_SESSION_NEW:
>  	case CEPH_MDS_SESSION_RESTARTING:

Mea culpa -- I've been meaning to fix that up. I'll plan to merge this
later today.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>


      reply	other threads:[~2021-07-15 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 13:40 [PATCH] ceph: don't WARN if we're still opening a session to an MDS Luis Henriques
2021-07-15 14:02 ` Jeff Layton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98f3852d84645b88963f987bb3373bb56ddd8d3e.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=lhenriques@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiubli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).