@@ -63,7 +63,7 @@ _cleanup()
# = sunit=0 blks
# realtime =none extsz=65536 blocks=N, rtextents=N
#
-_mkfs_filter()
+mkfs_filter()
{
tee -a $seqres.full | \
sed \
@@ -80,6 +80,7 @@ _mkfs_filter()
-e '/ *= *mmr=[0-9][0-9]* *$/d' \
-e 's/ *mixed-case=[YN]//' \
-e 's/ *ascii-ci=[01]//' \
+ -e "s/\(sunit=\)\([0-9]* blks,\)/\11 blks,/" \
-e 's/sectsz=[0-9][0-9]* *//' \
-e 's/, lazy-count.*//' \
-e '/inode-paths/d' \
@@ -145,7 +146,7 @@ do
fi
echo "--- mkfs=$mkfs ---"
export MKFS_OPTIONS="$mkfs"
- _scratch_mkfs_xfs 2>&1 | _mkfs_filter
+ _scratch_mkfs_xfs 2>&1 | mkfs_filter
echo ""
echo ""
done
@@ -73,34 +73,31 @@ echo "=== truncate file ==="
dd if=/dev/zero of=$tmpfile bs=1 seek=19998630180864 count=1 >/dev/null 2>&1 \
|| _fail "!!! failed to truncate loopback file to correct size"
+mkfs_filter()
+{
+ sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
+ -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 "/.*crc=/d"
+}
+
# mkfs slightly smaller than that
echo "=== mkfs.xfs ==="
-mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b -llazy-count=0 $tmpfile \
- | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
- -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
- -e "s/, projid32bit=[0-9]//" \
- -e "s/ ftype=[0-9]//" \
- -e "/.*crc=/d"
+mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b \
+ -llazy-count=0 $tmpfile | mkfs_filter
mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
# see what happens when we growfs it
echo "=== xfs_growfs ==="
-xfs_growfs $tmpdir \
- | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
- -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
- -e "s/, projid32bit=[0-9]//" \
- -e "s/ ftype=[0-9]//" \
- -e "/.*crc=/d"
+xfs_growfs $tmpdir | mkfs_filter
# and double-check the new geometry
echo "=== xfs_info ==="
-xfs_info $tmpdir \
- | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \
- -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" \
- -e "s/, projid32bit=[0-9]//" \
- -e "s/ ftype=[0-9]//" \
- -e "/.*crc=/d"
+xfs_info $tmpdir | mkfs_filter
# _cleanup cleans up for us