HAMMER 63/Many: IO Error handling features
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 18 Jul 2008 00:19:53 +0000 (00:19 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 18 Jul 2008 00:19:53 +0000 (00:19 +0000)
commitcdb6e4e646693cfea7ddde77447f9cf665cda9c0
treef770505f49fd9643fdacb64f756e9a9ae917a12a
parenta1a9228a64c0f945b693c7d788949efbe0f52fe4
HAMMER 63/Many: IO Error handling features

This commit removes all the remaining Debugger() calls and KKASSERTs in the
I/O error path.  Errors are now propagated up the call tree and properly
reported.

* Report I/O errors instead of asserting.

* Read or Write errors in the flush path disable flushing and force the mount
  into read-only mode.  Modified buffers are left locked in memory until
  umount to provide a consistent snapshot of the state of the filesystem.

  You must umount and remount to recover the filesystem.  The filesystem
  will automatically rollback to the last valid flush upon remounting.

* umount and umount -f are now able to unmount a HAMMER filesystem that has
  catastrophic write errors (e.g. pulling the USB cable on an external
  drive).
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_flusher.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_undo.c
sys/vfs/hammer/hammer_vfsops.c