Re: [PATCH 09/25] xfs: verify inode buffers as they are read from disk

Phil White
2012-10-30T17:56:17Z

On Thu, Oct 25, 2012 at 05:33:58PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Add an inode buffer verify callback function and pass it into the
> buffer read functions. Inodes are special in that the verbose checks
> will be done when reading the inode, but we still need to sanity
> check the buffer when that is first read. Always verify the magic
> numbers in all inodes in the buffer, rather than jus ton debug
> kernels.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> fs/xfs/xfs_inode.c | 100 +++++++++++++++++++++++++++-------------------------
> 1 file changed, 51 insertions(+), 49 deletions(-)

Hunky dory as it's essentially just lifting the same code into a
function. I wonder a bit if all those checks are strictly necessary vs.
simply being belt-and-suspenders safe, but that thought's not related to
your patch.

Reviewed-by: Phil White <pwhite@sgi.com>