From patchwork Tue Oct 6 14:55:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 284827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70952C41604 for ; Tue, 6 Oct 2020 14:55:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22008206DD for ; Tue, 6 Oct 2020 14:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601996133; bh=W+WRJiA5Dyo40yCBkIH+gN+ujGTSXHZQ4oEjCxbLe9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Owe7qZoqWhJ893YMg5YKjL2Isv+9FMA2wHrSNT2CODLaXaLj21rs1JU6dGg3QOUqt Bpj1lAMYLqZtzeabiNFIHwJfLHurJ0GSFcQhgqe8VRTh7TwhvTBKTi903JqR54he74 Sqe+mrQuOWiPumbW+fgIXGo3DunPULf/tSBHql3I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726139AbgJFOzc (ORCPT ); Tue, 6 Oct 2020 10:55:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:38186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbgJFOzb (ORCPT ); Tue, 6 Oct 2020 10:55:31 -0400 Received: from tleilax.com (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3BE35206DD; Tue, 6 Oct 2020 14:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601996130; bh=W+WRJiA5Dyo40yCBkIH+gN+ujGTSXHZQ4oEjCxbLe9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E6z8sjHtJg5Iv8q5OQ8FstPSCrNnbqHo6UPwlT8Ytj5k5VTJ+adR5p4SPEDX1C5wr +LcMZ23XgaOFUeAKnWUov/NmUR3ZqIFY1iL95/Pj0Lv+aVexrm/RPZD+pCmtou7EOD 0M/83kS9s8y3/VcVnKzmDiTXiK7owlVfX75t4EIM= From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com, ukernel@gmail.com, pdonnell@redhat.com Subject: [PATCH v3 1/5] ceph: don't WARN when removing caps due to blocklisting Date: Tue, 6 Oct 2020 10:55:22 -0400 Message-Id: <20201006145526.313151-2-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201006145526.313151-1-jlayton@kernel.org> References: <20201006145526.313151-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org We expect to remove dirty caps when the client is blocklisted. Don't throw a warning in that case. Signed-off-by: Jeff Layton --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index c7e69547628e..2ee3f316afcf 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1149,7 +1149,7 @@ void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release) /* remove from inode's cap rbtree, and clear auth cap */ rb_erase(&cap->ci_node, &ci->i_caps); if (ci->i_auth_cap == cap) { - WARN_ON_ONCE(!list_empty(&ci->i_dirty_item)); + WARN_ON_ONCE(!list_empty(&ci->i_dirty_item) && !mdsc->fsc->blocklisted); ci->i_auth_cap = NULL; } From patchwork Tue Oct 6 14:55:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 284826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A276C4727E for ; Tue, 6 Oct 2020 14:55:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B27A920782 for ; Tue, 6 Oct 2020 14:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601996134; bh=sidwf1KhBEvp0V1xv1dd+iN5rzt7H2NoFEk5TAP1Vlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nFYQD4jFjDSC6O64iEg+Sx9qV0mqUn3IlGu+1M2J4wxZjKN5BVz1wU/1ee77e56jl sAYimbLAnRL3L4J1HO+owqsRDbnys5nDMnG9Yn/TueYHANR2FkZeXUaxwtcsGjB5sC QW4AFxpPm+nYmVfL99AFxO1DgZBC9BvxGQnhYJZ4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbgJFOze (ORCPT ); Tue, 6 Oct 2020 10:55:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:38230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbgJFOzd (ORCPT ); Tue, 6 Oct 2020 10:55:33 -0400 Received: from tleilax.com (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77A90206CB; Tue, 6 Oct 2020 14:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601996133; bh=sidwf1KhBEvp0V1xv1dd+iN5rzt7H2NoFEk5TAP1Vlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K07HGnfZbazjzxzs4U7jwOMNEOholn/wkiyhGtenpB3O+hJsfDtfs74eiTJ26tHBA v1QqSH2OvEmpvcxSH7HZkQukxCg+Cob6ahmQB9uETpO0Zun91Sys3iFF5TSzLA8lOw iAAdZ5NSL5CVam3sOHJXSVWb+0mZeQ4NJGPe38HU= From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com, ukernel@gmail.com, pdonnell@redhat.com Subject: [PATCH v3 4/5] ceph: remove timeout on allowing reconnect after blocklisting Date: Tue, 6 Oct 2020 10:55:25 -0400 Message-Id: <20201006145526.313151-5-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201006145526.313151-1-jlayton@kernel.org> References: <20201006145526.313151-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org 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 --- fs/ceph/mds_client.c | 5 ----- fs/ceph/super.h | 1 - 2 files changed, 6 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index cd46f7e40370..1727931248b5 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -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); } diff --git a/fs/ceph/super.h b/fs/ceph/super.h index d0cb6a51c6a4..9ced23b092f5 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -108,7 +108,6 @@ struct ceph_fs_client { int mount_state; - unsigned long last_auto_reconnect; bool blocklisted; bool have_copy_from2;