ceph: reconnect connection if session hang in opening state
authorErqi Chen <chenerqi@gmail.com>
Wed, 28 Aug 2019 13:22:45 +0000 (21:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2019 20:42:11 +0000 (13:42 -0700)
commit60991fefbbed8a26ef0ddfba1b1ab42435954ea4
tree1fc9290ccddad6a73ad1c21e57e61c963c0f1376
parent3f2533b6abf76f26e3c247b6e41964d2c23a3e17
ceph: reconnect connection if session hang in opening state

[ Upstream commit 71a228bc8d65900179e37ac309e678f8c523f133 ]

If client mds session is evicted in CEPH_MDS_SESSION_OPENING state,
mds won't send session msg to client, and delayed_work skip
CEPH_MDS_SESSION_OPENING state session, the session hang forever.

Allow ceph_con_keepalive to reconnect a session in OPENING to avoid
session hang. Also, ensure that we skip sessions in RESTARTING and
REJECTED states since those states can't be resurrected by issuing
a keepalive.

Link: https://tracker.ceph.com/issues/41551
Signed-off-by: Erqi Chen chenerqi@gmail.com
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/mds_client.c