From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (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 2394032E132 for ; Fri, 13 Feb 2026 19:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771010951; cv=none; b=sRsu/0tx60BOlUe+CwBJJV6yHcJJon2gsAhPyo7SwJRaHnZkBMPXyHpLbqEhVd/mFa2cnkBgeIf/vEGPExvwL2SWT6jrNjqopLBHt2Mt0Td3EokB1CvzVtSn2TJykG/MkfXJggkjUqK108jb768rDYX5dPobUJRbP53Cpf95GWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771010951; c=relaxed/simple; bh=212zx+Iz6MGXOBOLZ8OHcKVgX1WQ/EX0XZIsXXrAsx8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M3n4m1hFm2dO2dhOEEc9XIjGfzIBGbzbtCN/+7G6xtvQoptTC0b68ONt87At5fMTK30j9+UoS5XAbMdqF5dVcnzHg82NSI6BkViTJVWf0Ua7ZhrHaUZWO9nBjd2LGaJ/19UyIrKX5dP62JPuxTCtEEQILhWh+UNyBh3J64U0cls= 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=MuVMTUS3; arc=none smtp.client-ip=74.125.82.46 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="MuVMTUS3" Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-127423bea4bso148382c88.0 for ; Fri, 13 Feb 2026 11:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1771010949; x=1771615749; 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=JsqNgRjpkW7iWmmHD8av+9JnxKnt41E53tPLlYIjOWY=; b=MuVMTUS3om9CJbbKdiZv1oyS1cNbqevHE0XIqryZvXGIKt2U1t1W0UkuhMfyxbWxNd BF1QHfTPCICibMvw7RUcQ+Lq230/1WZHiF2Vdab98a7Nfua8HjbtXTdfyJ0DGmwg9owc 2doo1GYxRGRV6dNkXWbRtqwLPHb5GRbluHPER6NOGn1MDdHgpyMlRCEpzlLlr1VBYphy RIq6gOfg2ovmqii74rP2LX1a9JNhmQe3XmwQ+Va9Nx+m+pXWpQppTBaDER0gC6hlYTEI 8kRpzFeNTR18l5B33rs/ZKCol6bOe0Z3KoErxhZD5KtAaQPqUQXOfpTbYMYjzr32692T PIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771010949; x=1771615749; 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=JsqNgRjpkW7iWmmHD8av+9JnxKnt41E53tPLlYIjOWY=; b=FdLQyAel+W+R1DoQcUsGl3oxDsTqOsbsTQ95JnqHbtU+AV8xtzjMZAOA2GMXXQbSIQ cl/NBGwi+DtoOmDYgjnIiuaDG4IEb9SlWDrf23LhoeGX6kPW9YbCKJKc9gKed6ZScoS8 CxwBZ3VvO3fw0bk6YeGBTYpWKkgnlt/tGz4Cpqc6SmTxSC8fWpnqkKSmqY/JKLAauxQv daPOsNWMbuGUrR316YBtApoURtdsKqrXXe9kWwKAHWtYtM9OVB21/vgbREasGbui0mq1 ipB6KAWVm/AMCtO5p20TMrlplRyvI4Ce7LRymwTLO1s1n/q0bLnxkPGU9jdJxreZjVBO smVg== X-Forwarded-Encrypted: i=1; AJvYcCWeuun8Hqms0iAJ15Dx0cvolXTW1mu9qwBEa50Xnsje/J9NiLuGZrTP767ZOYVoCzX9RB/8Jp+6aGPJxoc=@vger.kernel.org X-Gm-Message-State: AOJu0YygDgEB/+Q0acsJYei+AJiJLxZVHneOvABPz1DoJXPM8y5Qrzrw qvXohE3vW4Tw/pUltcd24ZQSBWi6F9P73+838+J67GPozQcTMgfV2JKZLfsaigfbkfU= X-Gm-Gg: AZuq6aLMZXua5nj17GEoM9Dp56bY+iJ3r2kGFyt4nARs4YlhxPWhWcJXsqgQwEb48PN 1dcdixV17Un9CbBDD/z2Do+wat3d4D6kW1rYvfG5nMWwb8v1UnAhY3m/dJINfEsOVErGOT4AabB o6r2ohk/ZUTNT1Cg91l0S5O+uQfp8Rjv5tpYR1FeZjZWguxHtVSqvExKw0h49V0+8Hxkrq5r/3C 0T7qkrzY5kb01IcD+/EBfa7TPyyuwcFoLEWX0+BlNgKb9LJstVWs3ahAZrrRK83434ddWS7xAA0 78Qkm6fPcX42VAPZaWjR/dwBlA/+wd5zHXlloiwtla/y0X3Sp/S3RqvKzZ6zhz1RMfejwItWqc3 hvWpl+3fE2JJVhrxcoSUTq3cxJ/x9m3jia081vPEasI4BWRTAEwlg+N1qIClGeZ0W9gzHs8b4Wv zmg3b6M0Q89c/DQzFdr9cjSJUKXrBRtGPbouVX9B0BPmA= X-Received: by 2002:a05:7022:249c:b0:119:e56b:9590 with SMTP id a92af1059eb24-1273aded7ddmr1419185c88.21.1771010948854; Fri, 13 Feb 2026 11:29:08 -0800 (PST) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id a92af1059eb24-1272a69c961sm6910804c88.5.2026.02.13.11.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 11:29:08 -0800 (PST) Date: Fri, 13 Feb 2026 11:29:07 -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: <20260213192907.GA3435530-mkhalfella@purestorage.com> References: <20260130223531.2478849-1-mkhalfella@purestorage.com> <20260130223531.2478849-14-mkhalfella@purestorage.com> <864e0ce2-4fa0-4d89-aaaa-a552977781a3@gmail.com> <20260210222036.GP3729-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=us-ascii Content-Disposition: inline In-Reply-To: <20260210222036.GP3729-mkhalfella@purestorage.com> On Tue 2026-02-10 14:20:37 -0800, Mohamed Khalfella wrote: > 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. Sorry I missed to comment about adding trace message when fencing finishes. Added it now.