From: "Yan, Zheng" <ukernel@gmail.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel <ceph-devel@vger.kernel.org>,
Ilya Dryomov <idryomov@gmail.com>,
Patrick Donnelly <pdonnell@redhat.com>
Subject: Re: [RFC PATCH 4/4] ceph: queue request when CLEANRECOVER is set
Date: Tue, 29 Sep 2020 16:31:27 +0800 [thread overview]
Message-ID: <CAAM7YAnNQG7-iV_LcV2Uc1qCsUFeVu1j+G426sG4ruZs=E_n+w@mail.gmail.com> (raw)
In-Reply-To: <20200925140851.320673-5-jlayton@kernel.org>
On Fri, Sep 25, 2020 at 10:08 PM Jeff Layton <jlayton@kernel.org> wrote:
>
> Ilya noticed that the first access to a blacklisted mount would often
> get back -EACCES, but then subsequent calls would be OK. The problem is
> in __do_request. If the session is marked as REJECTED, a hard error is
> returned instead of waiting for a new session to come into being.
>
> When the session is REJECTED and the mount was done with
> recover_session=clean, queue the request to the waiting_for_map queue,
> which will be awoken after tearing down the old session.
>
> URL: https://tracker.ceph.com/issues/47385
> Reported-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/ceph/mds_client.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index fd16db6ecb0a..b07e7adf146f 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2819,7 +2819,10 @@ static void __do_request(struct ceph_mds_client *mdsc,
> if (session->s_state != CEPH_MDS_SESSION_OPEN &&
> session->s_state != CEPH_MDS_SESSION_HUNG) {
> if (session->s_state == CEPH_MDS_SESSION_REJECTED) {
> - err = -EACCES;
> + if (ceph_test_mount_opt(mdsc->fsc, CLEANRECOVER))
> + list_add(&req->r_wait, &mdsc->waiting_for_map);
> + else
> + err = -EACCES;
During recovering session, client drops all dirty caps and abort all
osd requests. It does not make sense , some operations are waiting,
the others get aborted.
> goto out_session;
> }
> /*
> --
> 2.26.2
>
next prev parent reply other threads:[~2020-09-29 8:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 14:08 [RFC PATCH 0/4] ceph: fix spurious recover_session=clean errors Jeff Layton
2020-09-25 14:08 ` [RFC PATCH 1/4] ceph: don't WARN when removing caps due to blocklisting Jeff Layton
2020-09-25 14:08 ` [RFC PATCH 2/4] ceph: don't mark mount as SHUTDOWN when recovering session Jeff Layton
2020-09-29 8:20 ` Yan, Zheng
2020-09-29 12:30 ` Jeff Layton
2020-09-25 14:08 ` [RFC PATCH 3/4] ceph: remove timeout on allowing reconnect after blocklisting Jeff Layton
2020-09-25 14:08 ` [RFC PATCH 4/4] ceph: queue request when CLEANRECOVER is set Jeff Layton
2020-09-29 8:31 ` Yan, Zheng [this message]
2020-09-29 12:46 ` Jeff Layton
2020-09-29 19:55 ` Jeff Layton
2020-09-29 8:28 ` [RFC PATCH 0/4] ceph: fix spurious recover_session=clean errors Yan, Zheng
2020-09-29 8:54 ` Ilya Dryomov
2020-09-29 10:44 ` Yan, Zheng
2020-09-29 10:58 ` Ilya Dryomov
2020-09-29 12:48 ` Jeff Layton
2020-09-29 19:50 ` Jeff Layton
2020-09-30 8:45 ` Yan, Zheng
2020-09-30 17:55 ` Jeff Layton
2020-09-30 12:10 ` [RFC PATCH v2 " Jeff Layton
2020-09-30 12:10 ` [RFC PATCH v2 1/4] ceph: don't WARN when removing caps due to blocklisting Jeff Layton
2020-09-30 12:10 ` [RFC PATCH v2 2/4] ceph: don't mark mount as SHUTDOWN when recovering session Jeff Layton
2020-09-30 12:10 ` [RFC PATCH v2 3/4] ceph: remove timeout on allowing reconnect after blocklisting Jeff Layton
2020-09-30 12:10 ` [RFC PATCH v2 4/4] ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is set 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='CAAM7YAnNQG7-iV_LcV2Uc1qCsUFeVu1j+G426sG4ruZs=E_n+w@mail.gmail.com' \
--to=ukernel@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=pdonnell@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).