HAMMER 59B/Many: Stabilization pass - fixes for large file issues
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 27 Jun 2008 20:56:59 +0000 (20:56 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 27 Jun 2008 20:56:59 +0000 (20:56 +0000)
commit06ad81ff2e9f46e09ccd4ed99c75974f053b6c09
treecb1f047e9e5f5d5ca128eb428919a64d8e8f9541
parent53f1d0174be9d7463c9525c394cdcbef67449ed2
HAMMER 59B/Many: Stabilization pass - fixes for large file issues

* The flusher was trying to flush whole inodes in one pass.  If a large
  (in the 100GB range) file is deleted or truncated this single pass could
  blow out the UNDO FIFO and cause a panic.

  Detect the case and only do a partial flush, then requeue the inode to
  the next flush group and reflush.  This continues until the file is
  completely eradicated or the truncation has completed.

* In addition, the same flusher issue could exhaust the kernel's buffer
  cache with unflushable dirty buffers.  The same fix applies.

* The UNDO FIFO code was calculating available space based on the next
  flush's start position instead of the last flush's start position,
  allowing areas of the UNDO FIFO still subject to a recovery pass
  (if a crash were to occur right then) to be overwritten too soon.

* The pruner and reblocker were doing insufficient UNDO FIFO space checks
  and could blow out the UNDO FIFO.  Fixed.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_prune.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_undo.c
sys/vfs/hammer/hammer_vfsops.c