HAMMER 38C/Many: Undo/Synchronization and crash recovery
commitbc163ba4211247ddc28b40caa535fd971e9feebf
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Apr 2008 21:49:49 +0000 (25 21:49 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Apr 2008 21:49:49 +0000 (25 21:49 +0000)
tree759438dd0f918a28513c39b0940422b6509eaa53
parent17630741dc53df6133e77724b23dfda15d643516
HAMMER 38C/Many: Undo/Synchronization and crash recovery

* Classify buffers as meta, undo, or data buffers, and collect them
  into separate lists so they can be flushed in the proper order.

* Make the META buffers and volume header flushed under HAMMERs direct
  control only, as part of the UNDO sequencing.

* Major work on the flusher thread.  Flush the various buffer classes in
  the correct order (the synchronization points are not yet coded, however).

* Update the volume header's UNDO fifo indices.

* Add a ton of sanity checks on buffer modifications and narrow the size
  of some of the UNDO records.

* Clean-up after loose IOs.  An IO can be loose when its ref count drops
  to zero and the kernel attempts to reclaim its bp.  We can't garbage
  collect the IO in the kernel bioops callback so we have to remember
  that the IO is now loose and do it later (in the flusher).

* Temporarily comment out an allocator iterator feature which we cannot
  do right now because it may result in new data allocations overwriting
  old deletions which are still subject to UNDO.
15 files changed:
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_freemap.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_undo.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c