linux_dsm_epyc7002/drivers/nvme/host
James Smart 3efd6e8ebe nvme_fc: correct abort race condition on resets
During reset handling, there is live io completing while the reset
is taking place. The reset path attempts to abort all outstanding io,
counting the number of ios that were reset. It then waits for those
ios to be reclaimed from the lldd before continuing.

The transport's logic on io state and flag setting was poor, allowing
ios to complete simultaneous to the abort request. The completed ios
were counted, but as the completion had already occurred, the
completion never reduced the count. As the count never zeros, the
reset/delete never completes.

Tighten it up by unconditionally changing the op state to completed
when the io done handler is called.  The reset/abort path now changes
the op state to aborted, but the abort only continues if the op
state was live priviously. If complete, the abort is backed out.
Thus proper counting of io aborts and their completions is working
again.

Also removed the TERMIO state on the op as it's redundant with the
op's aborted state.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
2018-02-11 10:45:34 +02:00
..
core.c nvme: Fix discard buffer overrun 2018-02-08 18:35:55 +02:00
fabrics.c Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block 2018-01-29 11:51:49 -08:00
fabrics.h nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING 2018-02-08 18:35:53 +02:00
fc.c nvme_fc: correct abort race condition on resets 2018-02-11 10:45:34 +02:00
Kconfig nvme: implement multipath access to nvme subsystems 2017-11-10 19:53:25 -07:00
lightnvm.c lightnvm: make geometry structures 2.0 ready 2018-01-05 08:50:12 -07:00
Makefile nvme: add tracepoint for nvme_setup_cmd 2018-01-26 12:34:40 +01:00
multipath.c nvme/multipath: Use blk_path_error 2018-01-10 10:52:18 -07:00
nvme.h nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING 2018-02-08 18:35:53 +02:00
pci.c nvme: rename NVME_CTRL_RECONNECTING state to NVME_CTRL_CONNECTING 2018-02-08 18:35:53 +02:00
rdma.c nvme-rdma: use NVME_CTRL_CONNECTING state to mark init process 2018-02-08 18:35:53 +02:00
trace.c nvme: add tracepoint for nvme_setup_cmd 2018-01-26 12:34:40 +01:00
trace.h nvme: add tracepoint for nvme_complete_rq 2018-01-26 12:34:40 +01:00