ceph: skip reconnecting if MDS is not ready
authorXiubo Li <xiubli@redhat.com>
Thu, 24 Aug 2023 09:55:51 +0000 (17:55 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Jan 2024 14:40:50 +0000 (15:40 +0100)
commitcbcb358b744bf8d8c52b35d5efb1a960438c31cd
tree914afd165150b58dfc8319a45fb77d2c23c714b6
parent0dd3ee31125508cd67f7e7172247f05b7fd1753a
ceph: skip reconnecting if MDS is not ready

When MDS closed the session the kclient will send to reconnect to
it immediately, but if the MDS just restarted and still not ready
yet, such as still in the up:replay state and the sessionmap journal
logs hasn't be replayed, the MDS will close the session.

And then the kclient could remove the session and later when the
mdsmap is in RECONNECT phrase it will skip reconnecting. But the MDS
will wait until timeout and then evict the kclient.

Just skip sending the reconnection request until the MDS is ready.

Link: https://tracker.ceph.com/issues/62489
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c