From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f47.google.com (mail-dl1-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AFD635CB91 for ; Fri, 27 Mar 2026 18:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636409; cv=none; b=LcBhfpEqzn+KNkTCB+cJ53z2mTR75bpb6vDdK3A1HTEXGLSj0y/kaUfQ25QypKBsmocMrkN1XtXRtUWl/UhVJZcYXREz6j8u1EXYrwT1xQzzl5xv0phKJvjndckd6vhDTolk4DjhQkz4w5xOQ3QR8hImejuWHz+yKC/14qL0r5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636409; c=relaxed/simple; bh=vQ7wIuH/FgPSD16ZNqB5XvvqdDBnrXQR3bTnLmiq3Vs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D0XrlTWuKeGgQnBbGj+RSBj3lMYfDLQ8eO5XvLZrBm1eiJU9sENsf2D/WBGfdt4PQReLcCF+5fXIQlrygm7re5dMhw75ymDBZ+v+9egcC0s3i4KMfZe8wpue6yaasvq0ThL/0T4sDCVTLih78TfbhSd8KcTOfV62oyrTE4XH6bM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=eepOVMEH; arc=none smtp.client-ip=74.125.82.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="eepOVMEH" Received: by mail-dl1-f47.google.com with SMTP id a92af1059eb24-1271257ae53so2742052c88.1 for ; Fri, 27 Mar 2026 11:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1774636408; x=1775241208; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ge9Iw921OwlEIIL0zU7ZodWK+HVNZiJY7DqmCAymPXI=; b=eepOVMEHLM89LfHJzQjyNprGEM+z/9XUAQAqeKbRtOpUb5Mm9blaqkCe4Q4P/paL5a gHEeC8cLB1+OdEAs6DJPM8EW2N+pk4G+NKhYmBO60tCAPsDL/GPbQoo7zjBp6VbOJbSF 3byir6kxgXhrMBqgFWnaxASsjEcBdRsxdNLoZRWHDgfSaBdU8P4JY9LZwZRlYRrzW1Un TAHPrcSponvL8I7gkroSRiYP00Uylsm76uYQzcE8hO0/+ICAoN1zptxj/1Tm3+e/940j k9xANaLu6XgQk08uYtfd5+wGn82zHYkRY/adWaB1TafwqQDwpZbMl6pq5GcQ9He6wfpM dYSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774636408; x=1775241208; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ge9Iw921OwlEIIL0zU7ZodWK+HVNZiJY7DqmCAymPXI=; b=JHnDjoCID0mtZtfBR+yeuNyaeayf0+yRz5aoTt7hPMKHmxsPrU325GlxLN5D9wGvO3 K74eBlH5OV+ZYssRK1bhXYNgJhitiNtWpkc+Y2VRIp0/oSde+SDGveoth2NIAnW3gUdz vgIVdLYs43bWbJyMM7XSwllLg+/FYjgOdsF6KH43OCdb/BHQkYLsJ3OFaJCSo88DkFMp CJPo/X7nzMMIKHiXYop2ZE527QZeos0ZZbkDaklpgoweBLqGyYeT3o/qIy+06ZQw4BY9 KrByiQkbHOdn+McsynPpi+eRuCCjXxegl4oGSjuaYFBTypsGXvvTVebHh/bCoWQrXcGQ IobQ== X-Forwarded-Encrypted: i=1; AJvYcCUmC7qhSVFleovjGodszotUzRPSzDVBckrjpqK6DPGMY521RGYP6ALYl8WDfU+bC8xkd1+0WtWGmG0RlTw=@vger.kernel.org X-Gm-Message-State: AOJu0YzvTDBdBPLCjSeXT3AcsxUxs1JaiYzWzNK8WF3iNzDpFQUuL/c5 +7S8r7XH+63w9V/oa7fuLhnFbjFrkoXKSPKqWoFGR2w1WLopr4q73fZMis7xMimfQWI= X-Gm-Gg: ATEYQzwxqBjCRafJ0T9b5sn6YMNgncv4Rc0EggDint4BK2ulMjxaOyOehHvfohWVjuZ Yz92qj7+ekNrRgKkEcl6PHYcX30UgItSouyPPyVuADnKYjGKkBFQxGalCyBPOaYMM3oonX45cwl aRaDW55oqdo3kSsSVNMijbr4toQzg/UYH9djX/ZRZADTSAX0P3VODPpFWIFJ7tsAckHGXwJ9pkv 6VA2wFNMu6H9g5XrvrhaOCZhcPVYIj9s0ojvYMfDiacljcV3QUVfkX/8Nj7J7gxu4R4MIvigR0P 4RfOunxmF2hnhSne5Ao7O/G0ARNdX9o3Ddz0I/ObgMPfML/XMkWXpsagKSDXeI3o9f+UeGqHeZW /wVRwzrGcGe6Uf/ukHWDWQz/mWs/6HnUogR63+HmHtS7z7uxW5N4oD4kQzEH97LoXAkJYB48FPl 3iIUxtvFsU+zwO3AWGcMt3iqI7NClgA6TOPtD+xuEzPxU= X-Received: by 2002:a05:7022:f005:b0:119:e55a:9bf6 with SMTP id a92af1059eb24-12ab288a058mr1954310c88.18.1774636407293; Fri, 27 Mar 2026 11:33:27 -0700 (PDT) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id a92af1059eb24-12ab97d88c0sm30404c88.5.2026.03.27.11.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 11:33:26 -0700 (PDT) Date: Fri, 27 Mar 2026 11:33:26 -0700 From: Mohamed Khalfella To: Randy Jennings Cc: Justin Tee , Naresh Gottumukkala , Paul Ely , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , James Smart , Hannes Reinecke , Aaron Dailey , Dhaval Giani , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 08/21] nvme: Implement cross-controller reset recovery Message-ID: <20260327183326.GQ3435530-mkhalfella@purestorage.com> References: <20260214042753.4073668-1-mkhalfella@purestorage.com> <20260214042753.4073668-9-mkhalfella@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed 2026-02-25 18:37:44 -0800, Randy Jennings wrote: > On Fri, Feb 13, 2026 at 8:28 PM Mohamed Khalfella > wrote: > > > > A host that has more than one path connecting to an nvme subsystem > > typically has an nvme controller associated with every path. This is > > mostly applicable to nvmeof. If one path goes down, inflight IOs on that > > path should not be retried immediately on another path because this > > could lead to data corruption as described in TP4129. TP8028 defines > > cross-controller reset mechanism that can be used by host to terminate > > IOs on the failed path using one of the remaining healthy paths. Only > > after IOs are terminated, or long enough time passes as defined by > > TP4129, inflight IOs should be retried on another path. Implement core > > cross-controller reset shared logic to be used by the transports. > > > > Signed-off-by: Mohamed Khalfella > > +static int nvme_issue_wait_ccr(struct nvme_ctrl *sctrl, struct nvme_ctrl *ictrl) > > + if (!wait_for_completion_timeout(&ccr.complete, tmo)) { > > + ret = -ETIMEDOUT; > > + goto out; > > + } > The more I look at this, the less I can ignore that this tmo should be > capped by deadline - now.. I updated nvme_issue_wait_ccr() to do that. > > > +unsigned long nvme_fence_ctrl(struct nvme_ctrl *ictrl) > > + deadline = now + msecs_to_jiffies(timeout); > > + while (time_before(now, deadline)) { > ... > > + ret = nvme_issue_wait_ccr(sctrl, ictrl); > ... > > + } > Sincerely, > Randy Jennings