hammer - Avoid panic in particular corruption situations
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 11 May 2015 02:51:18 +0000 (19:51 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 11 May 2015 02:51:18 +0000 (19:51 -0700)
commitb961cdbbbbbccb4f672f697f45bfdd5befcaf3f6
treed77c6356e2686d52020838587f90586b752b611f
parent979fcbd650ee90c8e1b2285833c5dc117ff53777
hammer - Avoid panic in particular corruption situations

This commit fixes two panics which can arise from attempting to access a
corrupted filesystem.  It does not fix the issue that led to the corruption
in the first place (which we believe might have been GPU-related random
memory corruption on a particular machine).  It allows the filesystem to
continue to operate so it can be spooled off and reformatted.

* Do not panic on a NULL pointer dereference if a cursor iteration
  fails due to corruption.

* Do not panic during a flush on a sequence space error if the filesystem
  has been forced into read-only mode (which prevents older sequence spaces
  from being flushed).

Reported-by: Sephe
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_flusher.c