tests: port xfs/095 to Linux

This tests upgrading the XFS log to v2.  Switch from the IRIX xfs_chver
program to xfs_db.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Eric Biggers
2017-07-20 21:22:04 -07:00
committed by Eryu Guan
parent 74d977646c
commit 3c64e7819a
2 changed files with 6 additions and 8 deletions
+5 -6
View File
@@ -1,7 +1,7 @@
#! /bin/bash #! /bin/bash
# FS QA Test No. 095 # FS QA Test No. 095
# #
# test out xfs_chver on IRIX # Test upgrading the XFS log to v2
# #
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
@@ -46,7 +46,7 @@ _cleanup()
# Modify as appropriate. # Modify as appropriate.
_supported_fs xfs _supported_fs xfs
_supported_os IRIX _supported_os Linux
_require_scratch _require_scratch
_require_v2log _require_v2log
@@ -54,14 +54,13 @@ export MOUNT_OPTIONS="-o logbsize=64k"
# try and mount a v1 log with a v2 LRsize # try and mount a v1 log with a v2 LRsize
# expect failure # expect failure
_mkfs_log "-l version=1" _mkfs_log "-l version=1 -m crc=0 -d sectsize=512"
_scratch_xfs_db -c 'version' | tr ',' '\n' | grep LOGV2
_create_log _create_log
# now make the fs a v2 fs and try to mount again # now make the fs a v2 fs and try to mount again
# it should succeed this time # it should succeed this time
xfs_chver -l 2 $SCRATCH_DEV | \ _scratch_xfs_db -x -c 'version log2' | tr ',' '\n' | grep LOGV2
sed -e "s#$SCRATCH_DEV#SCRATCH_DEV#g" \
-e 's/[0-9][0-9]* AGs/N AGs/'
_create_log _create_log
# success, all done # success, all done
+1 -2
View File
@@ -2,5 +2,4 @@ QA output created by 095
*** mount failed: -o logbsize=64k *** *** mount failed: -o logbsize=64k ***
xfs_chver: SCRATCH_DEV: changing version 0x3084 to 0x3484 in N AGs LOGV2
xfs_chver: SCRATCH_DEV: changing feature2 0x0 to 0x0 in N AGs