linux/drivers/nvme/host
Anton Eidelman 2181e45561 nvme: fix possible io failures when removing multipathed ns
When a shared namespace is removed, we call blk_cleanup_queue()
when the device can still be accessed as the current path and this can
result in submission to a dying queue. Hence, direct_make_request()
called by our mpath device may fail (propagating the failure to userspace).
Instead, we want to failover this I/O to a different path if one exists.
Thus, before we cleanup the request queue, we make sure that the device is
cleared from the current path nor it can be selected again as such.

Fix this by:
- clear the ns from the head->list and synchronize rcu to make sure there is
  no concurrent path search that restores it as the current path
- clear the mpath current path in order to trigger a subsequent path search
  and sync srcu to wait for any ongoing request submissions
- safely continue to namespace removal and blk_cleanup_queue

Signed-off-by: Anton Eidelman <anton@lightbitslabs.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-06-21 11:08:38 +02:00
..
core.c nvme: fix possible io failures when removing multipathed ns 2019-06-21 11:08:38 +02:00
fabrics.c nvme-fabrics: remove unused argument 2019-05-14 17:19:43 +02:00
fabrics.h nvme-fabrics: convert to SPDX identifiers 2019-02-20 07:22:13 -07:00
fault_inject.c nvme: convert to SPDX identifiers 2019-02-20 07:22:28 -07:00
fc.c nvme-fc: add message when creating new association 2019-06-21 11:08:38 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lightnvm.c block: remove blk_init_request_from_bio 2019-06-20 10:29:22 -06:00
Makefile nvme-tcp: add NVMe over TCP host driver 2018-12-13 09:58:58 +01:00
multipath.c nvme-multipath: avoid crash on invalid subsystem cntlid enumeration 2019-05-13 16:00:03 +02:00
nvme.h nvme-pci: Sync queues on reset 2019-05-17 11:04:34 -06:00
pci.c nvme-pci: don't limit DMA segement size 2019-06-05 13:18:39 -06:00
rdma.c nvme-rdma: use dynamic dma mapping per command 2019-06-06 09:53:19 -07:00
tcp.c nvme-tcp: fix queue mapping when queue count is limited 2019-05-30 11:07:37 -07:00
trace.c nvme: add get-feature to admin cmds tracer 2019-03-13 12:05:39 -06:00
trace.h nvme: trace all async notice events 2019-05-14 17:19:47 +02:00