xfs: verify dir2 block format buffers
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Nov 2012 11:54:12 +0000 (22:54 +1100)
committerBen Myers <bpm@sgi.com>
Fri, 16 Nov 2012 03:34:41 +0000 (21:34 -0600)
commit82025d7f79148fe66a1594a0ebe4ab38152cf9e6
treefb47428d6604ebb5f941d3f8c58e1de9d54a4b59
parent20f7e9f3726a27cccade65c28265eef8ca50eecb
xfs: verify dir2 block format buffers

Add a dir2 block format read verifier. To fully verify every block
when read, call xfs_dir2_data_check() on them. Change
xfs_dir2_data_check() to do runtime checking, convert ASSERT()
checks to XFS_WANT_CORRUPTED_RETURN(), which will trigger an ASSERT
failure on debug kernels, but on production kernels will dump an
error to dmesg and return EFSCORRUPTED to the caller.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dir2_block.c
fs/xfs/xfs_dir2_data.c
fs/xfs/xfs_dir2_priv.h