xfs: verify superblocks as they are read from disk
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Nov 2012 11:54:03 +0000 (22:54 +1100)
committerBen Myers <bpm@sgi.com>
Fri, 16 Nov 2012 03:34:07 +0000 (21:34 -0600)
commit98021821a502db347bd9c7671beeee6e8ce07ea6
tree1cfb76746a51e6713ff4ba2842ed55c90c4b063b
parenteab4e63368b4cfa597dbdac66d1a7a836a693b7d
xfs: verify superblocks as they are read from disk

Add a superblock verify callback function and pass it into the
buffer read functions. Remove the now redundant verification code
that is currently in use.

Adding verification shows that secondary superblocks never have
their "sb_inprogress" flag cleared by mkfs.xfs, so when validating
the secondary superblocks during a grow operation we have to avoid
checking this field. Even if we fix mkfs, we will still have to
ignore this field for verification purposes unless a version of mkfs
that does not have this bug was used.

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_fsops.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h