freebsd-dev/sys/dev/nvme
Warner Losh f0f4712165 nvme: fix a race between failing the controller and failing requests
Part of the nvme recovery process for errors is to reset the
card. Sometimes, this results in failing the entire controller. When nda
is in use, we free the sim, which will sleep until all the I/O has
completed. However, with only one thread, the request fail task never
runs once the reset thread sleeps here. Create two threads to allow I/O
to fail until it's all processed and the reset task can proceed.

This is a temporary kludge until I can work out questions that arose
during the review, not least is what was the race that queueing to a
failure task solved. The original commit is vague and other error paths
in the same context do a direct failure. I'll investigate that more
completely before committing changing that to a direct failure. mav@
raised this issue during the review, but didn't otherwise object.

Multiple threads, though, solve the problem in the mean time until other
such means can be perfected.

Reviewed by:		jhb@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30366
2021-05-28 23:05:40 -06:00
..
nvme_ahci.c Make nvme(4) driver some more NUMA aware. 2019-09-23 17:53:47 +00:00
nvme_ctrlr_cmd.c Add Host Memory Buffer support to nvme(4). 2020-01-07 21:17:11 +00:00
nvme_ctrlr.c nvme: fix a race between failing the controller and failing requests 2021-05-28 23:05:40 -06:00
nvme_ns_cmd.c Add a brief comment explaining why we can return ETIMEDOUT from the call to the 2019-09-02 17:10:46 +00:00
nvme_ns.c Partially revert r248770. 2021-04-02 11:43:17 +03:00
nvme_pci.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme_private.h nvme: Make nvme_ctrlr_hw_reset static 2021-02-08 13:29:24 -07:00
nvme_qpair.c nvme: use NVME_GONE rather than hard-coded 0xffffffff 2021-02-08 13:08:48 -07:00
nvme_sim.c Report cpi->hba_* for nda(4) because why not. 2020-08-12 20:05:43 +00:00
nvme_sysctl.c nvme: Remove compat code for older kernels 2020-10-24 01:59:01 +00:00
nvme_test.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme_util.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme.c nvme: use config_intrhook_drain to avoid removable card races 2021-03-11 09:45:10 -07:00
nvme.h fix big-endian platforms after 6733401935 2021-01-08 14:41:45 -08:00