hammer2 - Start working on the freemap (note: freemap not yet operational)

* hammer2 show now tries to dump all four volume headers

* Minimum storage allocation chunk size is 1K, increase MIN_RADIX and
  MIN_ALLOC appropriately.

* Preliminary reserved block mappings for the freemap indirect and bitmap
  blocks.

* Preliminary freemap design will use normal indirect blocks (but with
  a different bref.type name).  The check area of the bref will be used to
  store additional freemap hints.

  The volume header will contain a blockref to the root of the freemap,
  and newfs_hammer2 now initializes this blockref.

* Bring major hammer2_disk.h media structure comments up to snuff.

* Formalize blockref.methods and set proper defaults.  This field contains
  the crc/check and compression methods for a blockref.
usb4bsd: Add missing parameter to ue_start().

Submitted-by:  Yellow Rabbit <yrabbit@sdf.lonestar.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2503>
hammer2 - serialized flush work part 1

This is preliminary work required to support chain structure replication
for the purposes of recording modifications which are then separated by
serialization points (by transaction id).  Ultimately this will allow the
flush code to flush to an exact serialization point and in the process
operate completely asynchronously from any further modifications being
made on the frontend after that serialization point.

* Separate hammer2_inode from hammer2_chain.

* Split the locking APIs for inodes and chains into their own functions.

* Move ip_data into chain->data->ipdata (kmalloc'd), instead of embedding
  it in hammer2_inode.  This allows the inode structure to disconnect from
  the chain.
hammer2 - serialized flush work part 2

* Adjust the hammer2_inode_lock*() API to separate the inode lock from
  the chain lock (it gets both).  The locked chain associated with the
  inode is now returned and can change during search iterations, eventually
  to be returned via hammer2_inode_unlock*().

* Fixes issues related to threads obtaining more than 1 shared lock on the
  same chain, which can deadlock deeper procedures which might need to
  temporarily upgrade the lock.

* Continue working through bugs.
libstdc++47: Fix iostream bug 2478

c++ iostreams were segfaulting -- apparently _M_table isn't defined in all
cases.  Fix inspired from FreeBSD configuration files.

https://bugs.dragonflybsd.org/issues/2478
Remove legacy lex source files

The ancient lex was replaced by flex recently.  The bootstrapping issue
seems to be solved, so let's go ahead and purge lex from base now.
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
hammer2 - serialized flush work part 3

* Clean up hammer2_inode vs hammer2_chain.  Remove chain->u.ip (the
  backpointer from the chain to the inode), which simplifies a lot
  of things.  This was only used to detect when a vnode might have to
  be recycled but we solve that a different way by adjusting the
  kernel's cache_unlink() code.

* Revamp hammer2_inode_get().  This routine now always kmalloc()'s a new
  hammer2_inode.  In HAMMER2, the hammer2_inode structure is actually
  an indirect pointer to an underlying chain so it does not have to be
  unique.  There can multiple ip's pointing to the same chain.

* Revamp hammer2_inode_put().  The ref on ip->chain is dropped via ip->chain,
  and the (passed_chain) argument is treated separately and does not
  necessarily have to match ip->chain.  This makes hammer2_inode_put()'s API
  comparable to hammer2_inode_unlock_ex(), reducing confusion.

* Depend on adjustments to cache_unlink() and cache_rename() to detect
  vnodes which should be recycled.  This code (in the proper kernel, not
  here) now triggers a deactivation if the vnode related to the namecache
  entry has no refs, allowing HAMMER2 to detect any deletions and vrecycle()
  the vnode immediately.

* Numerous ref/lock fixes.
Merge branch 'master' into gsocdrm_github
pktgen: Unbreak compile
hammer2 - serialized flush work part 4

* Hardlink helper functions now take and return hammer2_chain pointers
  instead of messing with hammer2_inode's, which simplifies matters
  greatly.

* Major cleanup of the hardlink handling code.

* Get hardlink creation/deletion mostly working as expected again.
  There is still an issue with hammer_inode aliasing (see TODO),
  and the rename-directory-to-some-parent hardlink issue has not been
  addressed yet.
kernel - Fix memory leak on iocom terminaion

* freerd_state was being cleaned up by the reader thread, but during
  decomissioning the writer thread can simulate incoming packets
  to cleanly shutdown open transactions, and this can reload
  freerd_state.

* Move the cleanup for freerd_state and freewr_state out of the
  reader/writer threads and into kdmsg_iocom_uninit() proper.

* Fixes dangling 112 bytes of memory left allocated after uninit.
kernel - cycle vnode in cache_unlink()

* cache_unlink() and cache_rename() are called by VFS's to update the
  namecache after a file deletion or rename.  cache_rename() also calls
  cache_unlink().

* Add code to this function which cycles any vnode attached to the
  namecache entry for the case where its refs are 0.  This will
  trigger VOP_INACTIVE and allow the VFS to detect file deletions.

  Generally speaking this means that VFS's no longer have to detect
  deleted files in code paths outside of VOP_INACTIVE w/regards to
  forcing a reclaim on the vnode.

* HAMMER2 now depends on this behavior.  The change in behavior allows
  HAMMER2 to do away with inode backpointers from chain structures,
  greatly simplifying the code and removing a chicken-egg dependency.

* Other VFSs (HAMMER, TMPFS, UFS) may be adjusted in the future but for
  now their file deletion code outside of VOP_INACTIVE is being left
  intact.
kernel - Fix kernel panic caused by rename race

* kern_rename() must temporarily unlock the source ncp when resolving the
  target ncp, and will sometimes have to temporarily unlock the target ncp
  when relocking both.  This can race against a topological removal of one
  or both ncp's, resulting in incorrect operation or a panic due to a
  NULL vp.

* Detect the case and return EAGAIN if the ncp's have been marked NCF_DESTROYED
  or if fromncp loses its vp resolution.  Callers detect the EAGAIN and retry
  the operation.

Reported-by: ftigeot
Merge branch 'master' into gsocdrm_alter