Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.

Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.

MFC after:	1 week

(cherry picked from commit 65ae10fa381c6147e1901d86d2e81478f5c52ca5)
Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned.  Previously that code worked only once, confusing CTL.

MFC after:	1 month

(cherry picked from commit 8a81e148a45a5c56bc522c3a3b804839a9fa6cc3)
Fix r272936 build with old GCC.

MFC after:	1 week

(cherry picked from commit efea9edd5f1e71f1d9cc0324a921876bc38d6a9f)
Filter out duplicate AC_PATH_REGISTERED async events.

Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot.  That was not happening
before r272935 because the driver was initialized later.  After that change
it started create duplicate ports in CTL.

(cherry picked from commit ab5e97992fb837cb1eee09a5f1262567a5a89ba5)

Conflicts:
	sys/cam/ctl/scsi_ctl.c
Set CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.

PR:		194128
Submitted by:	Scott M. Ferris <smferris@gmail.com>
MFC after:	3 days
Sponsored by:	EMC/Isilon Storage Division

(cherry picked from commit 90e45e872567394488b42e3824f966c49451bf4a)
Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.

(cherry picked from commit b8710d7f1c191028a4b06dafd9c859c99dad092c)
Store persistent reservation keys as uint64_t instead of uint8_t[8].

This allows to simplify the code and save 512KB of RAM per LUN (8%)
by removing no longer needed "registered" keys flags.

(cherry picked from commit a1c2a0e00c5d5ed394fc587fffdcc02fffabd150)
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.

(cherry picked from commit 96aaf8224f413fc723e4d3f75271dda0fcf43049)

Conflicts:
	sys/cam/ctl/ctl_backend_block.c
Shorten frontend name.

(cherry picked from commit 1ba6a6c2fd7549c0c8eaf2f3973626c63c4f7ee5)
Give physical and virtual ports numbers some more meaning.

(cherry picked from commit ec71d2fca1ffe930ae141cbd38eebb35257c087d)
Improve and document `ctladm portlist` subcommand.

Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.

MFC after:	1 week

(cherry picked from commit e3e9d7f585ddc1035aee9aab7cc3dcc190177e4e)

Conflicts:
	usr.sbin/ctladm/ctladm.c
Remove one second wait for threads exit from icl_conn_close().

Switch it from polling with pause() to using cv_wait()/cv_signal().

(cherry picked from commit 278287166d688429025533128effbb43d1ac0bb0)
Add tunable and sysctl for arc_shrink_shift.

(Same as FreeBSD revision 273026)

Ticket:	#6266
MFC r271429:
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.

Approved by:	re (glebius)
Sponsored by:	Multiplay

(cherry picked from commit a0b52baaa82642f374e8621df92ebe76e43eea1e)
MFC r271934:
Output boot code warning when zpool upgrade -a is used to add features.

PR:		188328
Approved by:	re (marius)
Sponsored by:	Multiplay

(cherry picked from commit 971865d1c71dd85a0535df2b5c452a3322832568)
MFC r272389:

Diff reduction with kernel code: instruct the compiler that the data of
these types may be unaligned to their "normal" alignment and exercise
caution when accessing them.

PR:		194071
Approved by:	re (gjb)

(cherry picked from commit 0bbb133a516a472ce6215fb37ab2487ff207356e)
Make external NFS clients know when files have their attributes changed and
avoid cache the file's state indefinitely. The va_filerev is what is sent
to the client as the "change" attribute, the client is periodically fetching
the attributes and without this option the attribute remains as some garbage
value.

Phabric:	D905
Reported by:	Kevin Buhr <buhr@asaurus.net>
Reviewed by:	rmacklem, delphij
Approved by:	delphij
Obtained from:	r272467
Sponsored by:	QNAP Systems Inc.

(cherry picked from commit 6b6a0e5b05ab1414054afc77562682367d8856fc)
MFC r261892: zpool.8: fix typo in option description of labelclear command

(cherry picked from commit 7d7d42cd16ff63b027c82907b5e30e5fbb6af9ae)
MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line

(cherry picked from commit e7a471ff5e19e0302de711465a8a05f89c3a76ed)
MFC r271802:
Add dtrace probe support for zfs SET_ERROR(..)

MFC r271873:
Fix static kernel build with options ZFS

MFC r271819:
Remove sys/types.h include as per style (9)

Sponsored by:	Multiplay

(cherry picked from commit 7e6d3acc4d6d4e297610ebdd45611d56022dd7ad)