xfs: verify AGFL blocks as they are read from disk
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Nov 2012 11:54:06 +0000 (22:54 +1100)
committerBen Myers <bpm@sgi.com>
Fri, 16 Nov 2012 03:34:14 +0000 (21:34 -0600)
commitbb80c6d79a3b0f9b6c3236a4bec021c72615bfd1
tree0ec09465d786ed816c1ab6c9179723ae525366f2
parent3702ce6ed71cd60451ab278088863456dcb0dd99
xfs: verify AGFL blocks as they are read from disk

Add an AGFL block verify callback function and pass it into the
buffer read functions.

While this commit adds verification code to the AGFL, it cannot be
used reliably until the CRC format change comes along as mkfs does
not initialise the full AGFL. Hence it can be full of garbage at the
first mount and will fail verification right now. CRC enabled
filesystems won't have this problem, so leave the code that has
already been written ifdef'd out until the proper time.

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_alloc.c