2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
7 # Test upgrading the XFS log to v2
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
29 # real QA test starts here
31 # Modify as appropriate.
37 if [ "$(blockdev --getss $SCRATCH_DEV)" != "512" ]; then
38 _notrun "need 512b sector size"
41 export MOUNT_OPTIONS="-o logbsize=64k"
43 # try and mount a v1 log with a v2 LRsize
45 _mkfs_log "-l version=1 -m crc=0 -d sectsize=512"
46 _scratch_xfs_db -c 'version' | tr ',' '\n' | grep LOGV2
49 # now make the fs a v2 fs and try to mount again
50 # it should succeed this time
51 _scratch_xfs_db -x -c 'version log2' | tr ',' '\n' | grep LOGV2