* [PATCH] ceph: don't WARN if we're still opening a session to an MDS
@ 2021-07-15 13:40 Luis Henriques
2021-07-15 14:02 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Luis Henriques @ 2021-07-15 13:40 UTC (permalink / raw)
To: Jeff Layton, Ilya Dryomov, Xiubo Li
Cc: ceph-devel, linux-kernel, Luis Henriques
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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: don't WARN if we're still opening a session to an MDS
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2021-07-15 14:02 UTC (permalink / raw)
To: Luis Henriques, Ilya Dryomov, Xiubo Li; +Cc: ceph-devel, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-15 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).