MFC r268605:
Remove code separator lines which do not conform to style(9).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268606:
Generalize vn_get_ino() to allow filesystems to use custom vnode
producer. Convert inline copies of vn_get_ino() in msdosfs and cd9660
into the uses of vn_get_ino_gen().


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268607:
In kern_linkat(), avoid passing doomed vnode to the VOP.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268608:
The tmpfs_link() must not dereference the filesystem-specific data for
a vnode until it is verified that the vnode indeed belongs to tmpfs mount.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268609:
Add some assertions for the code handling vm_object for tmpfs vnode.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268610:
Add convenience macro to assert tmpfs node lock.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268611:
Replace goto's with the return.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268612:
Add helper helper vfs_write_suspend_umnt().

Fix the bug in the FFS unmount, when suspension failed, the ufs
extattrs were not reinitialized.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268613:
Style.  Add comment about lock mode.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268614:
Use tmpfs_vn_get_ino_gen() to handle the races with reclaim in tmpfs
dotdot lookup.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268615:
Add OBJ_TMPFS_NODE flag.

MFC r268616:
Set the OBJ_TMPFS_NODE flag for vm_object of VREG tmpfs node.

MFC r269053:
Correct assertion. tmpfs vm object is always at the bottom of
the shadow chain.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268617:
Rework the tmpfs unmount.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268766:
Do not ignore error from tmpfs_alloc_vp().


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268236,268264,268524,268646,268802,269021:
This brings VHD support to mkimg(1); both dynamic and fixed file formats.
Dynamic VHD and VMDK file images are now sparsely written, meaning that
"free" sectors do not occupy space.

Relnotes: yes


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC of R267935: Sync the E1000 shared code to Intel internal, and
		more importantly add new I218 adapter support to em.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r269088:

Fix ctl(4) kldload failure that manifested like this:

link_elf_obj: symbol icl_pdu_new_bhs undefined

PR:		192031
Submitted by:	Nils Beyer (earlier version)
Sponsored by:	FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268713: MFV r268702:

Add missing *_destroy() calls in various places with ZFS.

Illumos issue:
  4975 missing mutex_destroy() calls in zfs


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268720: MFV r268714:

Improve extreme rewind import.

When doing an "extreme rewind" import ("zpool import -XF"), we attempt
to verify all data in the pool, essentially scrubbing the entire pool.
The problem is that spa_load_verify_cb() issues an unbounded number of
concurrent scrub i/os.  This can lead to all of memory being used for
these zio's, wedging the system. Like normal scrub, we need to put a
cap on the number of outstanding i/os, and have the traverse thread
block when we reach this cap.

For this purpose the cap can be very large (10,000) to optimize the
elevator algorithm.  Three kernel tunables have been added:

	vfs.zfs.spa_load_verify_maxinflight
	vfs.zfs.spa_load_verify_metadata
	vfs.zfs.spa_load_verify_data

The latter two tunables controls whether metadata and/or user data
when doing extreme rewind.

Make 'zpool import -T' imply scrub.

Make zpool import -T <txg> accept hexadecimal values for the txg when
prefixed with 0x.

Skip txg's for which there is no uberblock when doing extreme rewind.

Skip reading all user data twice by skipping prefetches when doing
extreme rewinds as we do not access via the ARC.

Illumos issues:
  4970 need controls on i/o issued by zpool import -XF
  4971 zpool import -T should accept hex values
  4972 zpool import -T implies extreme rewind, and thus a scrub
  4973 spa_load_retry retries the same txg
  4974 spa_load_verify() reads all data twice


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268979:

Don't save entropy inside jails.

As of r126744, we no longer feed the entropy device in jails upon
start, and collecting them is no longer useful.

PR:		conf/126744
Submitted by:	Eugene Grosbein <eugen grosbein net> (with minor changes)
Approved by:	so (des)


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268727 (by delphij):

Add a bandaid to fix GCC build (on sparc64 et al).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@269225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f