MFC r273158:
Prevent ZFS leaking pool free space

Early MFC approved by re@

Approved by:	re@ (glebius)
Sponsored by:	Multiplay
Merge r272358 from head:
  Use rn_detachhead() instead of direct free(9) for radix tables.
Merge r272385 by melifaro from head:
  Free radix mask entries on main radix destroy.
  This is temporary commit to be merged to 10.
  Other approach (like hash table) should be used
  to store different masks.

PR:             194078
MFV r273060:

Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Obtained from:  FreeNAS (issue #6239)
MFC r272506: MFV r272495:

In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in
response of memory pressure.

Illumos issue:
    5163 arc should reap range_seg_cache
MFC r272527:

Don't make nested definition for range_seg_cache.

Reported by:	ian
MFC r272583: MFV r272500:

Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness
MFC r273093, r273096:

r273093:
  Merge the following from ^/projects/release-vmimage:
  r272436, r272437, r272792:

  r272436:
    Remove the first argument to panic(), which was initially
    intended to be the exit code, however when a non-zero exit
    code was returned to release/Makefile, this would prevent
    any remaining (and possibly successful) stages from being
    attempted.

  r272437:

    If the vm-base target fails, prevent the vm-image target
    from being run since it cannot possibly succeed.

  r272792:

    Add /usr/local/bin and /usr/local/sbin to PATH, needed
    if third-party software needs to use utilities outside
    of the base system during post-install stages (indexinfo
    is one culprit).

r273096:
  Merge the following from ^/projects/release-vmimage:
  r273076, r273077, r273079, r273095:

  r273076:
    Add a separate make(1) target to release/Makefile to
    build FreeBSD virtual machine disk images for use on
    the Microsoft Azure service.

    For now, this target is not directly connected to the
    build, however can be manually invoked.

    The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
    which does the heavy lifting to produce proper VHDs.
    mk-azure.sh uses a configuration file, defaulting to
    tools/azure.conf if otherwise unset.

  r273077:
    Clear VM_RC_LIST.

  r273079:
    Fix signal list to trigger umount(8).

  r273095:
    Output an informational message when mkimg(1) runs, so it
    does not appear that the process has stopped while waiting
    for a 'y/n' response when waagent is deprovisioned.

Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
MFC 272182:
Don't panic if a resource is allocated twice.  Instead, print a warning and
fail the allocation request.  Allocations of "reserved" resources such as
PCI BARs already fail the request instead of panic'ing in this case.
MFC r257302 by rea:

  binutils/bfd: fix printf-like format strings for "bfd *" arguments

  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
MFC 272449:
Require p_cansched() for changing a process' protection status via
procctl() rather than p_cansee().
MFC 272668:
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR:		194025
MFC 268369,268817,272771,272772:
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.
MFC r273112: Set the DROP_EN bit before the RX queue is brought up and active.

He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.

This commit doesn't remove the sysctl path or try to change its
behaviour.  I'll talk with others about how to finish fixing that
before I tackle that.

PR:           kern/194311
Submitted by: luigi
MFC after:    3 days
Sponsored by: Norse Corp, Inc
MFC r273135:
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):

- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
  cancelling and starting a timeout.
- Implement more Linux scatterlist
  functions.

Sponsored by:	Mellanox Technologies
MFC r272534:
Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
not locked, but range is.
MFC r272952:
Do not set IN_ACCESS flag for read-only mounts.
MFC	r272958, r273006:

ddb: space/tab fixes and ANSI-fy function declarations.

No functional change.