ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is set
authorJeff Layton <jlayton@kernel.org>
Mon, 21 Sep 2020 17:12:53 +0000 (13:12 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Dec 2020 22:21:47 +0000 (23:21 +0100)
commit4ae3713fe45a289f37c479412a991bc51c502013
treeed6e24b85b1836efc633a95a0626ff5d4b5af84d
parentdbeec07bc84f8229322d7919692a17adae1e388e
ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is set

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. We can only
do this for sync requests though, so check for async ones first and
just let the callers redrive a sync request.

URL: https://tracker.ceph.com/issues/47385
Reported-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c