public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Yanhu Cao <gmayyyha@gmail.com>
Cc: sage@redhat.com, idryomov@gmail.com, ceph-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [v3] ceph: if we are blacklisted, __do_request returns directly
Date: Mon, 20 Apr 2020 08:16:45 -0400	[thread overview]
Message-ID: <ad6ca41f601d4feb2c3bd2850aeab95c3187bf2d.camel@kernel.org> (raw)
In-Reply-To: <20200417110723.12235-1-gmayyyha@gmail.com>

On Fri, 2020-04-17 at 19:07 +0800, Yanhu Cao wrote:
> If we mount cephfs by the recover_session option,
> __do_request can return directly until the client automatically reconnects.
> 
> Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
> ---
>  fs/ceph/mds_client.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 486f91f9685b..16ac5e5f7f79 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2708,6 +2708,12 @@ static void __do_request(struct ceph_mds_client *mdsc,
>  
>  	put_request_session(req);
>  
> +	if (mdsc->fsc->blacklisted &&
> +	    ceph_test_mount_opt(mdsc->fsc, CLEANRECOVER)) {
> +		err = -EBLACKLISTED;
> +		goto finish;
> +	}
> +

Why check for CLEANRECOVER? If we're mounted with recover_session=no
wouldn't we want to do the same thing here?

Either way, it's still blacklisted. The only difference is that it won't
attempt to automatically recover the session that way.


>  	mds = __choose_mds(mdsc, req, &random);
>  	if (mds < 0 ||
>  	    ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) {
-- 
Jeff Layton <jlayton@kernel.org>


  reply	other threads:[~2020-04-20 12:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 11:07 [v3] ceph: if we are blacklisted, __do_request returns directly Yanhu Cao
2020-04-20 12:16 ` Jeff Layton [this message]
2020-04-21  2:13   ` Yanhu Cao
2020-04-21 10:15     ` Jeff Layton
2020-04-21 12:21       ` Yanhu Cao
2020-04-23 11:04         ` Jeff Layton

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=ad6ca41f601d4feb2c3bd2850aeab95c3187bf2d.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=gmayyyha@gmail.com \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@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