[PATCH v7] nvme-fabrics: reject I/O to offline device
Victor Gladkov
Victor.Gladkov at kioxia.com
Wed Aug 12 10:09:11 EDT 2020
On 2020/8/11 23:56, Sagi Grimberg wrote:
>
> I think we still have a question to why is this fabrics specific, and if this is
> needed in fabrics, why is it not needed in pci as well.
>
> Keith? Personally speaking, I also share Chirstoph's opinion that if it's not
> clearly fabrics specific, we should try to make pci and fabrics unified.
>
> Your thoughts on this?
PCI doesn't define 'timeout'/'number of retries' for reconnect of the controller.
And the controller shuts down immediately if controller times out while starting.
NVME_CTRL_CONNECTING state used as transition state in the
nvme_reset_work() procedure to save similarities with fabric transports.
See below quotes from pci.c
1.
----------------------------------------------------
Quote from nvme_timeout() function (pci.h)
/*
* Shutdown immediately if controller times out while starting. The
* reset work will see the pci device disabled when it gets the forced
* cancellation error. All outstanding requests are completed on
* shutdown, so we return BLK_EH_DONE.
*/
switch (dev->ctrl.state) {
case NVME_CTRL_CONNECTING:
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING);
/* fall through */
----------------------------------------------------
2.
----------------------------------------------------
Quote from nvme_reset_work() function (pci.h)
/*
* Introduce CONNECTING state from nvme-fc/rdma transports to mark the
* initializing procedure here.
*/
if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_CONNECTING)) {
----------------------------------------------------
More information about the Linux-nvme
mailing list