OPNsense - FreeBSD source
Find a file
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
.cirrus-ci Cirrus-CI: retry pkg installation on failure 2021-06-10 08:54:52 -04:00
.github/workflows .github: Attempt to un-break Clang 9 action 2021-05-29 04:38:07 +01:00
bin pkgbase: Put chio in utilities 2021-06-30 09:24:32 +02:00
cddl zfs: attach zpool_influxdb to build 2021-07-10 12:26:42 +02:00
contrib clang: stop linking _p libs for -pg as of FreeBSD 14 2021-07-11 19:27:47 -04:00
crypto kerberos.8: Replace dead link 2021-05-19 17:22:44 -04:00
etc zfs: attach zpool_influxdb to build 2021-07-10 12:26:42 +02:00
gnu Bump shared library versions after ncurses bump in 13. 2021-02-04 17:51:45 -08:00
include Fix build with WITHOUT_AUDIT=yes in src.conf 2021-07-03 10:20:02 +02:00
kerberos5 kerberos5: Silence compiler warnings 2021-03-17 09:53:08 +00:00
lib math(3): Use the .Fa macro for function arguments 2021-07-12 06:07:24 +02:00
libexec devmatch: improve naming of devmatch config variable 2021-07-08 16:14:07 -06:00
release pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
rescue ping: add a ping6 hard link for backwards compatibility 2020-11-26 18:33:04 +00:00
sbin mount_nfs.8: Update the man page for commit a145cf3f73 2021-07-11 15:30:01 -07:00
secure pkgbase: Put openssl in its own package 2021-06-30 09:24:31 +02:00
share config_intrhook: provide config_intrhook_drain 2021-07-12 13:30:55 -06:00
stand stand: Fix __elfN(loadimage) return value 2021-06-20 15:00:54 -04:00
sys nvme: fix a race between failing the controller and failing requests 2021-07-12 13:30:55 -06:00
targets targets: no longer depend on bt3cfw(8) 2021-01-16 23:53:13 +01:00
tests netpfil tests: Basic dummynet pipe test 2021-07-09 10:09:34 +02:00
tools Add deprecation notice for WITH_PROFILE option 2021-07-07 09:17:06 -04:00
usr.bin one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs 2021-07-10 11:07:26 -06:00
usr.sbin bhyve: Fix NVMe iovec construction for large IOs 2021-07-09 07:24:14 -07:00
.arcconfig arcconfig: add callsign again 2020-11-23 04:39:29 +00:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus-CI: retry pkg installation on failure 2021-06-10 08:54:52 -04:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes Add a basic clang-format configuration file 2019-06-07 15:23:52 +00:00
.gitignore Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
Makefile.inc1 Makefile.inc1: unbreak bootstrap when kbdcontrol does not exist 2021-03-28 13:49:34 -04:00
Makefile.libcompat libcompat: remove redundant path for ncurses 2021-01-07 15:14:52 +01:00
Makefile.sys.inc AUTO_OBJ: For all top-level targets enforce using an OBJDIR. 2017-12-05 21:29:47 +00:00
ObsoleteFiles.inc zfs: merge openzfs/zfs@c3b60eded (zfs-2.1-release) into stable/13 2021-06-13 05:43:03 +02:00
README Mark the repository has been converted to Git 2020-12-23 12:27:27 +08:00
README.md Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
RELNOTES RELNOTES: Add an entry for commit 8a04edfdcb 2021-07-11 15:45:00 -07:00
UPDATING UPDATING: Add an entry for commit 8a04edfdcb 2021-07-11 15:39:23 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory. This file was last revised on: FreeBSD

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.

Source Roadmap:

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

stand		Boot loader sources.

sys		Kernel sources.

sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
		used in release builds. NOTES contains documentation of
		all possible entries.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html