HAMMER VFS - Better CRC handling, bad-file handling.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 29 Apr 2009 22:34:59 +0000 (15:34 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 29 Apr 2009 22:34:59 +0000 (15:34 -0700)
commit4c286c362d37391fa082d7eb6975b4519ff49d91
tree6b956c92d677916b3db6881fcebd688cb3fc35d2
parent61d392593739fdfb21afb4e2e5d6625db4b9a82e
HAMMER VFS - Better CRC handling, bad-file handling.

Data CRC errors should now generate EIO instead of panic()ing the system.
B-Tree CRC errors might still panic() and freemap CRC errors WILL still
panic().

Continuing from DDB on a B-Tree node CRC error when debugging is enabled
now no longer marks the B-Tree node as good.

The mirror-read command will now transfer data records with bad CRCs
instead of aborting the transfer, identifying them with a new type field.
The mirror-write ioctl currently ignores such records.

If a directory entry is encountered and the related inode cannot be
looked up, generate a dummy in-memory inode of type FIFO to placemark
the bad directory entry, allowing it to be removed.  Currently it is
possible for a directory entry to be synced to the media in a different
transaction then the related inode (a bug which needs to be fixed).
If a crash occurs at the wrong time the recovery code can leave the media
in a state where the directory entry exists but the inode does not.  This
change allows the bad directory entry to be removed.

Reported-by: Antonio Huete Jimenez
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_vnops.c