[PATCH] NVMe: Fix reset/remove race
Keith Busch
keith.busch at intel.com
Tue Mar 22 14:43:40 PDT 2016
On Tue, Mar 22, 2016 at 03:25:56PM -0600, Keith Busch wrote:
> /*
> - * 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_HANDLED.
> + * Disable immediately if controller times out while starting or
> + * stopping. If resetting, the 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_HANDLED.
> */
> - if (test_bit(NVME_CTRL_RESETTING, &dev->flags)) {
> + if (test_bit(NVME_CTRL_RESETTING, &dev->flags) ||
> + test_bit(NVME_CTRL_REMOVING, &dev->flags)) {
> dev_warn(dev->ctrl.device,
> "I/O %d QID %d timeout, disable controller\n",
> req->tag, nvmeq->qid);
The portion above was not tested, and should not have been part in this
commit. Apologies for the churn, but will need to resend as it doesn't
appear correct.
More information about the Linux-nvme
mailing list