2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-14 00:24:15 +08:00
linux-next/drivers/nvme/host
Sagi Grimberg d5bf4b7f43 nvme-rdma: fix concurrent reset and reconnect
Now ctrl state machine allows to transition from RESETTING to
RECONNECTING.  In nvme-rdma when we receive a rdma cm DISONNECTED event,
we trigger nvme_rdma_error_recovery. This happens also when we execute a
controller reset, issue a cm diconnect request and receive a cm
disconnect reply, as a result, the reset work and the error recovery work
can run concurrently.

Until now the state machine prevented from the error recovery work from
running as a result of a controller reset (RESETTING -> RECONNECTING was
not allowed).

To fix this, we adopt the FC state machine approach, we always transition
from LIVE to RESETTING and only then to RECONNECTING.  We do this both
for the error recovery work and the controller reset work:

 1. transition to RESETTING
 2. teardown the controller association
 3. transition to RECONNECTING

This will restore the protection against reset work and error recovery work
from concurrently running together.

Fixes: 3cec7f9de4 ("nvme: allow controller RESETTING to RECONNECTING transition")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-12-29 10:32:58 +01:00
..
core.c nvme: fix sector units when going between formats 2017-12-29 10:31:05 +01:00
fabrics.c nvme: track subsystems 2017-11-10 19:53:25 -07:00
fabrics.h nvme-fabrics: introduce init command check for a queue that is not alive 2017-11-20 08:28:31 +01:00
fc.c nvme-fc: remove double put reference if admin connect fails 2017-12-15 15:13:33 +01:00
Kconfig nvme: implement multipath access to nvme subsystems 2017-11-10 19:53:25 -07:00
lightnvm.c nvme: track shared namespaces 2017-11-10 19:53:25 -07:00
Makefile Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
multipath.c nvme: fix spelling mistake: "requeing" -> "requeuing" 2017-11-20 08:38:10 +01:00
nvme.h nvme-pci: add quirk for delay before CHK RDY for WDC SN200 2017-11-23 09:12:08 +01:00
pci.c nvme-pci: move use_sgl initialization to nvme_init_iod() 2017-12-29 10:31:04 +01:00
rdma.c nvme-rdma: fix concurrent reset and reconnect 2017-12-29 10:32:58 +01:00