From: Christoph Hellwig Date: Sat, 21 Mar 2009 20:04:13 +0000 (+0100) Subject: xfstests: a couple of fixes for external logs X-Git-Tag: v1.1.0~314^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2370bb6d22cb0d8b1ab149497e1e26204d8650ed;p=xfstests-dev.git xfstests: a couple of fixes for external logs Fix a couple of issues when running xfsqa with external logs: - update the 096 golden output for the external log case - add a new _scratch_xfs_check similar to _scratch_xfs_logprint and _scratch_xfs_repair that take the log device into account and use it in test 134 - use _scratch_xfs_repair in test 202 to fix it for external log devices Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen --- diff --git a/017 b/017 index 18bf4707..74dbe1c1 100755 --- a/017 +++ b/017 @@ -67,7 +67,7 @@ do echo "" >>$seq.full echo "*** XFS_CHECK ***" >>$seq.full echo "" >>$seq.full - xfs_check $checkopts $SCRATCH_DEV >>$seq.full 2>&1 \ + _scratch_xfs_check $checkopts >>$seq.full 2>&1 \ || _fail "xfs_check $checkopts failed" _scratch_mount -o remount,rw \ || _fail "remount rw failed" diff --git a/096.external b/096.external index 7d68373f..ef942e35 100644 --- a/096.external +++ b/096.external @@ -30,7 +30,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N # test out data stripe ---- mkfs=-d su=266240,sw=1 --- +--- mkfs=-l version=1 -d su=266240,sw=1 --- meta-data=DEV isize=256 agcount=N, agsize=N blks data = bsize=4096 blocks=N, imaxpct=25 = sunit=65 swidth=65 blks, unwritten=1 @@ -41,7 +41,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N # test out data stripe the same but using sunit & swidth ---- mkfs=-d sunit=520,swidth=520 --- +--- mkfs=-l version=1 -d sunit=520,swidth=520 --- meta-data=DEV isize=256 agcount=N, agsize=N blks data = bsize=4096 blocks=N, imaxpct=25 = sunit=65 swidth=65 blks, unwritten=1 diff --git a/202 b/202 index 1eab256a..d783c181 100644 --- a/202 +++ b/202 @@ -20,6 +20,7 @@ status=1 # failure is the default! # get standard environment, filters and checks . ./common.rc . ./common.filter +. ./common.repair # real QA test starts here _supported_fs xfs @@ -31,10 +32,10 @@ echo "== Creating single-AG filesystem ==" _scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1 echo "== Trying to repair it (should fail) ==" -xfs_repair $SCRATCH_DEV +_scratch_xfs_repair echo "== Trying to repair it with -o force_geometry ==" -xfs_repair -o force_geometry $SCRATCH_DEV +_scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair # success, all done echo "*** done" diff --git a/202.out b/202.out index f79ce716..c2c5c881 100644 --- a/202.out +++ b/202.out @@ -6,19 +6,17 @@ Only one AG detected - cannot validate filesystem geometry. Use the -o force_geometry option to proceed. == Trying to repair it with -o force_geometry == Phase 1 - find and verify superblock... -Phase 2 - using internal log +Phase 2 - using log - zero log... - scan filesystem freespace and inode maps... - found root inode chunk Phase 3 - for each AG... - scan and clear agi unlinked lists... - process known inodes and perform inode discovery... - - agno = 0 - process newly discovered inodes... Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - - agno = 0 Phase 5 - rebuild AG headers and trees... - reset superblock... Phase 6 - check inode connectivity... diff --git a/common.rc b/common.rc index a51ac709..7b6ca0d0 100644 --- a/common.rc +++ b/common.rc @@ -268,6 +268,14 @@ _scratch_xfs_logprint() $XFS_LOGPRINT_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV } +_scratch_xfs_check() +{ + SCRATCH_OPTIONS="" + [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ + SCRATCH_OPTIONS="-l $SCRATCH_LOGDEV" + $XFS_CHECK_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV +} + _scratch_xfs_repair() { SCRATCH_OPTIONS=""