* [PATCH 0/4] fstests: xfs utility output has changed.
@ 2015-05-04 22:01 Dave Chinner
2015-05-04 22:01 ` [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise Dave Chinner
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Dave Chinner @ 2015-05-04 22:01 UTC (permalink / raw)
To: fstests
Hi folks,
Recent updates to mkfs.xfs and xfs_repair have made them more
verbose about certain conditions, making tests fail as the error
verbosity is not masked from the tests. The first three patches in
this series address those changes.
The final patch in the series addresses the fallout from the pending
mkfs.xfs patch that changes the default to make v5 (CRC enabled)
filesystems. This causes lots more failures, because there are many
tests that use filesystem configurations that are only valid for V4
filesystems (e.g. 256 byte inodes, v1 logs, etc). This patch fixes
most of the issues arising from changing the mkfs default.
-Dave.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise
2015-05-04 22:01 [PATCH 0/4] fstests: xfs utility output has changed Dave Chinner
@ 2015-05-04 22:01 ` Dave Chinner
2015-05-04 22:45 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 2/4] filter: latest xfs_repair is more verbose Dave Chinner
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2015-05-04 22:01 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
On devices that have a logical sector smaller than physical sector,
this extra, harmless output now occurs:
QA output created by 060
+specified blocksize 1024 is less than device physical sector size 4096
+switching to logical sector size 512
Creating directory system to dump using src/fill.
Setup .......................................
Dumping to files...
And it causes lots of tests to fail unnecessarily. Filter it.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common/rc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index 6ea107e..242dedb 100644
--- a/common/rc
+++ b/common/rc
@@ -365,9 +365,12 @@ _scratch_mkfs_xfs()
mkfs_status=$?
fi
- # output stored mkfs output
- cat $tmp_dir.mkfserr >&2
+ # output stored mkfs output, filtering unnecessary warnings from stderr
cat $tmp_dir.mkfsstd
+ cat $tmp_dir.mkfserr | sed \
+ -e '/less than device physical sector/d' \
+ -e '/switching to logical sector/d' \
+ >&2
rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
return $mkfs_status
--
2.0.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/4] filter: latest xfs_repair is more verbose
2015-05-04 22:01 [PATCH 0/4] fstests: xfs utility output has changed Dave Chinner
2015-05-04 22:01 ` [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise Dave Chinner
@ 2015-05-04 22:01 ` Dave Chinner
2015-05-04 22:46 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems Dave Chinner
2015-05-04 22:01 ` [PATCH 4/4] filter: inode size output of mkfs.xfs can change Dave Chinner
3 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2015-05-04 22:01 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
It detects more errors, so we need to filter them out to prevent
golden image mismatches on successful recovery.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common/repair | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/repair b/common/repair
index 7a99546..ce6d258 100644
--- a/common/repair
+++ b/common/repair
@@ -83,6 +83,7 @@ s/\s+- \d+:\d\d:\d\d:.*\n//g;
/^Metadata corruption detected/ && next;
/^Metadata CRC error detected/ && next;
/^agfl has bad CRC/ && next;
+/^bad CRC for inode/ && next;
# finobt enabled filesystem output
s/(inode chunk) (\d+)\/(\d+)/AGNO\/INO/;
# sunit/swidth reset messages
--
2.0.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems.
2015-05-04 22:01 [PATCH 0/4] fstests: xfs utility output has changed Dave Chinner
2015-05-04 22:01 ` [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise Dave Chinner
2015-05-04 22:01 ` [PATCH 2/4] filter: latest xfs_repair is more verbose Dave Chinner
@ 2015-05-04 22:01 ` Dave Chinner
2015-05-04 22:48 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 4/4] filter: inode size output of mkfs.xfs can change Dave Chinner
3 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2015-05-04 22:01 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
So pass "-m crc=0" to the scratch_mkfs command so that we only run
on old v4 format filesystems where the UUID can be changed.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tests/xfs/045 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xfs/045 b/tests/xfs/045
index 7d8a4a1..2f5508f 100755
--- a/tests/xfs/045
+++ b/tests/xfs/045
@@ -50,7 +50,7 @@ _require_scratch_nocheck
echo "*** get uuid"
uuid=`_get_existing_uuid`
echo "*** mkfs"
-if ! _scratch_mkfs_xfs >$tmp.out 2>&1
+if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV"
--
2.0.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-04 22:01 [PATCH 0/4] fstests: xfs utility output has changed Dave Chinner
` (2 preceding siblings ...)
2015-05-04 22:01 ` [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems Dave Chinner
@ 2015-05-04 22:01 ` Dave Chinner
2015-05-05 2:06 ` Eric Sandeen
2015-05-06 7:19 ` Eryu Guan
3 siblings, 2 replies; 15+ messages in thread
From: Dave Chinner @ 2015-05-04 22:01 UTC (permalink / raw)
To: fstests
From: Dave Chinner <dchinner@redhat.com>
With the change to CRCs by default, the mkfs inode size is defaults
to 512 bytes and the minimum block size changes to 1024 bytes. This
causes mismatches with golden output that expects the inode size to
be 256 bytes, and some tests are tailored around the amount of space
inside a 256 byte inode. Fix them with appropriate filtering or mkfs
parameters to allow 256 byte inodes to be used.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tests/xfs/073 | 4 ++--
tests/xfs/096 | 6 +++---
tests/xfs/096.external | 12 ++++++------
tests/xfs/096.internal | 12 ++++++------
tests/xfs/187 | 4 ++--
tests/xfs/194 | 4 +++-
tests/xfs/199 | 2 +-
tests/xfs/206 | 10 ++++++----
tests/xfs/206.out | 12 ++++++------
tests/xfs/259 | 21 ++++++++++++++++++---
tests/xfs/292 | 4 ++--
tests/xfs/292.out | 2 --
tests/xfs/300 | 3 ++-
13 files changed, 57 insertions(+), 39 deletions(-)
diff --git a/tests/xfs/073 b/tests/xfs/073
index 07fc71b..45a3fdf 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -136,7 +136,7 @@ _require_loop
rm -f $seqres.full
-_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
_scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
echo
@@ -156,7 +156,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
echo
echo === copying scratch device to single target, large ro device
-${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
+${MKFS_XFS_PROG} -m crc=0 -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
rmdir $imgs.source_dir 2>/dev/null
mkdir $imgs.source_dir
diff --git a/tests/xfs/096 b/tests/xfs/096
index 2da8fa1..c289c10 100755
--- a/tests/xfs/096
+++ b/tests/xfs/096
@@ -77,7 +77,7 @@ mkfs_filter()
-e 's/swidth=[0-9][0-9]* blks$/&, unwritten=1/' \
-e 's/rtextents=[0-9][0-9]*/rtextents=N/' \
-e 's/meta-data=[^ ]*/meta-data=DEV/' \
- -e 's/ *isize/ isize/' \
+ -e 's/ *isize=[0-9]* / isize=N /' \
-e '/ *= *sectsz=[0-9][0-9]* *attr=[0-9][0-9]*.*$/d' \
-e '/ *= *mmr=[0-9][0-9]* *$/d' \
-e 's/ *mixed-case=[YN]//' \
@@ -130,9 +130,9 @@ cat >$tmp.seq.params <<EOF
# same test but get log stripe from data stripe
-l version=2 -d su=$big_su,sw=1
# test out data stripe
- -l version=1 -d su=$big_su,sw=1
+ -m crc=0 -l version=1 -d su=$big_su,sw=1
# test out data stripe the same but using sunit & swidth
- -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
+ -m crc=0 -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
EOF
#
diff --git a/tests/xfs/096.external b/tests/xfs/096.external
index 7923340..3122330 100644
--- a/tests/xfs/096.external
+++ b/tests/xfs/096.external
@@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
# test log stripe greater than LR size
--- mkfs=-l version=2,su=266240 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
@@ -17,7 +17,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# same test but get log stripe from data stripe
--- mkfs=-l version=2 -d su=266240,sw=1 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
@@ -27,8 +27,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# test out data stripe
---- mkfs=-l version=1 -d su=266240,sw=1 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
@@ -38,8 +38,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# test out data stripe the same but using sunit & swidth
---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
diff --git a/tests/xfs/096.internal b/tests/xfs/096.internal
index eaba13f..80201d2 100644
--- a/tests/xfs/096.internal
+++ b/tests/xfs/096.internal
@@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
# test log stripe greater than LR size
--- mkfs=-l version=2,su=266240 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
@@ -18,7 +18,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# same test but get log stripe from data stripe
--- mkfs=-l version=2 -d su=266240,sw=1 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
@@ -28,8 +28,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# test out data stripe
---- mkfs=-l version=1 -d su=266240,sw=1 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
@@ -39,8 +39,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
# test out data stripe the same but using sunit & swidth
---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
-meta-data=DEV isize=256 agcount=N, agsize=N blks
+--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
+meta-data=DEV isize=N agcount=N, agsize=N blks
data = bsize=4096 blocks=N, imaxpct=N
= sunit=65 swidth=65 blks, unwritten=1
naming =version 2 bsize=4096
diff --git a/tests/xfs/187 b/tests/xfs/187
index 700ab04..836b924 100755
--- a/tests/xfs/187
+++ b/tests/xfs/187
@@ -70,8 +70,8 @@ export MOUNT_OPTIONS=""
# lazysb, attr2 and other feature bits are held in features2 and will require
# morebitsbit on So test with lazysb and without it to see if the morebitsbit is
# okay etc. If the mkfs defaults change, these need to change as well.
-export MKFS_NO_LAZY="-l lazy-count=0 -i projid32bit=0"
-export MKFS_LAZY="-l lazy-count=1 -i projid32bit=0"
+export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
+export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
# Make sure that when we think we are testing with morebits off
# that we really are.
diff --git a/tests/xfs/194 b/tests/xfs/194
index f56702a..e11b459 100755
--- a/tests/xfs/194
+++ b/tests/xfs/194
@@ -83,7 +83,9 @@ _filter_od()
_require_scratch
unset MKFS_OPTIONS
unset XFS_MKFS_OPTIONS
-_scratch_mkfs_xfs -b size=$blksize >/dev/null 2>&1
+
+# we need 512 byte block size, so crc's are turned off
+_scratch_mkfs_xfs -m crc=0 -b size=$blksize >/dev/null 2>&1
_scratch_mount
# 512b block / 4k page example:
diff --git a/tests/xfs/199 b/tests/xfs/199
index c1b5962..0eef88b 100755
--- a/tests/xfs/199
+++ b/tests/xfs/199
@@ -52,7 +52,7 @@ _require_scratch
# clear any mkfs options so taht we can directly specify the options we need to
# be able to test the features bitmask behaviour correctly.
MKFS_OPTIONS=
-_scratch_mkfs_xfs -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
+_scratch_mkfs_xfs -m crc=0 -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
#
# Print the current flags. Just a dummy so that the test breaks
diff --git a/tests/xfs/206 b/tests/xfs/206
index 198e413..0f5d97d 100755
--- a/tests/xfs/206
+++ b/tests/xfs/206
@@ -75,19 +75,21 @@ dd if=/dev/zero of=$tmpfile bs=1 seek=19998630180864 count=1 >/dev/null 2>&1 \
mkfs_filter()
{
- sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
+ sed -e 's/meta-data=[^ ]*/meta-data=FILE/' \
+ -e 's/ *isize=[0-9]* / isize=N /' \
-e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
-e "s/, projid32bit=[0-9]//" \
-e "s/ ftype=[0-9]//" \
-e "s/\(sectsz\)\(=[0-9]* *\)/\1=512 /" \
-e "s/\(sunit=\)\([0-9]* blks,\)/\10 blks,/" \
+ -e "s/, lazy-count=[0-9]//" \
-e "/.*crc=/d"
}
-# mkfs slightly smaller than that
+# mkfs slightly smaller than that, small log for speed.
echo "=== mkfs.xfs ==="
-mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b \
- -llazy-count=0 $tmpfile | mkfs_filter
+mkfs.xfs -f -bsize=4096 -l size=32m -dagsize=76288719b,size=3905982455b \
+ $tmpfile | mkfs_filter
mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
diff --git a/tests/xfs/206.out b/tests/xfs/206.out
index da70d01..2db839d 100644
--- a/tests/xfs/206.out
+++ b/tests/xfs/206.out
@@ -1,30 +1,30 @@
QA output created by 206
=== truncate file ===
=== mkfs.xfs ===
-meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
+meta-data=FILE isize=N agcount=52, agsize=76288719 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=3905982455, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=XXXXX, version=2
- = sectsz=512 sunit=0 blks, lazy-count=0
+ = sectsz=512 sunit=0 blks
realtime =none extsz=4096 blocks=0, rtextents=0
=== xfs_growfs ===
-meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
+meta-data=FILE isize=N agcount=52, agsize=76288719 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=3905982455, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=XXXXX, version=2
- = sectsz=512 sunit=0 blks, lazy-count=0
+ = sectsz=512 sunit=0 blks
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 3905982455 to 4882478016
=== xfs_info ===
-meta-data=FILE isize=256 agcount=64, agsize=76288719 blks
+meta-data=FILE isize=N agcount=64, agsize=76288719 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=4882478016, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=XXXXX, version=2
- = sectsz=512 sunit=0 blks, lazy-count=0
+ = sectsz=512 sunit=0 blks
realtime =none extsz=4096 blocks=0, rtextents=0
diff --git a/tests/xfs/259 b/tests/xfs/259
index 6587a65..16c1935 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -37,6 +37,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common/rc
+. ./common/filter
# real QA test starts here
_supported_fs xfs
@@ -47,9 +48,22 @@ _require_math
testfile=$TEST_DIR/259.image
-# Test various sizes slightly less than 4 TB
+# Test various sizes slightly less than 4 TB. Need to handle different
+# minimum block sizes for CRC enabled filesystems, but use a small log so we
+# don't write lots of zeros unnecessarily.
+xfs_info $TEST_DIR | _filter_mkfs 2> $tmp.mkfs > /dev/null
+. $tmp.mkfs
+if [ $_fs_has_crcs -eq 1 ]; then
+ blocksize=1024
+ sizes_to_check="1024 2048 4096"
+ echo "Trying to make (4 TB - 512) B long xfs fs image"
+else
+ blocksize=512
+ sizes_to_check="512 1024 2048 4096"
+fi
+
four_TB=$(_math "2^42")
-for del in 512 1024 2048 4096; do
+for del in $sizes_to_check; do
ddseek=$(_math "$four_TB - $del")
echo "Trying to make (4 TB - $del) B long xfs fs image"
rm -f "$testfile"
@@ -57,7 +71,8 @@ for del in 512 1024 2048 4096; do
>/dev/null 2>&1 || echo "dd failed"
lofile=$(losetup -f)
losetup $lofile "$testfile"
- "$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
+ "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \
+ >/dev/null || echo "mkfs failed!"
sync
losetup -d $lofile
done
diff --git a/tests/xfs/292 b/tests/xfs/292
index a476d91..db890b5 100755
--- a/tests/xfs/292
+++ b/tests/xfs/292
@@ -55,12 +55,12 @@ $XFS_IO_PROG -f -c "truncate 256g" $fsfile
echo "mkfs.xfs without geometry"
mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
-grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
+grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
sed -e "s:$fsfile:FILENAME:g"
echo "mkfs.xfs with cmdline geometry"
mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
-grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
+grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
sed -e "s:$fsfile:FILENAME:g"
rm -f $fsfile
diff --git a/tests/xfs/292.out b/tests/xfs/292.out
index 2837d74..1d69507 100644
--- a/tests/xfs/292.out
+++ b/tests/xfs/292.out
@@ -1,11 +1,9 @@
QA output created by 292
mkfs.xfs without geometry
ddev=FILENAME
-isize=256
agcount=4
agsize=16777216
mkfs.xfs with cmdline geometry
ddev=FILENAME
-isize=256
agcount=16
agsize=4194304
diff --git a/tests/xfs/300 b/tests/xfs/300
index db83fd4..9489cbe 100755
--- a/tests/xfs/300
+++ b/tests/xfs/300
@@ -51,7 +51,8 @@ getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled"
rm -f $seqres.full
-_scratch_mkfs_xfs -i size=256 >> $seqres.full 2>&1 || _fail "mkfs failed"
+_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 \
+ || _fail "mkfs failed"
# Manually mount to avoid fs-wide context set by default in xfstests
mount $SCRATCH_DEV $SCRATCH_MNT
--
2.0.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise
2015-05-04 22:01 ` [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise Dave Chinner
@ 2015-05-04 22:45 ` Eric Sandeen
0 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2015-05-04 22:45 UTC (permalink / raw)
To: Dave Chinner, fstests
On 5/4/15 5:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> On devices that have a logical sector smaller than physical sector,
> this extra, harmless output now occurs:
>
> QA output created by 060
> +specified blocksize 1024 is less than device physical sector size 4096
> +switching to logical sector size 512
> Creating directory system to dump using src/fill.
> Setup .......................................
> Dumping to files...
>
> And it causes lots of tests to fail unnecessarily. Filter it.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
But should we just remove that from mkfs output? It's probably my fault,
but looking at it now, it seems like unnecessary noise.
-Eric
> ---
> common/rc | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 6ea107e..242dedb 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -365,9 +365,12 @@ _scratch_mkfs_xfs()
> mkfs_status=$?
> fi
>
> - # output stored mkfs output
> - cat $tmp_dir.mkfserr >&2
> + # output stored mkfs output, filtering unnecessary warnings from stderr
> cat $tmp_dir.mkfsstd
> + cat $tmp_dir.mkfserr | sed \
> + -e '/less than device physical sector/d' \
> + -e '/switching to logical sector/d' \
> + >&2
> rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
>
> return $mkfs_status
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/4] filter: latest xfs_repair is more verbose
2015-05-04 22:01 ` [PATCH 2/4] filter: latest xfs_repair is more verbose Dave Chinner
@ 2015-05-04 22:46 ` Eric Sandeen
0 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2015-05-04 22:46 UTC (permalink / raw)
To: Dave Chinner, fstests
On 5/4/15 5:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> It detects more errors, so we need to filter them out to prevent
> golden image mismatches on successful recovery.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> common/repair | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/repair b/common/repair
> index 7a99546..ce6d258 100644
> --- a/common/repair
> +++ b/common/repair
> @@ -83,6 +83,7 @@ s/\s+- \d+:\d\d:\d\d:.*\n//g;
> /^Metadata corruption detected/ && next;
> /^Metadata CRC error detected/ && next;
> /^agfl has bad CRC/ && next;
> +/^bad CRC for inode/ && next;
> # finobt enabled filesystem output
> s/(inode chunk) (\d+)\/(\d+)/AGNO\/INO/;
> # sunit/swidth reset messages
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems.
2015-05-04 22:01 ` [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems Dave Chinner
@ 2015-05-04 22:48 ` Eric Sandeen
2015-05-05 0:51 ` Dave Chinner
0 siblings, 1 reply; 15+ messages in thread
From: Eric Sandeen @ 2015-05-04 22:48 UTC (permalink / raw)
To: Dave Chinner, fstests
On 5/4/15 5:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> So pass "-m crc=0" to the scratch_mkfs command so that we only run
> on old v4 format filesystems where the UUID can be changed.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
hm, given that I might "fix" this should we instead trap
on an xfs_db uuid failure, and _notrun the test?
(oh, but older xfs_db let it go, didn't it. sigh).
I guess nothing about the presence of crc vs. non-crc
matters for this test, so turning it off by default is probably ok.
It could use a comment about why it's got "-m crc=0" though, at
least.
-Eric
> ---
> tests/xfs/045 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/xfs/045 b/tests/xfs/045
> index 7d8a4a1..2f5508f 100755
> --- a/tests/xfs/045
> +++ b/tests/xfs/045
> @@ -50,7 +50,7 @@ _require_scratch_nocheck
> echo "*** get uuid"
> uuid=`_get_existing_uuid`
> echo "*** mkfs"
> -if ! _scratch_mkfs_xfs >$tmp.out 2>&1
> +if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
> then
> cat $tmp.out
> echo "!!! failed to mkfs on $SCRATCH_DEV"
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems.
2015-05-04 22:48 ` Eric Sandeen
@ 2015-05-05 0:51 ` Dave Chinner
2015-05-05 2:04 ` Eric Sandeen
0 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2015-05-05 0:51 UTC (permalink / raw)
To: Eric Sandeen; +Cc: fstests
On Mon, May 04, 2015 at 05:48:31PM -0500, Eric Sandeen wrote:
> On 5/4/15 5:01 PM, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > So pass "-m crc=0" to the scratch_mkfs command so that we only run
> > on old v4 format filesystems where the UUID can be changed.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
>
> hm, given that I might "fix" this should we instead trap
> on an xfs_db uuid failure, and _notrun the test?
> (oh, but older xfs_db let it go, didn't it. sigh).
>
> I guess nothing about the presence of crc vs. non-crc
> matters for this test, so turning it off by default is probably ok.
> It could use a comment about why it's got "-m crc=0" though, at
> least.
Added. New patch below.
--
Dave Chinner
david@fromorbit.com
xfs/045: can't change UUID on v5 filesystems.
From: Dave Chinner <dchinner@redhat.com>
So pass "-m crc=0" to the scratch_mkfs command so that we only run
on old v4 format filesystems where the UUID can be changed.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
V2: added comment explaining "-m crc=0".
tests/xfs/045 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/045 b/tests/xfs/045
index 7d8a4a1..2733f5c 100755
--- a/tests/xfs/045
+++ b/tests/xfs/045
@@ -49,8 +49,11 @@ _require_scratch_nocheck
echo "*** get uuid"
uuid=`_get_existing_uuid`
+
+# We can only change the UUID on a v4 filesystem. Revist this when/if UUIDs
+# can be changed on v5 filesystems.
echo "*** mkfs"
-if ! _scratch_mkfs_xfs >$tmp.out 2>&1
+if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV"
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems.
2015-05-05 0:51 ` Dave Chinner
@ 2015-05-05 2:04 ` Eric Sandeen
0 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2015-05-05 2:04 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests
On 5/4/15 7:51 PM, Dave Chinner wrote:
> On Mon, May 04, 2015 at 05:48:31PM -0500, Eric Sandeen wrote:
>> On 5/4/15 5:01 PM, Dave Chinner wrote:
>>> From: Dave Chinner <dchinner@redhat.com>
>>>
>>> So pass "-m crc=0" to the scratch_mkfs command so that we only run
>>> on old v4 format filesystems where the UUID can be changed.
>>>
>>> Signed-off-by: Dave Chinner <dchinner@redhat.com>
>>
>> hm, given that I might "fix" this should we instead trap
>> on an xfs_db uuid failure, and _notrun the test?
>> (oh, but older xfs_db let it go, didn't it. sigh).
>>
>> I guess nothing about the presence of crc vs. non-crc
>> matters for this test, so turning it off by default is probably ok.
>> It could use a comment about why it's got "-m crc=0" though, at
>> least.
>
> Added. New patch below.
>
Thanks.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-04 22:01 ` [PATCH 4/4] filter: inode size output of mkfs.xfs can change Dave Chinner
@ 2015-05-05 2:06 ` Eric Sandeen
2015-05-05 5:34 ` Dave Chinner
2015-05-06 7:19 ` Eryu Guan
1 sibling, 1 reply; 15+ messages in thread
From: Eric Sandeen @ 2015-05-05 2:06 UTC (permalink / raw)
To: Dave Chinner, fstests
On 5/4/15 5:01 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> With the change to CRCs by default, the mkfs inode size is defaults
> to 512 bytes and the minimum block size changes to 1024 bytes. This
> causes mismatches with golden output that expects the inode size to
> be 256 bytes, and some tests are tailored around the amount of space
> inside a 256 byte inode. Fix them with appropriate filtering or mkfs
> parameters to allow 256 byte inodes to be used.
I guess I kind of have the same concerns here; lots of magic mkfs
args w/ no real clue about why they exist.
The things that filter out isize etc make good sense in general.
But the new mkfs args could use comments or helpers or something
that make it a little more obvious why they're used. What do you
think?
-Eric
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> tests/xfs/073 | 4 ++--
> tests/xfs/096 | 6 +++---
> tests/xfs/096.external | 12 ++++++------
> tests/xfs/096.internal | 12 ++++++------
> tests/xfs/187 | 4 ++--
> tests/xfs/194 | 4 +++-
> tests/xfs/199 | 2 +-
> tests/xfs/206 | 10 ++++++----
> tests/xfs/206.out | 12 ++++++------
> tests/xfs/259 | 21 ++++++++++++++++++---
> tests/xfs/292 | 4 ++--
> tests/xfs/292.out | 2 --
> tests/xfs/300 | 3 ++-
> 13 files changed, 57 insertions(+), 39 deletions(-)
>
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index 07fc71b..45a3fdf 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -136,7 +136,7 @@ _require_loop
>
> rm -f $seqres.full
>
> -_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
>
> echo
> @@ -156,7 +156,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
>
> echo
> echo === copying scratch device to single target, large ro device
> -${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
> +${MKFS_XFS_PROG} -m crc=0 -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
> rmdir $imgs.source_dir 2>/dev/null
> mkdir $imgs.source_dir
>
> diff --git a/tests/xfs/096 b/tests/xfs/096
> index 2da8fa1..c289c10 100755
> --- a/tests/xfs/096
> +++ b/tests/xfs/096
> @@ -77,7 +77,7 @@ mkfs_filter()
> -e 's/swidth=[0-9][0-9]* blks$/&, unwritten=1/' \
> -e 's/rtextents=[0-9][0-9]*/rtextents=N/' \
> -e 's/meta-data=[^ ]*/meta-data=DEV/' \
> - -e 's/ *isize/ isize/' \
> + -e 's/ *isize=[0-9]* / isize=N /' \
> -e '/ *= *sectsz=[0-9][0-9]* *attr=[0-9][0-9]*.*$/d' \
> -e '/ *= *mmr=[0-9][0-9]* *$/d' \
> -e 's/ *mixed-case=[YN]//' \
> @@ -130,9 +130,9 @@ cat >$tmp.seq.params <<EOF
> # same test but get log stripe from data stripe
> -l version=2 -d su=$big_su,sw=1
> # test out data stripe
> - -l version=1 -d su=$big_su,sw=1
> + -m crc=0 -l version=1 -d su=$big_su,sw=1
> # test out data stripe the same but using sunit & swidth
> - -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
> + -m crc=0 -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
> EOF
>
> #
> diff --git a/tests/xfs/096.external b/tests/xfs/096.external
> index 7923340..3122330 100644
> --- a/tests/xfs/096.external
> +++ b/tests/xfs/096.external
> @@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
>
> # test log stripe greater than LR size
> --- mkfs=-l version=2,su=266240 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=0 swidth=0 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -17,7 +17,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
> # same test but get log stripe from data stripe
> --- mkfs=-l version=2 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -27,8 +27,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe
> ---- mkfs=-l version=1 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -38,8 +38,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe the same but using sunit & swidth
> ---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> diff --git a/tests/xfs/096.internal b/tests/xfs/096.internal
> index eaba13f..80201d2 100644
> --- a/tests/xfs/096.internal
> +++ b/tests/xfs/096.internal
> @@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
>
> # test log stripe greater than LR size
> --- mkfs=-l version=2,su=266240 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=0 swidth=0 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -18,7 +18,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
> # same test but get log stripe from data stripe
> --- mkfs=-l version=2 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -28,8 +28,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe
> ---- mkfs=-l version=1 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -39,8 +39,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe the same but using sunit & swidth
> ---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> diff --git a/tests/xfs/187 b/tests/xfs/187
> index 700ab04..836b924 100755
> --- a/tests/xfs/187
> +++ b/tests/xfs/187
> @@ -70,8 +70,8 @@ export MOUNT_OPTIONS=""
> # lazysb, attr2 and other feature bits are held in features2 and will require
> # morebitsbit on So test with lazysb and without it to see if the morebitsbit is
> # okay etc. If the mkfs defaults change, these need to change as well.
> -export MKFS_NO_LAZY="-l lazy-count=0 -i projid32bit=0"
> -export MKFS_LAZY="-l lazy-count=1 -i projid32bit=0"
> +export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
> +export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
>
> # Make sure that when we think we are testing with morebits off
> # that we really are.
> diff --git a/tests/xfs/194 b/tests/xfs/194
> index f56702a..e11b459 100755
> --- a/tests/xfs/194
> +++ b/tests/xfs/194
> @@ -83,7 +83,9 @@ _filter_od()
> _require_scratch
> unset MKFS_OPTIONS
> unset XFS_MKFS_OPTIONS
> -_scratch_mkfs_xfs -b size=$blksize >/dev/null 2>&1
> +
> +# we need 512 byte block size, so crc's are turned off
> +_scratch_mkfs_xfs -m crc=0 -b size=$blksize >/dev/null 2>&1
> _scratch_mount
>
> # 512b block / 4k page example:
> diff --git a/tests/xfs/199 b/tests/xfs/199
> index c1b5962..0eef88b 100755
> --- a/tests/xfs/199
> +++ b/tests/xfs/199
> @@ -52,7 +52,7 @@ _require_scratch
> # clear any mkfs options so taht we can directly specify the options we need to
> # be able to test the features bitmask behaviour correctly.
> MKFS_OPTIONS=
> -_scratch_mkfs_xfs -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
> +_scratch_mkfs_xfs -m crc=0 -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
>
> #
> # Print the current flags. Just a dummy so that the test breaks
> diff --git a/tests/xfs/206 b/tests/xfs/206
> index 198e413..0f5d97d 100755
> --- a/tests/xfs/206
> +++ b/tests/xfs/206
> @@ -75,19 +75,21 @@ dd if=/dev/zero of=$tmpfile bs=1 seek=19998630180864 count=1 >/dev/null 2>&1 \
>
> mkfs_filter()
> {
> - sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
> + sed -e 's/meta-data=[^ ]*/meta-data=FILE/' \
> + -e 's/ *isize=[0-9]* / isize=N /' \
> -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
> -e "s/, projid32bit=[0-9]//" \
> -e "s/ ftype=[0-9]//" \
> -e "s/\(sectsz\)\(=[0-9]* *\)/\1=512 /" \
> -e "s/\(sunit=\)\([0-9]* blks,\)/\10 blks,/" \
> + -e "s/, lazy-count=[0-9]//" \
> -e "/.*crc=/d"
> }
>
> -# mkfs slightly smaller than that
> +# mkfs slightly smaller than that, small log for speed.
> echo "=== mkfs.xfs ==="
> -mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b \
> - -llazy-count=0 $tmpfile | mkfs_filter
> +mkfs.xfs -f -bsize=4096 -l size=32m -dagsize=76288719b,size=3905982455b \
> + $tmpfile | mkfs_filter
>
> mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
>
> diff --git a/tests/xfs/206.out b/tests/xfs/206.out
> index da70d01..2db839d 100644
> --- a/tests/xfs/206.out
> +++ b/tests/xfs/206.out
> @@ -1,30 +1,30 @@
> QA output created by 206
> === truncate file ===
> === mkfs.xfs ===
> -meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=52, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905982455, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal log bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> === xfs_growfs ===
> -meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=52, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905982455, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> data blocks changed from 3905982455 to 4882478016
> === xfs_info ===
> -meta-data=FILE isize=256 agcount=64, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=64, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=4882478016, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> diff --git a/tests/xfs/259 b/tests/xfs/259
> index 6587a65..16c1935 100755
> --- a/tests/xfs/259
> +++ b/tests/xfs/259
> @@ -37,6 +37,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
>
> # get standard environment, filters and checks
> . ./common/rc
> +. ./common/filter
>
> # real QA test starts here
> _supported_fs xfs
> @@ -47,9 +48,22 @@ _require_math
>
> testfile=$TEST_DIR/259.image
>
> -# Test various sizes slightly less than 4 TB
> +# Test various sizes slightly less than 4 TB. Need to handle different
> +# minimum block sizes for CRC enabled filesystems, but use a small log so we
> +# don't write lots of zeros unnecessarily.
> +xfs_info $TEST_DIR | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +. $tmp.mkfs
> +if [ $_fs_has_crcs -eq 1 ]; then
> + blocksize=1024
> + sizes_to_check="1024 2048 4096"
> + echo "Trying to make (4 TB - 512) B long xfs fs image"
> +else
> + blocksize=512
> + sizes_to_check="512 1024 2048 4096"
> +fi
> +
> four_TB=$(_math "2^42")
> -for del in 512 1024 2048 4096; do
> +for del in $sizes_to_check; do
> ddseek=$(_math "$four_TB - $del")
> echo "Trying to make (4 TB - $del) B long xfs fs image"
> rm -f "$testfile"
> @@ -57,7 +71,8 @@ for del in 512 1024 2048 4096; do
> >/dev/null 2>&1 || echo "dd failed"
> lofile=$(losetup -f)
> losetup $lofile "$testfile"
> - "$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
> + "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \
> + >/dev/null || echo "mkfs failed!"
> sync
> losetup -d $lofile
> done
> diff --git a/tests/xfs/292 b/tests/xfs/292
> index a476d91..db890b5 100755
> --- a/tests/xfs/292
> +++ b/tests/xfs/292
> @@ -55,12 +55,12 @@ $XFS_IO_PROG -f -c "truncate 256g" $fsfile
>
> echo "mkfs.xfs without geometry"
> mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> -grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
> +grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> sed -e "s:$fsfile:FILENAME:g"
>
> echo "mkfs.xfs with cmdline geometry"
> mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> -grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
> +grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> sed -e "s:$fsfile:FILENAME:g"
>
> rm -f $fsfile
> diff --git a/tests/xfs/292.out b/tests/xfs/292.out
> index 2837d74..1d69507 100644
> --- a/tests/xfs/292.out
> +++ b/tests/xfs/292.out
> @@ -1,11 +1,9 @@
> QA output created by 292
> mkfs.xfs without geometry
> ddev=FILENAME
> -isize=256
> agcount=4
> agsize=16777216
> mkfs.xfs with cmdline geometry
> ddev=FILENAME
> -isize=256
> agcount=16
> agsize=4194304
> diff --git a/tests/xfs/300 b/tests/xfs/300
> index db83fd4..9489cbe 100755
> --- a/tests/xfs/300
> +++ b/tests/xfs/300
> @@ -51,7 +51,8 @@ getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled"
>
> rm -f $seqres.full
>
> -_scratch_mkfs_xfs -i size=256 >> $seqres.full 2>&1 || _fail "mkfs failed"
> +_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 \
> + || _fail "mkfs failed"
>
> # Manually mount to avoid fs-wide context set by default in xfstests
> mount $SCRATCH_DEV $SCRATCH_MNT
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-05 2:06 ` Eric Sandeen
@ 2015-05-05 5:34 ` Dave Chinner
0 siblings, 0 replies; 15+ messages in thread
From: Dave Chinner @ 2015-05-05 5:34 UTC (permalink / raw)
To: Eric Sandeen; +Cc: fstests
On Mon, May 04, 2015 at 09:06:24PM -0500, Eric Sandeen wrote:
> On 5/4/15 5:01 PM, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > With the change to CRCs by default, the mkfs inode size is defaults
> > to 512 bytes and the minimum block size changes to 1024 bytes. This
> > causes mismatches with golden output that expects the inode size to
> > be 256 bytes, and some tests are tailored around the amount of space
> > inside a 256 byte inode. Fix them with appropriate filtering or mkfs
> > parameters to allow 256 byte inodes to be used.
>
> I guess I kind of have the same concerns here; lots of magic mkfs
> args w/ no real clue about why they exist.
>
> The things that filter out isize etc make good sense in general.
>
> But the new mkfs args could use comments or helpers or something
> that make it a little more obvious why they're used. What do you
> think?
Well, to my mind it's pretty self documenting - the "-m crc=0"
indicates that the test relies on something that isn't supported on
CRC enabled filesystems...
Regardless, for most of them I added comments or expanded existing
comments to explain it, so I really don't see that there's much else
we need to do here...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-04 22:01 ` [PATCH 4/4] filter: inode size output of mkfs.xfs can change Dave Chinner
2015-05-05 2:06 ` Eric Sandeen
@ 2015-05-06 7:19 ` Eryu Guan
2015-05-06 22:56 ` Dave Chinner
1 sibling, 1 reply; 15+ messages in thread
From: Eryu Guan @ 2015-05-06 7:19 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests
On Tue, May 05, 2015 at 08:01:33AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> With the change to CRCs by default, the mkfs inode size is defaults
> to 512 bytes and the minimum block size changes to 1024 bytes. This
> causes mismatches with golden output that expects the inode size to
> be 256 bytes, and some tests are tailored around the amount of space
> inside a 256 byte inode. Fix them with appropriate filtering or mkfs
> parameters to allow 256 byte inodes to be used.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> tests/xfs/073 | 4 ++--
> tests/xfs/096 | 6 +++---
> tests/xfs/096.external | 12 ++++++------
> tests/xfs/096.internal | 12 ++++++------
> tests/xfs/187 | 4 ++--
> tests/xfs/194 | 4 +++-
> tests/xfs/199 | 2 +-
> tests/xfs/206 | 10 ++++++----
> tests/xfs/206.out | 12 ++++++------
> tests/xfs/259 | 21 ++++++++++++++++++---
> tests/xfs/292 | 4 ++--
> tests/xfs/292.out | 2 --
> tests/xfs/300 | 3 ++-
> 13 files changed, 57 insertions(+), 39 deletions(-)
>
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index 07fc71b..45a3fdf 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -136,7 +136,7 @@ _require_loop
>
> rm -f $seqres.full
>
> -_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
Adding "-m crc=0" to mkfs directly will break testing on older distros
where mkfs.xfs doesn't have crc support, e.g. RHEL6
I haven't figured out a better way, but I was thinking about tweaking
_scratch_mkfs_xfs or $MKFS_XFS_PROG based on mkfs.xfs supports crc or
not.
Thanks,
Eryu
> _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
>
> echo
> @@ -156,7 +156,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
>
> echo
> echo === copying scratch device to single target, large ro device
> -${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
> +${MKFS_XFS_PROG} -m crc=0 -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
> rmdir $imgs.source_dir 2>/dev/null
> mkdir $imgs.source_dir
>
> diff --git a/tests/xfs/096 b/tests/xfs/096
> index 2da8fa1..c289c10 100755
> --- a/tests/xfs/096
> +++ b/tests/xfs/096
> @@ -77,7 +77,7 @@ mkfs_filter()
> -e 's/swidth=[0-9][0-9]* blks$/&, unwritten=1/' \
> -e 's/rtextents=[0-9][0-9]*/rtextents=N/' \
> -e 's/meta-data=[^ ]*/meta-data=DEV/' \
> - -e 's/ *isize/ isize/' \
> + -e 's/ *isize=[0-9]* / isize=N /' \
> -e '/ *= *sectsz=[0-9][0-9]* *attr=[0-9][0-9]*.*$/d' \
> -e '/ *= *mmr=[0-9][0-9]* *$/d' \
> -e 's/ *mixed-case=[YN]//' \
> @@ -130,9 +130,9 @@ cat >$tmp.seq.params <<EOF
> # same test but get log stripe from data stripe
> -l version=2 -d su=$big_su,sw=1
> # test out data stripe
> - -l version=1 -d su=$big_su,sw=1
> + -m crc=0 -l version=1 -d su=$big_su,sw=1
> # test out data stripe the same but using sunit & swidth
> - -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
> + -m crc=0 -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
> EOF
>
> #
> diff --git a/tests/xfs/096.external b/tests/xfs/096.external
> index 7923340..3122330 100644
> --- a/tests/xfs/096.external
> +++ b/tests/xfs/096.external
> @@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
>
> # test log stripe greater than LR size
> --- mkfs=-l version=2,su=266240 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=0 swidth=0 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -17,7 +17,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
> # same test but get log stripe from data stripe
> --- mkfs=-l version=2 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -27,8 +27,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe
> ---- mkfs=-l version=1 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -38,8 +38,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe the same but using sunit & swidth
> ---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> diff --git a/tests/xfs/096.internal b/tests/xfs/096.internal
> index eaba13f..80201d2 100644
> --- a/tests/xfs/096.internal
> +++ b/tests/xfs/096.internal
> @@ -7,7 +7,7 @@ log stripe unit (262656) must be a multiple of the block size (4096)
>
> # test log stripe greater than LR size
> --- mkfs=-l version=2,su=266240 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=0 swidth=0 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -18,7 +18,7 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
> # same test but get log stripe from data stripe
> --- mkfs=-l version=2 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -28,8 +28,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe
> ---- mkfs=-l version=1 -d su=266240,sw=1 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d su=266240,sw=1 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> @@ -39,8 +39,8 @@ realtime =REALTIME extsz=N, blocks=N, rtextents=N
>
>
> # test out data stripe the same but using sunit & swidth
> ---- mkfs=-l version=1 -d sunit=520,swidth=520 ---
> -meta-data=DEV isize=256 agcount=N, agsize=N blks
> +--- mkfs=-m crc=0 -l version=1 -d sunit=520,swidth=520 ---
> +meta-data=DEV isize=N agcount=N, agsize=N blks
> data = bsize=4096 blocks=N, imaxpct=N
> = sunit=65 swidth=65 blks, unwritten=1
> naming =version 2 bsize=4096
> diff --git a/tests/xfs/187 b/tests/xfs/187
> index 700ab04..836b924 100755
> --- a/tests/xfs/187
> +++ b/tests/xfs/187
> @@ -70,8 +70,8 @@ export MOUNT_OPTIONS=""
> # lazysb, attr2 and other feature bits are held in features2 and will require
> # morebitsbit on So test with lazysb and without it to see if the morebitsbit is
> # okay etc. If the mkfs defaults change, these need to change as well.
> -export MKFS_NO_LAZY="-l lazy-count=0 -i projid32bit=0"
> -export MKFS_LAZY="-l lazy-count=1 -i projid32bit=0"
> +export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
> +export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
>
> # Make sure that when we think we are testing with morebits off
> # that we really are.
> diff --git a/tests/xfs/194 b/tests/xfs/194
> index f56702a..e11b459 100755
> --- a/tests/xfs/194
> +++ b/tests/xfs/194
> @@ -83,7 +83,9 @@ _filter_od()
> _require_scratch
> unset MKFS_OPTIONS
> unset XFS_MKFS_OPTIONS
> -_scratch_mkfs_xfs -b size=$blksize >/dev/null 2>&1
> +
> +# we need 512 byte block size, so crc's are turned off
> +_scratch_mkfs_xfs -m crc=0 -b size=$blksize >/dev/null 2>&1
> _scratch_mount
>
> # 512b block / 4k page example:
> diff --git a/tests/xfs/199 b/tests/xfs/199
> index c1b5962..0eef88b 100755
> --- a/tests/xfs/199
> +++ b/tests/xfs/199
> @@ -52,7 +52,7 @@ _require_scratch
> # clear any mkfs options so taht we can directly specify the options we need to
> # be able to test the features bitmask behaviour correctly.
> MKFS_OPTIONS=
> -_scratch_mkfs_xfs -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
> +_scratch_mkfs_xfs -m crc=0 -l lazy-count=1 -i projid32bit=0 >/dev/null 2>&1
>
> #
> # Print the current flags. Just a dummy so that the test breaks
> diff --git a/tests/xfs/206 b/tests/xfs/206
> index 198e413..0f5d97d 100755
> --- a/tests/xfs/206
> +++ b/tests/xfs/206
> @@ -75,19 +75,21 @@ dd if=/dev/zero of=$tmpfile bs=1 seek=19998630180864 count=1 >/dev/null 2>&1 \
>
> mkfs_filter()
> {
> - sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
> + sed -e 's/meta-data=[^ ]*/meta-data=FILE/' \
> + -e 's/ *isize=[0-9]* / isize=N /' \
> -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
> -e "s/, projid32bit=[0-9]//" \
> -e "s/ ftype=[0-9]//" \
> -e "s/\(sectsz\)\(=[0-9]* *\)/\1=512 /" \
> -e "s/\(sunit=\)\([0-9]* blks,\)/\10 blks,/" \
> + -e "s/, lazy-count=[0-9]//" \
> -e "/.*crc=/d"
> }
>
> -# mkfs slightly smaller than that
> +# mkfs slightly smaller than that, small log for speed.
> echo "=== mkfs.xfs ==="
> -mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b \
> - -llazy-count=0 $tmpfile | mkfs_filter
> +mkfs.xfs -f -bsize=4096 -l size=32m -dagsize=76288719b,size=3905982455b \
> + $tmpfile | mkfs_filter
>
> mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
>
> diff --git a/tests/xfs/206.out b/tests/xfs/206.out
> index da70d01..2db839d 100644
> --- a/tests/xfs/206.out
> +++ b/tests/xfs/206.out
> @@ -1,30 +1,30 @@
> QA output created by 206
> === truncate file ===
> === mkfs.xfs ===
> -meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=52, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905982455, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal log bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> === xfs_growfs ===
> -meta-data=FILE isize=256 agcount=52, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=52, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905982455, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> data blocks changed from 3905982455 to 4882478016
> === xfs_info ===
> -meta-data=FILE isize=256 agcount=64, agsize=76288719 blks
> +meta-data=FILE isize=N agcount=64, agsize=76288719 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=4882478016, imaxpct=5
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=XXXXX, version=2
> - = sectsz=512 sunit=0 blks, lazy-count=0
> + = sectsz=512 sunit=0 blks
> realtime =none extsz=4096 blocks=0, rtextents=0
> diff --git a/tests/xfs/259 b/tests/xfs/259
> index 6587a65..16c1935 100755
> --- a/tests/xfs/259
> +++ b/tests/xfs/259
> @@ -37,6 +37,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
>
> # get standard environment, filters and checks
> . ./common/rc
> +. ./common/filter
>
> # real QA test starts here
> _supported_fs xfs
> @@ -47,9 +48,22 @@ _require_math
>
> testfile=$TEST_DIR/259.image
>
> -# Test various sizes slightly less than 4 TB
> +# Test various sizes slightly less than 4 TB. Need to handle different
> +# minimum block sizes for CRC enabled filesystems, but use a small log so we
> +# don't write lots of zeros unnecessarily.
> +xfs_info $TEST_DIR | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +. $tmp.mkfs
> +if [ $_fs_has_crcs -eq 1 ]; then
> + blocksize=1024
> + sizes_to_check="1024 2048 4096"
> + echo "Trying to make (4 TB - 512) B long xfs fs image"
> +else
> + blocksize=512
> + sizes_to_check="512 1024 2048 4096"
> +fi
> +
> four_TB=$(_math "2^42")
> -for del in 512 1024 2048 4096; do
> +for del in $sizes_to_check; do
> ddseek=$(_math "$four_TB - $del")
> echo "Trying to make (4 TB - $del) B long xfs fs image"
> rm -f "$testfile"
> @@ -57,7 +71,8 @@ for del in 512 1024 2048 4096; do
> >/dev/null 2>&1 || echo "dd failed"
> lofile=$(losetup -f)
> losetup $lofile "$testfile"
> - "$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
> + "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \
> + >/dev/null || echo "mkfs failed!"
> sync
> losetup -d $lofile
> done
> diff --git a/tests/xfs/292 b/tests/xfs/292
> index a476d91..db890b5 100755
> --- a/tests/xfs/292
> +++ b/tests/xfs/292
> @@ -55,12 +55,12 @@ $XFS_IO_PROG -f -c "truncate 256g" $fsfile
>
> echo "mkfs.xfs without geometry"
> mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> -grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
> +grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> sed -e "s:$fsfile:FILENAME:g"
>
> echo "mkfs.xfs with cmdline geometry"
> mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> -grep -E 'ddev|isize|agcount|agsize' $tmp.mkfs | \
> +grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> sed -e "s:$fsfile:FILENAME:g"
>
> rm -f $fsfile
> diff --git a/tests/xfs/292.out b/tests/xfs/292.out
> index 2837d74..1d69507 100644
> --- a/tests/xfs/292.out
> +++ b/tests/xfs/292.out
> @@ -1,11 +1,9 @@
> QA output created by 292
> mkfs.xfs without geometry
> ddev=FILENAME
> -isize=256
> agcount=4
> agsize=16777216
> mkfs.xfs with cmdline geometry
> ddev=FILENAME
> -isize=256
> agcount=16
> agsize=4194304
> diff --git a/tests/xfs/300 b/tests/xfs/300
> index db83fd4..9489cbe 100755
> --- a/tests/xfs/300
> +++ b/tests/xfs/300
> @@ -51,7 +51,8 @@ getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled"
>
> rm -f $seqres.full
>
> -_scratch_mkfs_xfs -i size=256 >> $seqres.full 2>&1 || _fail "mkfs failed"
> +_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 \
> + || _fail "mkfs failed"
>
> # Manually mount to avoid fs-wide context set by default in xfstests
> mount $SCRATCH_DEV $SCRATCH_MNT
> --
> 2.0.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-06 7:19 ` Eryu Guan
@ 2015-05-06 22:56 ` Dave Chinner
2015-05-07 3:05 ` Eryu Guan
0 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2015-05-06 22:56 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests
On Wed, May 06, 2015 at 03:19:34PM +0800, Eryu Guan wrote:
> On Tue, May 05, 2015 at 08:01:33AM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > With the change to CRCs by default, the mkfs inode size is defaults
> > to 512 bytes and the minimum block size changes to 1024 bytes. This
> > causes mismatches with golden output that expects the inode size to
> > be 256 bytes, and some tests are tailored around the amount of space
> > inside a 256 byte inode. Fix them with appropriate filtering or mkfs
> > parameters to allow 256 byte inodes to be used.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> > tests/xfs/073 | 4 ++--
> > tests/xfs/096 | 6 +++---
> > tests/xfs/096.external | 12 ++++++------
> > tests/xfs/096.internal | 12 ++++++------
> > tests/xfs/187 | 4 ++--
> > tests/xfs/194 | 4 +++-
> > tests/xfs/199 | 2 +-
> > tests/xfs/206 | 10 ++++++----
> > tests/xfs/206.out | 12 ++++++------
> > tests/xfs/259 | 21 ++++++++++++++++++---
> > tests/xfs/292 | 4 ++--
> > tests/xfs/292.out | 2 --
> > tests/xfs/300 | 3 ++-
> > 13 files changed, 57 insertions(+), 39 deletions(-)
> >
> > diff --git a/tests/xfs/073 b/tests/xfs/073
> > index 07fc71b..45a3fdf 100755
> > --- a/tests/xfs/073
> > +++ b/tests/xfs/073
> > @@ -136,7 +136,7 @@ _require_loop
> >
> > rm -f $seqres.full
> >
> > -_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> > +_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
>
> Adding "-m crc=0" to mkfs directly will break testing on older distros
> where mkfs.xfs doesn't have crc support, e.g. RHEL6
I know we need to keep older distros working, but right now we need
to make upstream xfstests work with upstream xfsprogs changes. Keep
in mind that we do allow upstream changes for upstream support to
break older distro support. The responsibility for keeping upstream
xfstests working on older distros falls to the people running it on
older distros, not the people who are working on upstream.
Of course, people testing older distros always have the option of
not upgrading xfstests every time a commit is made.... :P
> I haven't figured out a better way, but I was thinking about tweaking
> _scratch_mkfs_xfs or $MKFS_XFS_PROG based on mkfs.xfs supports crc or
> not.
I'd suggest that we should look at filtering this out in
_scratch_options, based on some environment variable that you set in
the .config files for the older distros. e.g.
mkfs)
+ if [ -n "$MKFS_HAS_NO_META_SUPPORT" ]; then
+ # strip "-m ..." options
+ SCRATCH_OPTIONS=`<insert sed magic here>`
+ fi
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/4] filter: inode size output of mkfs.xfs can change
2015-05-06 22:56 ` Dave Chinner
@ 2015-05-07 3:05 ` Eryu Guan
0 siblings, 0 replies; 15+ messages in thread
From: Eryu Guan @ 2015-05-07 3:05 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests
On Thu, May 07, 2015 at 08:56:27AM +1000, Dave Chinner wrote:
> On Wed, May 06, 2015 at 03:19:34PM +0800, Eryu Guan wrote:
> > On Tue, May 05, 2015 at 08:01:33AM +1000, Dave Chinner wrote:
> > > From: Dave Chinner <dchinner@redhat.com>
> > >
> > > With the change to CRCs by default, the mkfs inode size is defaults
> > > to 512 bytes and the minimum block size changes to 1024 bytes. This
> > > causes mismatches with golden output that expects the inode size to
> > > be 256 bytes, and some tests are tailored around the amount of space
> > > inside a 256 byte inode. Fix them with appropriate filtering or mkfs
> > > parameters to allow 256 byte inodes to be used.
> > >
> > > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > > ---
[snip]
> > > -_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> > > +_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
> >
> > Adding "-m crc=0" to mkfs directly will break testing on older distros
> > where mkfs.xfs doesn't have crc support, e.g. RHEL6
>
> I know we need to keep older distros working, but right now we need
> to make upstream xfstests work with upstream xfsprogs changes. Keep
> in mind that we do allow upstream changes for upstream support to
> break older distro support. The responsibility for keeping upstream
> xfstests working on older distros falls to the people running it on
> older distros, not the people who are working on upstream.
Understood, so I'll look into this based on how much work is needed and
how hardly we want it on RHEL6.8/9/etc.
>
> Of course, people testing older distros always have the option of
> not upgrading xfstests every time a commit is made.... :P
Yes, we use a fixed version of xfstests to test RHEL5, and RHEL6 is
almost reaching that maintaince-only phase too.
>
> > I haven't figured out a better way, but I was thinking about tweaking
> > _scratch_mkfs_xfs or $MKFS_XFS_PROG based on mkfs.xfs supports crc or
> > not.
>
> I'd suggest that we should look at filtering this out in
> _scratch_options, based on some environment variable that you set in
> the .config files for the older distros. e.g.
>
> mkfs)
> + if [ -n "$MKFS_HAS_NO_META_SUPPORT" ]; then
> + # strip "-m ..." options
> + SCRATCH_OPTIONS=`<insert sed magic here>`
> + fi
I was thinking about _scratch_options too, I'll follow this way and see.
Thanks,
Eryu
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-05-07 3:05 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04 22:01 [PATCH 0/4] fstests: xfs utility output has changed Dave Chinner
2015-05-04 22:01 ` [PATCH 1/4] filter: latest mkfs.xfs makes logical sector size noise Dave Chinner
2015-05-04 22:45 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 2/4] filter: latest xfs_repair is more verbose Dave Chinner
2015-05-04 22:46 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 3/4] xfs/045: can't change UUID on v5 filesystems Dave Chinner
2015-05-04 22:48 ` Eric Sandeen
2015-05-05 0:51 ` Dave Chinner
2015-05-05 2:04 ` Eric Sandeen
2015-05-04 22:01 ` [PATCH 4/4] filter: inode size output of mkfs.xfs can change Dave Chinner
2015-05-05 2:06 ` Eric Sandeen
2015-05-05 5:34 ` Dave Chinner
2015-05-06 7:19 ` Eryu Guan
2015-05-06 22:56 ` Dave Chinner
2015-05-07 3:05 ` Eryu Guan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.