From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.3.219.148 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796319074; b=C0QAUXdNGtaNOSDknRkuwrY37q2LXSsAzETjnRkthWPeraAnMOYjaXg4XW0dhUu+gnaF pUicvhma8D5qPugVM8kYnDuGviV/YAfe4PT+SSOVs2KonSpMkBXTS7kmOKyRryBcE2DUq q52P3GO9F6m6+ttSWjhZ8aAUJdzGJ9RpJq/abe6X65aU/5TllKh8tJAcwRbMJWghYTIzc fSNO3VB8IKDGsPOgKW14wKQqMb/Mjo05PcpPuP3oXAEOfVzLdwFzxdaDwMtMEhUBJWrmL R7pjIideC49zelJ6BSh03yQr8X2DEkfOWjI6kkU66TG79I4JKTAXFeLAF2yz3f7+aaA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796319074; h=DMARC-Filter:Received:DKIM-Filter:DKIM-Signature:DKIM-Signature: Received:Received:Date:From:To:CC:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:X-KSMG-AntiPhishing: X-KSMG-AntiSpam-Interceptor-Info:X-KSMG-AntiSpam-Status: X-KSMG-AntiVirus:X-KSMG-AntiVirus-Status:X-KSMG-KATA-Status: X-KSMG-LinksScanning:X-KSMG-Message-Action:X-KSMG-Rule-ID; bh=UmSrUyx6GktHzJw0LEa19r3TG59xQEqO/ajHQ+HKSxA=; b=0FINYjtcIpOAc46jPL9AR1NKMLPfnHICrALT5vLatRxNDn39/KaGEuWm+jTtPzBnpqmI 7ZaWl48bb/0pXNvZGpOCvmLJfUNl+aaPw7xo+bt2GDJiVKScKyP+ykXPlutJ+N3s8fU+S MTLx1o2TrnxkTzwkI5+sf97PuLNimdT0WBPwTesYD0paYi/q6HC3TGPCCM7PTDpFd82lI 0lQYvZXpsVPPS6GcA3QQFzldATMHWGPi2TzCcEkPDA6uNkTyr9FvSplDl0uqQxzxn/j9Q bfXbis+klUKhU/NCARp+MigqPmymGQKN6X+ZScCYyVBPR710CjSPXMivqWZKY2SEXLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=yadro.com; spf=pass smtp.mailfrom=yadro.com; dkim=pass header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-02 header.b=dYvSsAsv; dkim=pass header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-03 header.b=O2CKbhMb; arc=none smtp.remote-ip=195.3.219.148 Received: from mta-01.yadro.com (mta-01.yadro.com [195.3.219.148]) (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 3A698606A32D for ; Thu, 3 Dec 2026 17:31:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3A698606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yadro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yadro.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-02 header.b=dYvSsAsv; dkim=pass (2048-bit key, unprotected) header.d=yadro.com header.i=@yadro.com header.a=rsa-sha256 header.s=mta-03 header.b=O2CKbhMb 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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