HAMMER 38C/Many: Undo/Synchronization and crash recovery
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Apr 2008 21:49:49 +0000 (21:49 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Apr 2008 21:49:49 +0000 (21:49 +0000)
commit10a5d1ba1fb5faaa67ccb08651ff39f1208a4a82
tree3c7fe70df7aa526a53d7c78099d5ef4ef39930e8
parent1955afa7b6b308c92dc2b033f419f16752060a41
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