ceph: add helper function that forcibly reconnects to ceph cluster.
authorYan, Zheng <zyan@redhat.com>
Thu, 25 Jul 2019 12:16:44 +0000 (20:16 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Sep 2019 10:06:24 +0000 (12:06 +0200)
commitd468e729b74eafdfc8306ca8f77e1f26478d67da
treeb277dbf5c2468bc199014d8ff665563510539f43
parent5e3ded1bb642f2d7a6ded6deeafb155d5b5312f2
ceph: add helper function that forcibly reconnects to ceph cluster.

It closes mds sessions, drop all caps and invalidates page caches,
then use new entity address to reconnect to the cluster.

After reconnect, all dirty data/metadata are dropped, file locks
get lost sliently. Open files continue to work because client will
try renewing caps on later read/write.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c
fs/ceph/super.c
fs/ceph/super.h