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
+10
View File
@@ -317,6 +317,16 @@ _scratch_mkfs_options()
echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
}
_scratch_metadump()
{
dumpfile=$1
options=
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
options="-l $SCRATCH_LOGDEV"
xfs_metadump $options $SCRATCH_DEV $dumpfile
}
_setup_large_xfs_fs()
{