From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f173.google.com (mail-dy1-f173.google.com [74.125.82.173]) (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 AF1D32FD689 for ; Tue, 10 Feb 2026 22:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770762040; cv=none; b=hW5BGgdZC7eXSJM/+vKASR8SicTXSP65QCthat/+tiJHKKyhCz7PgSZPymVYKzJuldOhEGsziqvn0Fx9miVl4eSYGhJaM8bqec564uwGQs6yu7cxUCMOoVOp0NTOYTVE8nuOXcZ8s1C0d83W1dlji4zd/lfG2jeR0B4a19b0S0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770762040; c=relaxed/simple; bh=3RjJYVh7waD4c61fuhFsN0jQRehuX6ALkvBalNBUogw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n+n+24W/h/ZCtY1S/pDXZZdvMnpMXbYluRL14WkjhZv+qlfiN2lU4d1AA7JZrxyu6C0DROOL0WQyAZm6LeWQeL9QVo+TOmvNJwR1cVFiqn19sAkdP+y0QaeMl6VDLwwWEkoKKWEtAzpjTk8ZWbRXgy+JNdewZnf8/XCuDawbDOU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject 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=C2Dv9Nhd; arc=none smtp.client-ip=74.125.82.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="C2Dv9Nhd" Received: by mail-dy1-f173.google.com with SMTP id 5a478bee46e88-2ba9c484e5eso84037eec.1 for ; Tue, 10 Feb 2026 14:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1770762038; x=1771366838; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SqVmBaTO+OddvGKWDZZ/ilUmsb87OdmigQ3H7H/PITY=; b=C2Dv9Nhdxp6TMIOAuG2ArY0Egu17TzczlBn+VxBmuUmW8qWlIP7Oy/zAn9oTbe/LWA MomDz4L15Hq4xNfYIKeuwaFIfSeCeL+UTCKfgLP9rCkGSiY/Tmjj/Tc7CFwcQrlotv2M GOwWYsX+hEL1oMiqeb+1J97sAJGVunz4qSsZ87/Jti3VxHKSJSYwsKDXhy/d+MAsuSvH 5NwqDkPWGdkkh3bZQ7cCUPtiP/rNUWgtDYXC2S3AUw5UMfWvMT/9CYrK09fqwOC02uLf o+nHcsNX1R+HgRQkDhPXUUEra7ddt8Cefut9ryZBV5keoQGVxfD5oe7F059UoYxnGIIs L2sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770762038; x=1771366838; h=in-reply-to: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=SqVmBaTO+OddvGKWDZZ/ilUmsb87OdmigQ3H7H/PITY=; b=oBKdVtIcOwnwp/mjFZXnSLmkiGC/5U2bLR1OEVNFlnkKb2Bhd9WGOtO79MCs+iBRDO cjNwMtea8t6jNxfnwBOUWDqvdhJcJitOuXu8Su8B88eAfW9hEDvJduFRJwKYpmE8dApH dDIt261+DQN5tFtAf5vPtEJqFjKLQcWJxc5sZuLJEsj48cz0uJISKGTu6IacBtMQhYya Vxcs+eP4Z5u+UVK/Lvq/aLuggSm9VVSIjdHGCVuMHZaOLHzTFqT0alX6x/BDs7Os2d+s gN1Xqn9cVobro6wElCqUZDZw3jTGU6vs6MmVlRofdsAvMijRYJb3oZVdPL7bEH4Br+mb OeSQ== X-Forwarded-Encrypted: i=1; AJvYcCWMOKyaf/dP9S63arZIwQGXtuDWmZRROnqax4WHGO7WKzUMrwJ5IH84dXaBB8ezq3OZULx8DKBbqaCRrPI=@vger.kernel.org X-Gm-Message-State: AOJu0YwN/20x+xtDs7IcmXF6hoJvIuvJcxxBMdPjabV4odiSJXTWqali h9vo2gIkhI4z27RCAgAEfmTikeotRXEzkpOuj6sFtH1h2sMXj1jyOcQQ4KxIz64oggM= X-Gm-Gg: AZuq6aKEElMMGAfC1CxNY4i9RORuMhSTpzXF3jyHaCRd5JKKJqcQ32JBqgfhHaJuAbZ AXsA9+ldR35XttUFZkg1qrQ9LmAN7tWdoDeZtqluYacaA7FqRVECR0yb7P+idCwdaCjstGu4uE1 TclMF6GhPqYoWiTl1fWcYwZ1GQYGZZjoph6o436wDWgFHarMxiyoj/3IDQlidDYQ9s7GncdkYay 5gaoCQR8bfV9JvZLXe5mfICxN6Ob6J8MK/KblD4jey4rwtUH1LhhRE3COtClizzUtbnDvCGQnP4 tCzrXxqA4RnOyM1F4SyV4+j8AH9nw24tiTlf7iS76bUdvGhcYLMUByDDidGK4A469ikillUw6x6 iJzIOVpGdsJ6gJR5c2UeKSPgRqUpDuoCWiEgq4WTMH5ClryWOMKyarb+HYhHI3L2RJEvdC3v481 hGIpQ/qIjeHxc9ZEBstVGePYlCQJLexkYJHl0KoppOSWnVyH2lbpgXsQ== X-Received: by 2002:a05:7301:408d:b0:2ba:72c3:53c0 with SMTP id 5a478bee46e88-2ba9aa571a1mr204865eec.0.1770762037492; Tue, 10 Feb 2026 14:20:37 -0800 (PST) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id 5a478bee46e88-2b855af7806sm10554646eec.10.2026.02.10.14.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 14:20:37 -0800 (PST) Date: Tue, 10 Feb 2026 14:20:36 -0800 From: Mohamed Khalfella To: James Smart Cc: Justin Tee , Naresh Gottumukkala , Paul Ely , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Aaron Dailey , Randy Jennings , Dhaval Giani , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 13/14] nvme-fc: Use CCR to recover controller that hits an error Message-ID: <20260210222036.GP3729-mkhalfella@purestorage.com> References: <20260130223531.2478849-1-mkhalfella@purestorage.com> <20260130223531.2478849-14-mkhalfella@purestorage.com> <864e0ce2-4fa0-4d89-aaaa-a552977781a3@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: <864e0ce2-4fa0-4d89-aaaa-a552977781a3@gmail.com> On Tue 2026-02-10 14:12:24 -0800, James Smart wrote: > On 1/30/2026 2:34 PM, Mohamed Khalfella wrote: > > +static void nvme_fc_fenced_work(struct work_struct *work) > > +{ > > + struct nvme_fc_ctrl *fc_ctrl = container_of(to_delayed_work(work), > > + struct nvme_fc_ctrl, fenced_work); > > + struct nvme_ctrl *ctrl = &fc_ctrl->ctrl; > > + > > + nvme_change_ctrl_state(ctrl, NVME_CTRL_FENCED); > > + if (nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING)) > > + queue_work(nvme_reset_wq, &fc_ctrl->ioerr_work); > > +} > > I'm not a fan of 1, maybe 2, state changes that may silently fail. Some > trace message would be worthwhile to state fencing cancelled/ended. > > -- james > The change to FENCED should never fail. This is the only transition allowed from FENCING state and this is the only place we do that. Do you suggest I put WARN_ON() around it? The second transition from FENCED to RESETTING can fail if someone resets the controller. It should be fine to do nothing in this case because they will have queued reset or error work.