ceph: auto reconnect after blacklisted
authorYan, Zheng <zyan@redhat.com>
Thu, 25 Jul 2019 12:16:47 +0000 (20:16 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Sep 2019 10:06:24 +0000 (12:06 +0200)
commit131d7eb4faa1fc06b08b633aff0b59ae85f1938e
tree3d9fae4a3ef8e3d6eac0614a91cb83ac33583f4b
parent81f148a910045cd0a139f589a0b42764b172f8f5
ceph: auto reconnect after blacklisted

Make client use osd reply and session message to infer if itself is
blacklisted. Client reconnect to cluster using new entity addr if it
is blacklisted. Auto reconnect is limited to once every 30 minutes.

Auto reconnect is disabled by default. It can be enabled/disabled by
recover_session=<no|clean> mount option. In 'clean' mode, client drops
any dirty data/metadata, invalidates page caches and invalidates all
writable file handles. After reconnect, file locks become stale because
MDS loses track of them. If an inode contains any stale file locks,
read/write on the indoe are not allowed until applications release all
stale file locks.

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