From patchwork Mon Jan 30 08:41:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 13120506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00B9EC54EED for ; Mon, 30 Jan 2023 08:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236033AbjA3Ino (ORCPT ); Mon, 30 Jan 2023 03:43:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbjA3Inm (ORCPT ); Mon, 30 Jan 2023 03:43:42 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4EBC7EDA for ; Mon, 30 Jan 2023 00:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675068175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qHFIaD6BXKAsy4VZvTC6ndn33gIO42CmkbpMWIDxKX4=; b=cWJrgw7VhWa4jIetDXLXKtcaAKpZiEncjy39qYEeKogi/BjyNbtuqlv7oLGBg+Uqnsm4/b HAtSyIKiPrfrZVY15q5pCMeUkti44kVEXBNmcc+w1bFVUjMu11s/Jlq2bgoy0ED3kOxV6B COx+NCKxaNbR4UvTrCGNxamiTYWOlvo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-578-leOWOzlFPC6Gn66DZ1scNw-1; Mon, 30 Jan 2023 03:42:51 -0500 X-MC-Unique: leOWOzlFPC6Gn66DZ1scNw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 905CF1C08780; Mon, 30 Jan 2023 08:42:51 +0000 (UTC) Received: from lxbceph1.gsslab.pek2.redhat.com (unknown [10.72.47.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5D1B400EAD6; Mon, 30 Jan 2023 08:42:48 +0000 (UTC) From: xiubli@redhat.com To: idryomov@gmail.com, ceph-devel@vger.kernel.org Cc: jlayton@kernel.org, mchangir@redhat.com, vshankar@redhat.com, lhenriques@suse.de, Xiubo Li Subject: [PATCH v3 0/2] ceph: drop the messages from MDS when unmouting Date: Mon, 30 Jan 2023 16:41:44 +0800 Message-Id: <20230130084147.122440-1-xiubli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: Xiubo Li V3: - Fix the sequence of removing the requests from osdc and calling the req->r_callback(). - Add a block counter to block the unmounting if there is any inflight cap/snap/lease reply message is running. V2: - Fix it in ceph layer. Xiubo Li (2): libceph: defer removing the req from osdc just after req->r_callback ceph: drop the messages from MDS when unmounting fs/ceph/caps.c | 5 +++++ fs/ceph/mds_client.c | 12 +++++++++- fs/ceph/mds_client.h | 11 ++++++++- fs/ceph/quota.c | 4 ++++ fs/ceph/snap.c | 6 +++++ fs/ceph/super.c | 52 +++++++++++++++++++++++++++++++++++++++++++ fs/ceph/super.h | 2 ++ net/ceph/osd_client.c | 43 ++++++++++++++++++++++++++++------- 8 files changed, 125 insertions(+), 10 deletions(-)