hammer2 - Implement crash recovery, cleanups, stabilization
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 14 Nov 2013 04:23:02 +0000 (20:23 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 14 Nov 2013 04:23:02 +0000 (20:23 -0800)
commit10136ab6cde1969ab6ca22168b2a10ed5d9cc557
treed8c7ee8507830bb5ccf17c2bf601b421ae0e0ff0
parenta8e6840433fdc0aad2b0b8b58429ed1f29f848dd
hammer2 - Implement crash recovery, cleanups, stabilization

* Allocations which are made by the flush itself run in the next
  transaction instead of the current transaction.  We do this so the
  flush code can flush a stable version of the freemap itself.

* Implement crash recovery.  Due to the above mechanics an incremental
  scan must be run at mount-time of all chains belonging to the last
  transaction and ensure that the blocks are marked allocated in the
  freemap.  Since the scan is incremental this doesn't take very long.

* Add some chain API infrastructure to support the incremental scan.

* Allow transactions to operate on a single media mount point (hmp)
  (verses a pfsmount (pmp)).  Used by the recovery code.

* Take another pass on the flush algorithm, fixing a few bugs.  The
  filter is still pretty fragile unfortunately.  Having to special-case
  the root chains (hmp->vchain and hmp->fchain) is causing problems.

  Add debugging to help figure out an assertion that still occurs.
sbin/hammer2/cmd_debug.c
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c