opnsense-src/sys
Warner Losh 1109ce0da2 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

(cherry picked from commit f0f4712165)
2021-07-12 13:30:55 -06:00
..
amd64 amd64: do not touch BIOS reset flag halfword, unless we boot through BIOS 2021-06-30 07:42:13 +03:00
arm arm: Make sure we can handle a thumb entry point. 2021-07-07 22:22:41 +02:00
arm64 arm64: Make sure COMPAT_FREEBSD32 handles thumb entry point. 2021-07-07 22:22:18 +02:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam Introduce "soft" serseq variant. 2021-05-05 23:18:38 -04:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-15 21:27:24 -04:00
compat linux(4): Prevent integer overflow in futex_requeue. 2021-06-29 15:58:32 -04:00
conf kern.mk: fix -Wno-error style to fix build with Clang 12 2021-06-22 21:20:39 +02:00
contrib zfs: merge openzfs/zfs@4f92fe0f5 (zfs-2.1-release) into stable/13 2021-07-10 17:59:52 +02:00
crypto armv8crypto: note derivation in armv8_crypto_wrap.c 2021-03-22 13:14:51 -03:00
ddb ddb: reliably fail with ambiguous commands 2021-07-02 14:13:24 -07:00
dev nvme: fix a race between failing the controller and failing requests 2021-07-12 13:30:55 -06:00
dts Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
fs nfscl: Change the default minor version for NFSv4 mounts 2021-07-11 15:26:55 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-04-21 10:20:33 -03:00
geom gmultipath: make physpath distinct from the underlying providers' 2021-06-17 12:39:14 -06:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 Add quirks for Linux ABI signals handling 2021-06-22 04:45:32 +03:00
isa Remove more remnants of sio(4) 2021-04-14 09:19:49 -04:00
kern config_intrhook: provide config_intrhook_drain 2021-07-12 13:30:55 -06:00
kgssapi State kgssapi dependency on xdr. 2020-09-17 22:29:38 +00:00
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-06-12 02:21:54 +01:00
mips Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
modules zfs: merge openzfs/zfs@4f92fe0f5 (zfs-2.1-release) into stable/13 2021-07-10 17:59:52 +02:00
net iflib: switch bare zone_mbuf use to m_free_raw 2021-07-05 12:05:00 +00:00
net80211 net80211: Fix a typo in a comment 2021-03-20 11:13:31 +01:00
netgraph Consistently use the SOLISTENING() macro 2021-06-21 09:14:40 -04:00
netinet libalias: Switch to SPLAY trees 2021-07-06 08:55:53 +02:00
netinet6 mend 2021-06-07 11:01:28 +02:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-17 13:43:07 -04:00
netpfil pf: getstates: avoid taking the hashrow lock if the row is empty 2021-07-09 10:08:32 +02:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-06-02 09:34:47 -04:00
nfs
nfsclient
nfsserver nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nlm
ofed ofed: quiet gcc -Wint-in-bool-context 2021-07-02 14:12:18 -07:00
opencrypto cryptodev: Fix some input validation bugs 2021-05-14 09:58:54 -04:00
powerpc Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
riscv Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
rpc krpc: Acquire ref count of CLIENT for backchannel use 2021-06-26 16:03:41 -07:00
security mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit 2021-07-05 11:32:14 +00:00
sys config_intrhook: provide config_intrhook_drain 2021-07-12 13:30:55 -06:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests tests: Revise FIB lookups per second benchmarking routines 2021-06-20 13:27:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-19 20:31:54 -04:00
ufs ffs_softdep: force sync if journal is low in journal_check_space 2021-07-07 13:50:44 +03:00
vm Un-staticise vm_page_init_page() 2021-06-24 05:20:33 +03:00
x86 Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
xdr
xen xen: remove .swp file from public headers 2021-01-11 18:14:11 +01:00
Makefile