HAMMER 53B/Many: Complete overhaul of strategy code, reservations, etc
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 8 Jun 2008 18:16:26 +0000 (18:16 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 8 Jun 2008 18:16:26 +0000 (18:16 +0000)
commit0832c9bbe3f718d5923b84fddbf4848999d755f2
tree1027232a4206faf0408b0b71e2301cf5788b17f0
parente39f230b7858a7d181d06a0e43e13336e31c6413
HAMMER 53B/Many: Complete overhaul of strategy code, reservations, etc

* Completely overhaul the strategy code.  Implement direct reads and writes
  for all cases.  REMOVE THE BACKEND BIO QUEUE.  BIOs are no longer queued
  to the flusher under any circumstances.

  Remove numerous hacks that were previously emplaced to deal with BIO's
  being queued to the flusher.

* Add a mechanism to invalidate buffer cache buffers that might be shadowed
  by direct I/O.  e.g. if a strategy write uses the vnode's bio directly
  there may be a shadow hammer_buffer that will then become stale and must
  be invalidated.

* Implement a reservation tracking structure (hammer_reserve) to track
  storage reservations made by the frontend.  The backend will not attempt
  to free or reuse reserved space if it encounters it.

  Use reservations to back cached holes (struct hammer_hole) for the
  same reason.

* Index hammer_buffer on the zone-X offset instead of the zone-2 offset.
  Base the RB tree in the hammer_mount instead of (zone-2) hammer_volume.
  This removes nearly all blockmap lookup operations from the critical path.

* Do a much better job tracking cached dirty data for the purposes of
  calculating whether the filesystem will become full or not.

* Fix a critical bug in the CRC generation of short data buffers.

* Fix a VM deadlock.

* Use 16-byte alignment for all on-disk data instead of 8-byte alignment.

* Major code cleanup.

As-of this commit write performance is now extremely good.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_freemap.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c