From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F256606A338 for ; Thu, 3 Dec 2026 17:31:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=qhNib0xk; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=YObNECWM; dkim=pass (2048-bit key) header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-02 header.b=dYvSsAsv; dkim=neutral header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-03 header.b=O2CKbhMb DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:CC:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=UmSrUyx6GktHzJw0LEa19r3TG59xQEqO/ajHQ+HKSxA=; b=qhNib0xkK/8eAAULkXBJmc202u nevc+iPeiYtmdkVBWMcwAK7qpoEaKxFn1P0ildqHPbbdqfjX0WeESrCB5LRi9Nza7aUwiAbhFtDs2 UWDTi3HwiQ6UWRTCy5h8XO7/pXji7FtLWSBdXSwBT2qHBije9ZpBMoQExA5zLm0GX1JU4fiCEyt3j EdG/ePnVk8FQMJvmGZvQapZDvp2T+Na0f3ZMn0xU8bDDd3HfIRoIn16twyhuh9I53za/a8TLstdBz aU+ATCF1aBtplMXz0BoxEl6JZLlW2BdeNCRArG+MhmQJCWpz8tqOSGtUry8KU7034ZOrItdrhnVY+ O7P+MbwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZAeV-0000000FSWi-2TXK; Thu, 03 Dec 2026 17:31:27 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZAeT-0000000FSWJ-2hPM; Thu, 03 Dec 2026 17:31:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UmSrUyx6GktHzJw0LEa19r3TG59xQEqO/ajHQ+HKSxA=; b=YObNECWMufr6RXjFgVTU07Lx98 kPqGsmebtb4VEfw8UcbcM8/Vpqxy8RVReb96cyUzpbazZ/0pv6B9gFGhAvMXPoJfB3tUfEMnjBo+W QUulLK+tVh8kSUbsvsMWxfltpHegd6rMULWMlomaaEd3kaIHqRtpyqkLfRigkMdRIketev7ndrfGm XJDuFVXIxa86OfkapXwnyuWD6hPMBetuakAta/k16DY7PgrDn5wj8bVcJZCnASEEv1hR/5DBv/Sjn uZxwNtrFWNFe6Y6KF3ybZ6t2rJmeWhXsql6VnfTL3Fca3c4p5V4jYecR81rWqfU5Rrj2buk873xhg yLElz28w==; Received: from mta-01.yadro.com ([195.3.219.148]) by desiato.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZAeP-0000000DX7h-0Dip; Thu, 03 Dec 2026 17:31:22 +0000 Received: from mta-01.yadro.com (localhost [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 9CB622001F; Thu, 3 Dec 2026 20:31:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mta-01.yadro.com 9CB622001F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yadro.com; s=mta-02; t=1796319064; bh=UmSrUyx6GktHzJw0LEa19r3TG59xQEqO/ajHQ+HKSxA=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:From; b=dYvSsAsvrpBpS9/PdOI2bx09mzn42llTBmplcN3JeDeQ1JVoo2e48tuCNvhFmZsNH yv+sCwEqTEI4kezR7/zVUtChkKSZDr1YmmDIrbunoA/6wz0z8NEqM4p2XUtAyFHCj0 +wmpDMbtMvDpArvppa3bmK/ITlQgfPrJ7tdSDga44d50oEViVNnF2WPc4pWxoVy8Cm Ls/1OgTzUQQ1u8uzv5SihLYO9OsNcsXg4aSU5XZJKSAtYcZCNjIN+TOw8sgMfSwGi/ t4DG0qVkc2s4pBiREZZfFEVEhs4DUoON69D5938L42Ktw7h6VkEAqtzn2hI9bD4sA9 fCVUYqNweaK/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yadro.com; s=mta-03; t=1796319064; bh=UmSrUyx6GktHzJw0LEa19r3TG59xQEqO/ajHQ+HKSxA=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:From; b=O2CKbhMbGCgi90lYaeTMKv/A06pL4uhwVC/Mt+e0LoTcStEgdlrfeiYV2czv2ERQl 6Qcfms7a/mvHRj/I/pbASdiVoAr0Ie6k2Gq3GWbFsWMtDRyZjuB2IV5f6o00uzShUk 4vvAww2lMPXndAfVXl09ODVsbGLGEl1YV3JE5fKZcgsoNOHDLkgjsWU+qnwePjZgLf YC60DX8uCYhG49h/X2KvHkdFqeA1ChVH/A0bddocwP5med92TAxvPXFhnEPnAcp8aA JBSpact3zIg3EUdJFwtghEkier5O2vdwSIZ5E/rSOZ/M5y/k+Em2hF5RsidnIC0NqC AtSzvBaQO5gLA== Received: from RTM-EXCH-06.corp.yadro.com (unknown [10.34.9.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS; Thu, 3 Dec 2026 20:31:02 +0300 (MSK) Received: from yadro.com (10.34.9.247) by RTM-EXCH-06.corp.yadro.com (10.34.9.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Thu, 3 Dec 2026 20:31:02 +0300 Date: Thu, 3 Dec 2026 20:31:02 +0300 From: Dmitry Bogdanov To: Mohamed Khalfella CC: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Justin Tee , Naresh Gottumukkala , Paul Ely , Hannes Reinecke , Chaitanya Kulkarni , James Smart , Randy Jennings , Mohamed Khalfella , Daniel Wagner , , Subject: Re: [PATCH v7 07/17] nvme: Introduce FENCING and FENCED controller states Message-ID: <20261203173102.GA19520@yadro.com> References: <20261114030454.2836543-1-mkhalfella@purestorage.com> <20261114030454.2836543-8-mkhalfella@purestorage.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20261114030454.2836543-8-mkhalfella@purestorage.com> X-ClientProxiedBy: RTM-EXCH-04.corp.yadro.com (10.34.9.204) To RTM-EXCH-06.corp.yadro.com (10.34.9.206) X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.1.8310, bases: 2026/12/03 15:02:00 #29030354 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-KATA-Status: Not Scanned X-KSMG-LinksScanning: NotDetected X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_173121_103699_ED2766B7 X-CRM114-Status: GOOD ( 25.90 ) X-Spam-Score: -0.2 (/) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Mohamed. On Fri, Nov 13, 2026 at 07:04:21PM -0800, Mohamed Khalfella wrote: > > Introduce two new controller states, FENCING and FENCED, and the state > machine transitions needed to support them. Transports will move a LIVE > controller into these states when an error is encountered; this patch > only adds the states themselves. > > FENCING is entered from LIVE. While in FENCING the queues remain alive > but new requests are not allowed to be sent, and the controller cannot > be reset, since a reset cancels inflight IOs that must be held until > either CCR succeeds or time-based recovery completes. A new request > issued to a controller in FENCING or FENCED is failed with a host path > error, so a multipath request is retried on another path. > > FENCED is a short-lived state entered from FENCING once fencing is > over. It is the only state from which RESETTING is reachable, so a > manual reset cannot take effect while the controller is in FENCING. > > Deletion is allowed from both states. Callers of nvme_delete_ctrl() > assume deleting a live controller cannot fail, and they cannot wait for > the fence either. RDMA device removal and the TCP/RDMA module exit > paths hold the transport's controller list mutex, which ->free_ctrl > needs when the fence drops the last reference on another controller. > Instead the transport's ->stop_ctrl flushes the fencing works, so the > delete path waits the fence out without holding any lock. > > A controller deleted while fencing does not keep the fence's hold on > its inflight requests. Once the state leaves FENCING they complete as > in any other delete and may be retried on another path before the > fence would have ended. This is a known limitation, to be addressed > separately. > > Update nvme_available_path() to treat a controller in FENCING/FENCED > as an available path, both states are non-terminal, add the state > names to the sysfs state attribute and document them in > Documentation/ABI/stable/sysfs-nvme. For the case when the the last path is in FENCING state the new request will be added to requeue list and will hang there until the inflight IO has been failed by nvme_failover_req(), i.e. until RESETTING state. That might be unexpected behavior for some applications. fail_fast_tmo might help here, but it does not take FENCING state into acccount in your patchset. Could you, please, include FENCING time into fail-fast timer logic? BR, Dmitry