]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4737e940ef099ce9af1a11885583c7e527515d82
tree1cfb76746a51e6713ff4ba2842ed55c90c4b063b
parentc39f03c95ed14b70d95d15ba7eccda7cc902e2b2
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