ceph: retry the same mds later after the new session is opened
authorXiubo Li <xiubli@redhat.com>
Mon, 9 Dec 2019 12:47:15 +0000 (07:47 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 27 Jan 2020 15:53:39 +0000 (16:53 +0100)
commitc4853e9776caefbd2f59739ce1a75798a2b4b7a5
treed5df8c3b5b79249d017d33616652b21438118458
parent97820058fb2831a4b203981fa2566ceaaa396103
ceph: retry the same mds later after the new session is opened

If max_mds > 1 and a request is submitted that chooses a random mds
rank, and the relating session is not opened yet, the request will wait
until the session has been opened and resend again.

Every time the request goes through __do_request, it will release the
req->session first and choose a random one again, which may be a
completely different rank than the one it just waited on.

In the worst case, it will open all the mds sessions one by one just
before the request can be successfully sent out.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c