[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260210222036.GP3729-mkhalfella@purestorage.com>
Date: Tue, 10 Feb 2026 14:20:36 -0800
From: Mohamed Khalfella <mkhalfella@...estorage.com>
To: James Smart <jsmart833426@...il.com>
Cc: Justin Tee <justin.tee@...adcom.com>,
Naresh Gottumukkala <nareshgottumukkala83@...il.com>,
Paul Ely <paul.ely@...adcom.com>,
Chaitanya Kulkarni <kch@...dia.com>, Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>, Keith Busch <kbusch@...nel.org>,
Sagi Grimberg <sagi@...mberg.me>,
Aaron Dailey <adailey@...estorage.com>,
Randy Jennings <randyj@...estorage.com>,
Dhaval Giani <dgiani@...estorage.com>,
Hannes Reinecke <hare@...e.de>, linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/14] nvme-fc: Use CCR to recover controller that
hits an error
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.
Powered by blists - more mailing lists