xfs: support xfs_metadump with external logs

When running xfstests with an external log, the metadump tests fail
with extra output like:

    +filesystem is marked as having an external log; specify logdev on the mount command line.
    +xfs_metadump: cannot read superblock for ag 0

Add a _scratch_metadump() function to handle different logdev
configurations automatically for metadump.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Dave Chinner
2014-01-20 06:22:35 +00:00
committed by Rich Johnston
parent 5b524eedc5
commit b04b0fd675
3 changed files with 12 additions and 3 deletions
+1 -2
View File
@@ -171,8 +171,7 @@ ls -R | od -c >> $seqres.full
cd $here
_scratch_unmount
xfs_metadump -f "${SCRATCH_DEV}" "${METADUMP_FILE}"
_scratch_metadump $METADUMP_FILE
# Now restore the obfuscated one back and take a look around
xfs_mdrestore "${METADUMP_FILE}" "${SCRATCH_DEV}"
+1 -1
View File
@@ -117,7 +117,7 @@ _xfs_check $SCRATCH_DEV >> $seqres.full 2>&1 || _fail "xfs_check failed"
# Yes they can! Now...
# Can xfs_metadump cope with this monster?
xfs_metadump $SCRATCH_DEV $tmp.metadump || _fail "xfs_metadump failed"
_scratch_metadump $tmp.metadump || _fail "xfs_metadump failed"
xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed"
xfs_repair $tmp.img >> $seqres.full 2>&1 || _fail "xfs_repair of metadump failed"