ceph: remove timeout on allowing reconnect after blocklisting
authorJeff Layton <jlayton@kernel.org>
Fri, 25 Sep 2020 13:07:49 +0000 (09:07 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Dec 2020 22:21:46 +0000 (23:21 +0100)
30 minutes is a long time to wait, and this makes it difficult to test
the feature by manually blocklisting clients. Remove the timeout
infrastructure and just allow the client to reconnect at will.

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

index a2d6ef808f70e298cacbb3a7ea733706a73a8d0c..de95e08815c07aa603117fbaa159243fa9f0df48 100644 (file)
@@ -4374,12 +4374,7 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
        if (!READ_ONCE(fsc->blocklisted))
                return;
 
-       if (fsc->last_auto_reconnect &&
-           time_before(jiffies, fsc->last_auto_reconnect + HZ * 60 * 30))
-               return;
-
        pr_info("auto reconnect after blocklisted\n");
-       fsc->last_auto_reconnect = jiffies;
        ceph_force_reconnect(fsc->sb);
 }
 
index f9e35e81c9af023421bfdefae5df3bae109728b8..f097237a5ad306627d1c18fcf4640c7cd3e629ac 100644 (file)
@@ -108,7 +108,6 @@ struct ceph_fs_client {
 
        int mount_state;
 
-       unsigned long last_auto_reconnect;
        bool blocklisted;
 
        bool have_copy_from2;