MFC r243753:
	The getline function returns the number of characters read, not
	written. Use clearer text for this.

PR:		docs/174023
Approved by:	cperciva (implicit)
MFC r243084:
	Add support for a -q flag.  While here make the custom argument parsing
	use getopt instead of hacking on it more.  This change also fixes the
	method of silencing the compiler warning about gfn being used
	uninitialized.

Approved by:	cperciva (implicit)
MFC r243077:
	Fix error code if file isn't readable.

Approved by:	cperciva (implicit)
MFC r243101:
	Using set -x produces output on stderr instead of stdout.
	It also doesn't work with make -s.
	Prefer the use of builtin make features.

PR:		misc/126312
Approved by:	cperciva (implicit)
MFC r243238:
	Standardize EXIT STATUS instructions in man pages when possible.

Approved by:	cperciva (implicit)
MFC to r242840:

  Add y flag and environment variable LS_SAMESORT to specify the same
  sorting order for time and name with the -t option.  IEEE Std 1003.2
  (POSIX.2) mandates that the -t option sort in descending order, and
  that if two files have the same timestamp, they should be sorted in
  ascending order of their names.  The -r flag reverses both of these
  sort orders, so they're never the same.  This creates significant
  problems for sequentially named files stored on FAT file systems,
  where it can be impossible to list them in the order in which they
  were created.

  Add , (comma) option to print file sizes grouped and separated by
  thousands using the non-monetary separator returned by localeconv(3),
  typically a comma or period.
MFC rr243398-243399:
- core(5) references sysctl debug.num_cores, but it is really debug.ncores.
- [mdoc] remove hard sentence breaks.

PR:		docs/173831
Merge r242474:
   Remove separate paragraph on ASCII messages and instead
  provide this information along with messages documentation,
  like this done in manual pages for other netgraph nodes.

  Submitted by:   Mamontov Roman <mr.xanto gmail.com>
MFC recent ZFS changes from illumos:
243503, 243524, 243525, 243560, 243561

MFC r243503:
Illumos 13879:4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
3330 space_seg_t should have its own kmem_cache
3331 deferred frees should happen after sync_pass 1
3335 make SYNC_PASS_* constants tunable

New loader-only tunables:
vfs.zfs.sync_pass_deferred_free
vfs.zfs.sync_pass_dont_compress
vfs.zfs.sync_pass_rewrite

References:
https://www.illumos.org/issues/3329
https://www.illumos.org/issues/3330
https://www.illumos.org/issues/3331
https://www.illumos.org/issues/3335

MFC r243524:
Import the zio nop-write improvement from Illumos. To reduce I/O,
nop-write omits overwriting data if the checksum (cryptographically
secure) of new data matches the checksum of existing data.
It also saves space if snapshots are in use.

It currently works only on datasets with enabled compression, disabled
deduplication and sha256 checksums.

IllumOS 13887:196932ec9e6a and 13888:7204b3392a58
3236 zio nop-write

References:
https://www.illumos.org/issues/3236

MFC r243525:
Add loader(8) tunable to enable/disable nopwrite functionality:
vfs.zfs.nopwrite_enabled

MFC r243560:
Introduce a new dataset aclmode setting "restricted" to protect ACL's
being destroyed or corrupted by a drive-by chmod.

illumos-gate 13889:a67716f16746
3254 add support in zfs for aclmode=restricted

MFC r243561:
Update manpage dates in zfs.8 and zpool.8
MFC: 238537,238552
Add support for walltimestamp in DTrace.

Submitted by:	Fabian Keil
Includes correction by: avg
MFC: 238979

When we return with an error we cannot unlock the mutex, because
it's been freed.  Protect against that, hopefully unlikely, case.

Reviewed by:	rpaulo
MFC r235767:

Add missing header needed by free().

Reported by:	tinderbox
MFC r235771:

Remove redundant declaration of yyparse.

Reported by:	tinderbox
MFC r243868:
Do not allocate buffer of the 255 bytes length on the stack.
MFC r242936:   Set optimized_out instead of reporting an error.

  This provides a better display when debugging code compiled with
  optimization on.

  GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to
  GDB's switch to GPLv3), modified for the interfaces provided by
  GDB 6.1.1.

  2005-02-28  Daniel Jacobowitz  <d...@codesourcery.com>

   * dwarf2loc.c (loclist_read_variable): Set optimized_out
   instead of reporting an error.
   * valprint.c (value_check_printable): New function.
   (common_val_print): New function.  Use value_check_printable.
   (value_print): Use value_check_printable.
   * value.h (common_val_print): Add prototype.
   * c-valprint.c (c_val_print): Use common_val_print.
   * cp-valprint.c (cp_print_value_fields): Likewise.
   (cp_print_hpacc_virtual_table_entries): Likewise.
   * f-valprint.c (f_val_print): Likewise.
   * jv-valprint.c (java_value_print, java_print_value_fields):
   Likewise.
   * scm-valprint.c (scm_value_print): Likewise.
   * stack.c (print_frame_args): Likewise.
   * varobj.c (c_value_of_variable): Likewise.
   * p-valprint.c (pascal_val_print, pascal_value_print): Likewise.
   (pascal_object_print_value_fields): Likewise.  Update call to
   pascal_object_print_static_field.
   (pascal_object_print_static_field): Remove TYPE argument.  Use
   common_val_print.

Sponsored by:        ADARA Networks
MFC r242943: Do not unwind past a zero PC frame.

  This improves GDB usability when debugging code compiled with
  optimization.

  Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior
  to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded
  inline.

  | 2004-12-12  Andrew Cagney  <cagney@gnu.org>
  |
  | * frame.c (get_prev_frame): When unwinding normal frames, check
  | that the PC isn't zero.

Sponsored by:	ADARA Networks
Revert r244108. yyparse() declaration isn't redundant in stable/9.

Reported by:	tinderbox :)
MFC r243904:

Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).
MFC r244057, r244059:

r244057:
 Get 'uname -r' earlier, so it can be used to determine what branch is
 being run to set BSDINSTALL_DISTSITE accordingly.  This change allows
 non-RELEASE branches to use the FTP snapshots directory for bootonly.iso
 installations.

r244059:
 Add missed BETA* to list.
MFC r244053:
Fix typo.