MFV r264666:

4374 dn_free_ranges should use range_tree_t

illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4

MFC after:	2 weeks

(cherry picked from commit 3344ccfa375a376875af16049d67758b63e930ef)
MFV r264667:

4752 fan out read zio taskqs

illumos/illumos-gate@1b497ab83e8f1c58bba5da59c649207a442a4720

(cherry picked from commit aff2f85dda18772982f627879ab3134f575056d8)
MFV r264668:

4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba

MFC after:	2 weeks

(cherry picked from commit b28116674071c0c16c72c5fb110b77592f9f70d3)
Add interim fix for solarflare driver.

Obtained from freebsd-net, this may not be what is eventually
upstreamed by solarflare, however for the moment it fixes
the problem.
Add VIMAGE compilation support to some key netgraph modules.
Disable UNMAP on the STEC 842.

Changes courtesy of mav@ixsystems.com
This drive firmware goes out to lunch periodically
when TRIM is enabled.

Ticket: #4858
Make reset handling in iSCSI target RFC-compliant.  This fixes some rare
hangs with Open-iSCSI (Linux).

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 8ed0a5d71d40e495bfbc50eccc010915b97100aa)
Make the error message more clear.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f1f4cd9f224f22e9c224f7a9fc8a026d854eb863)
Use a less unusual syntax in debug printfs.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit ea00acab004517278f2d7d63a4f20df5d34a73dd)
Fix harmless warning after reconnecting a session and not doing anything
with it.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 522b872251537f2fa2e10f3c7f58fed4b17df55e)
Move the ic_outstanding_count under #ifdef DIAGNOSTIC.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 49eacc91a5f5843b878a707d57fb588c3f3713bb)
Target Transfer Tag is opaque; no need to htonl(3) it.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit cf6f64db9cda7c574b61877807417af3248e73bb)
Rework cfiscsi_datamove_in() to obey expected data transfer length
received from the initiator.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b46b2184f035b7399cc4585988f4d1d73a7d91b6)
Remove ctl_mem_pool.{c,h}.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 427a2d21c4d21db6b006e9bb60f5259c47517553)
Remove ctl(4) from GENERIC.  Also remove 'options CTL_DISABLE'
and kern.cam.ctl.disable tunable; those were introduced as a workaround
to make it possible to boot GENERIC on low memory machines.

With ctl(4) being built as a module and automatically loaded by ctladm(8),
this makes CTL work out of the box.

Reviewed by:	ken
Sponsored by:	FreeBSD Foundation

(cherry picked from commit 80b8b2f7791585982400714f802d5617862e9c68)

Conflicts:
	sys/arm/conf/ATMEL
	sys/cam/ctl/ctl.c
	sys/sparc64/conf/GENERIC
Make it possible to have multiple CTL worker threads.  Leave the default
of 1 for now.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 02f16a2065d25e53407b1c52f896a60351bba9a4)
Hide CTL messages about SCSI error responses.  Too many users take
them for actual target errors.  They can be enabled back by setting
kern.cam.ctl.verbose=1, or booting with bootverbose.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit ce1467af53e91b14b00aa31254188830cd2585fa)
Remove the homegrown ctl_be_block_io allocator, replacing it with UMA.
There is no performance difference.

Reviewed by:	mav@
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 99e9c66846b2e9db802523c030537cd646ad0446)
Get rid of ICL lock; use upper-layer (initiator or target) lock instead.
This avoids extra locking in icl_pdu_queue(); the upper layer needs to call
it while holding its own lock anyway, to avoid sending PDUs out of order.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 6bb1f3c7fe2aa95c8f204120e91fafd5526c7432)
Instead of "icltx" and "iclrx", use thread names with prefix from upper
layer, so that one can see which side of the stack the threads are for.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 9161dabe243a4a11092c20302198ed20482e615f)