hammer2 - general stabilization, flusher, mmap, etc
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 19 May 2012 00:19:17 +0000 (17:19 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 19 May 2012 00:35:39 +0000 (17:35 -0700)
commit004f88b45de50f4b39b539be43b90529b027b4e5
tree24a1f27b48d6c76348f44b0ef00e6c9e7e223d2b
parentc3a4b1ee1ade61e6b2a20d6635ec6aebcfb112ae
hammer2 - general stabilization, flusher, mmap, etc

* Revamp the flush logic.  Flushes now stage the blockref related to the
  data written out to the media.  Higher level chains save the staged
  blockref instead of the current blockref.

* This allows flushes to occur concurrent with active modification of the
  topology without having to restart the flush.  Modifications made after
  the flush has started running will remain intact and not be committed
  to media until the next flush (see note).

  NOTE: Currently chain deletions break this, but this is the only issue
  currently.

* Fix lost chains during unmount.  Deleted chains can still have the MOVED
  and/or MODIFIED bits set, which add additional refs and prevents them
  from being freed.

  Detect when a chain is being deleted permanently (verses temporarily due
  to a rename) and clean out the bits in question.

  NOTE: Currently deletions are removed from the in-memory topology, which
is why the previous NOTE above is still a problem, so we will need
to fix this and to retain at least the MOVED for flushes in
progress.

* Fix data corruption related to unflagged chains which wind up not getting
  flushed and also due to a bug in the indirect block management code.

* Fix a mmap() access failure for cached direct-data (less than 512 bytes).
  nvextendbuf() was not being called for the direct-data case during the
  write().

* Buildworld with a HAMMER2 /usr/obj now succeeds.

* 'hammer2 pfs-create <label>' now defaults to a pfstype of MASTER,
  instead of requiring that the pfstype always be specified.
sbin/hammer2/cmd_pfs.c
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_subr.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_vnops.c