fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix kernels without v5 support
@ 2024-04-08 13:32 Christoph Hellwig
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

Hi all,

this series ensures tests pass on kernels without v5 support.  As a side
effect it also removes support for historic kernels and xfsprogs without
any v5 support, and without mkfs input validation.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-08 15:03   ` Eric Biggers
                     ` (2 more replies)
  2024-04-08 13:32 ` [PATCH 2/6] remove xfs/096 Christoph Hellwig
                   ` (5 subsequent siblings)
  6 siblings, 3 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

v5 file systems have been the default for more than 10 years.  Drop
support for non-v5 enabled kernels and xfsprogs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/config | 13 -------------
 common/xfs    | 26 --------------------------
 tests/xfs/002 |  3 ---
 tests/xfs/005 |  1 -
 tests/xfs/077 |  1 -
 tests/xfs/083 |  2 --
 tests/xfs/132 |  1 -
 tests/xfs/148 |  1 -
 tests/xfs/263 |  5 -----
 tests/xfs/299 |  2 --
 tests/xfs/304 |  2 --
 tests/xfs/305 |  2 --
 12 files changed, 59 deletions(-)

diff --git a/common/config b/common/config
index 2a1434bb1..6a0496fdd 100644
--- a/common/config
+++ b/common/config
@@ -329,19 +329,6 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
 	export SELINUX_MOUNT_OPTIONS
 fi
 
-# check if mkfs.xfs supports v5 xfs
-if [ "$FSTYP" == "xfs" ]; then
-	XFS_MKFS_HAS_NO_META_SUPPORT=""
-	touch /tmp/crc_check.img
-	$MKFS_XFS_PROG -N -d file,name=/tmp/crc_check.img,size=32m -m crc=0 \
-		>/dev/null 2>&1;
-	if [ $? -ne 0 ]; then
-		XFS_MKFS_HAS_NO_META_SUPPORT=true
-	fi
-	rm -f /tmp/crc_check.img
-	export XFS_MKFS_HAS_NO_META_SUPPORT
-fi
-
 _common_mount_opts()
 {
 	case $FSTYP in
diff --git a/common/xfs b/common/xfs
index 65b509691..57d21762c 100644
--- a/common/xfs
+++ b/common/xfs
@@ -59,11 +59,6 @@ _scratch_mkfs_xfs_opts()
 {
 	mkfs_opts=$*
 
-	# remove metadata related mkfs options if mkfs.xfs doesn't them
-	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
-	fi
-
 	_scratch_options mkfs
 
 	echo "$MKFS_XFS_PROG $SCRATCH_OPTIONS $mkfs_opts"
@@ -439,24 +434,6 @@ _require_projid16bit()
 	   || _notrun "16 bit project IDs not supported on $SCRATCH_DEV"
 }
 
-# this test requires the crc feature to be available in mkfs.xfs
-#
-_require_xfs_mkfs_crc()
-{
-	_scratch_mkfs_xfs_supported -m crc=1 >/dev/null 2>&1 \
-	   || _notrun "mkfs.xfs doesn't have crc feature"
-}
-
-# this test requires the xfs kernel support crc feature
-#
-_require_xfs_crc()
-{
-	_scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
-	_try_scratch_mount >/dev/null 2>&1 \
-	   || _notrun "Kernel doesn't support crc feature"
-	_scratch_unmount
-}
-
 # If the xfs_info output for the given XFS filesystem mount mentions the given
 # feature.  If so, return 0 for success.  If not, return 1 for failure.  If the
 # third option is -v, echo 1 for success and 0 for not.
@@ -1268,9 +1245,6 @@ _require_scratch_xfs_shrink()
 #
 _require_meta_uuid()
 {
-	# This will create a crc fs on $SCRATCH_DEV
-	_require_xfs_crc
-
 	_scratch_xfs_db -x -c "uuid restore" 2>&1 \
 	   | grep -q "invalid UUID\|supported on V5 fs" \
 	   && _notrun "Userspace doesn't support meta_uuid feature"
diff --git a/tests/xfs/002 b/tests/xfs/002
index 6c0bb4d04..8dfd2693b 100755
--- a/tests/xfs/002
+++ b/tests/xfs/002
@@ -24,9 +24,6 @@ _supported_fs xfs
 _require_scratch_nocheck
 _require_no_large_scratch_dev
 
-# So we can explicitly turn it _off_:
-_require_xfs_mkfs_crc
-
 _scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
 
 # Scribble past a couple V4 secondary superblocks to populate sb_crc
diff --git a/tests/xfs/005 b/tests/xfs/005
index 5f1ab8348..019790295 100755
--- a/tests/xfs/005
+++ b/tests/xfs/005
@@ -20,7 +20,6 @@ _begin_fstest auto quick
 _supported_fs xfs
 
 _require_scratch_nocheck
-_require_xfs_mkfs_crc
 
 _scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
 
diff --git a/tests/xfs/077 b/tests/xfs/077
index f24f6f004..37ea931f1 100755
--- a/tests/xfs/077
+++ b/tests/xfs/077
@@ -24,7 +24,6 @@ _supported_fs xfs
 _require_xfs_copy
 _require_scratch
 _require_no_large_scratch_dev
-_require_xfs_crc
 _require_meta_uuid
 
 # Takes 2 args, 2nd optional:
diff --git a/tests/xfs/083 b/tests/xfs/083
index edab3b7b0..e8ce2221c 100755
--- a/tests/xfs/083
+++ b/tests/xfs/083
@@ -28,8 +28,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-#_require_xfs_crc	# checksum not required, but you probably want it anyway...
-#_require_xfs_mkfs_crc
 _require_attrs
 _require_populate_commands
 
diff --git a/tests/xfs/132 b/tests/xfs/132
index fa36c09c2..ee1c8c1ec 100755
--- a/tests/xfs/132
+++ b/tests/xfs/132
@@ -24,7 +24,6 @@ _require_scratch_nocheck
 # due to transaction cancellation.  Hence we don't want to check dmesg here.
 _disable_dmesg_check
 
-_require_xfs_mkfs_crc
 _scratch_mkfs -m crc=0 > $seqres.full 2>&1
 
 # The files that EIO in the golden output changes if we have quotas enabled
diff --git a/tests/xfs/148 b/tests/xfs/148
index 5d0a0bf42..c9f634cfd 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -27,7 +27,6 @@ _cleanup()
 _supported_fs xfs
 _require_test
 _require_attrs
-_require_xfs_mkfs_crc
 _disable_dmesg_check
 
 imgfile=$TEST_DIR/img-$seq
diff --git a/tests/xfs/263 b/tests/xfs/263
index bce4e13f9..bd30dab11 100755
--- a/tests/xfs/263
+++ b/tests/xfs/263
@@ -21,11 +21,6 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_quota
 
-# We could test older, non-project capable kernels but keep it simpler;
-# Only test crc and beyond (but we will test with and without the feature)
-_require_xfs_mkfs_crc
-_require_xfs_crc
-
 function option_string()
 {
 	VAL=$1
diff --git a/tests/xfs/299 b/tests/xfs/299
index 4b9df3c6a..1df1988ac 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -31,8 +31,6 @@ chmod a+rwx $seqres.full	# arbitrary users will write here
 
 _require_scratch
 _require_xfs_quota
-_require_xfs_mkfs_crc
-_require_xfs_crc
 
 # The actual point at which limit enforcement takes place for the
 # hard block limit is variable depending on filesystem blocksize,
diff --git a/tests/xfs/304 b/tests/xfs/304
index 3c38e6132..0ee6dad63 100755
--- a/tests/xfs/304
+++ b/tests/xfs/304
@@ -19,8 +19,6 @@ _supported_fs xfs
 
 _require_scratch
 _require_xfs_quota
-_require_xfs_mkfs_crc
-_require_xfs_crc
 
 _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
 
diff --git a/tests/xfs/305 b/tests/xfs/305
index d8a6712e5..e76dfdec1 100755
--- a/tests/xfs/305
+++ b/tests/xfs/305
@@ -19,8 +19,6 @@ _supported_fs xfs
 
 _require_scratch
 _require_xfs_quota
-_require_xfs_mkfs_crc
-_require_xfs_crc
 _require_command "$KILLALL_PROG" killall
 
 _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 2/6] remove xfs/096
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-09 15:27   ` Darrick J. Wong
  2024-04-08 13:32 ` [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case Christoph Hellwig
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

This test exercises mkfs error handling before strict validation was added
and thus is useless for xfsprogs > 4.5.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 .gitignore                 |   1 -
 common/xfs                 |   9 ---
 tests/xfs/096              | 130 -------------------------------------
 tests/xfs/096.out.external |  50 --------------
 tests/xfs/096.out.internal |  51 ---------------
 5 files changed, 241 deletions(-)
 delete mode 100755 tests/xfs/096
 delete mode 100644 tests/xfs/096.out.external
 delete mode 100644 tests/xfs/096.out.internal

diff --git a/.gitignore b/.gitignore
index 3b160209a..51cda513d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -211,7 +211,6 @@ tags
 /tests/generic/050.out
 /tests/xfs/033.out
 /tests/xfs/071.out
-/tests/xfs/096.out
 /tests/xfs/216.out
 
 # cscope files
diff --git a/common/xfs b/common/xfs
index 57d21762c..49ca5a2d5 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1211,15 +1211,6 @@ _require_xfs_mkfs_validation()
 	fi
 }
 
-# The opposite of _require_xfs_mkfs_validation.
-_require_xfs_mkfs_without_validation()
-{
-	_xfs_mkfs_validation_check
-	if [ "$?" -ne 0 ]; then
-		_notrun "Requires older mkfs without strict input checks: the last supported version of xfsprogs is 4.5."
-	fi
-}
-
 _require_scratch_xfs_shrink()
 {
 	_require_scratch
diff --git a/tests/xfs/096 b/tests/xfs/096
deleted file mode 100755
index a7a5444f8..000000000
--- a/tests/xfs/096
+++ /dev/null
@@ -1,130 +0,0 @@
-#! /bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# FS QA Test No. 096
-#
-# test out mkfs_xfs output on IRIX/Linux and some of its error handling
-# ensure pv#920679 is addressed
-#
-seqfull=$0
-. ./common/preamble
-_begin_fstest mkfs v2log auto quick
-
-# Import common functions.
-. ./common/filter
-. ./common/log
-
-#
-# filter out counts which will vary
-#   - extsz, blocks, agsize, agcount, device name, rtextents
-#   - log version varies for crc enabled fs
-#   - lsunit varies for 512/4k sector devices
-# filter out differences between linux and irix:
-#   - sectsz on Linux
-#   - mmr, mixed-case on IRIX
-#   - lazy-count on IRIX
-#   - inode-paths on IRIX
-#   - trailing spaces on Linux but not on IRIX
-#
-# Example output:
-#  meta-data=DEV isize=256    agcount=N, agsize=N blks
-#  data     =                       bsize=4096   blocks=N, imaxpct=25
-#           =                       sunit=65     swidth=65 blks, unwritten=1
-#  naming   =version 2              bsize=4096
-#  log      =internal log           bsize=4096   blocks=N, version=1
-#           =                       sunit=0 blks
-#  realtime =none                   extsz=65536  blocks=N, rtextents=N
-#
-mkfs_filter()
-{
-   tee -a $seqres.full | \
-   sed \
-	-e 's/extsz=[0-9][0-9]*[ ]*/extsz=N, /' \
-	-e 's/blocks=[0-9][0-9]*/blocks=N/' \
-	-e 's/imaxpct=[0-9][0-9]*/imaxpct=N/' \
-	-e 's/agsize=[0-9][0-9]*/agsize=N/' \
-	-e 's/agcount=[0-9][0-9]*/agcount=N/' \
-        -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=[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]//' \
-	-e 's/ *ascii-ci=[01]//' \
-	-e 's/\(version=\)\([12]\)/\1N/' \
-	-e 's/\(sunit=\)\([018] blks\)/\1N blks/' \
-	-e 's/sectsz=[0-9][0-9]* *//' \
-	-e 's/, lazy-count.*//' \
-	-e '/inode-paths/d' \
-	-e 's/\(log[ 	]*=\).*bsize/\1LOG                    bsize/' \
-	-e 's/\(realtime[ 	]*=\).*extsz/\1REALTIME               extsz/' \
-	-e '/.*crc=/d' \
-	-e 's/ *$//' \
-	-e 's/ ftype=[01]//' \
-	-e '/^log stripe unit.*too large/d' \
-	-e '/^log stripe unit adjusted/d' \
-	-e '/Discarding/d' \
-   | grep -v parent
-}
-
-# real QA test starts here
-
-# Modify as appropriate.
-_supported_fs xfs
-_require_scratch
-_require_v2log
-_require_xfs_mkfs_without_validation
-
-# choose .out file based on internal/external log
-rm -f $seqfull.out
-if [ "$USE_EXTERNAL" = yes ]; then
-	ln -s $seq.out.external $seqfull.out
-else
-	ln -s $seq.out.internal $seqfull.out
-fi
-
-# maximum log record size
-max_lr_size=`expr 256 \* 1024`
-
-big_su=`expr $max_lr_size + 4096`
-
-#
-# Test out various mkfs param combinations
-#
-cat >$tmp.seq.params <<EOF
-# su too big but must be a multiple of fs block size too
-  -l version=2,su=`expr $max_lr_size + 512`
-# test log stripe greater than LR size
-  -l version=2,su=$big_su
-# same test but get log stripe from data stripe
-  -l version=2 -d su=$big_su,sw=1
-# test out data stripe
-  -m crc=0 -l version=1 -d su=$big_su,sw=1
-# test out data stripe the same but using sunit & swidth
-  -m crc=0 -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
-EOF
-
-#
-# call mkfs in a loop for various params
-#
-echo ""
-cat $tmp.seq.params \
-| while read mkfs
-do
-    if echo $mkfs | grep -q '^#'; then
-        # print out header & ignore comment
-	echo $mkfs
-	continue
-    fi
-    echo "--- mkfs=$mkfs ---"
-    export MKFS_OPTIONS="$mkfs"
-    _scratch_mkfs_xfs 2>&1 | mkfs_filter
-    echo ""
-    echo ""
-done
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/096.out.external b/tests/xfs/096.out.external
deleted file mode 100644
index 3122330ac..000000000
--- a/tests/xfs/096.out.external
+++ /dev/null
@@ -1,50 +0,0 @@
-QA output created by 096
-
-# su too big but must be a multiple of fs block size too
---- mkfs=-l version=2,su=262656 ---
-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=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
-log      =LOG                    bsize=4096   blocks=N, version=N
-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=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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe
---- 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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe the same but using sunit & swidth
---- 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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
diff --git a/tests/xfs/096.out.internal b/tests/xfs/096.out.internal
deleted file mode 100644
index 80201d25b..000000000
--- a/tests/xfs/096.out.internal
+++ /dev/null
@@ -1,51 +0,0 @@
-QA output created by 096
-
-# su too big but must be a multiple of fs block size too
---- mkfs=-l version=2,su=262656 ---
-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=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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-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=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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe
---- 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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-# test out data stripe the same but using sunit & swidth
---- 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
-log      =LOG                    bsize=4096   blocks=N, version=N
-         =                       sunit=N blks
-realtime =REALTIME               extsz=N, blocks=N, rtextents=N
-
-
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
  2024-04-08 13:32 ` [PATCH 2/6] remove xfs/096 Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-09 15:32   ` Darrick J. Wong
  2024-04-08 13:32 ` [PATCH 4/6] xfs/263: remove the nocrc sub-test Christoph Hellwig
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

512 byte block sizes are only supported for v4 file systems, and
xfs/078 crudely forces use of v4 file systems for it.  This doesn't
work if the kernel is built without v4 support.  Given that v4
support is slowly being phased out and 512 byte block sizes have never
been common, drop this part of the test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/078     |  9 ++-------
 tests/xfs/078.out | 18 ------------------
 2 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/tests/xfs/078 b/tests/xfs/078
index 1f475c963..501551e5e 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -69,12 +69,8 @@ _grow_loop()
 	echo
 
 	echo "*** mkfs loop file (size=$original)"
-	mkfs_crc_opts=""
-	if [ $bsize -lt 1024 -a -z "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_crc_opts="-m crc=0"
-	fi
-	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
-		| _filter_mkfs 2>/dev/null
+	$MKFS_XFS_PROG -b size=$bsize $dparam $LOOP_DEV | \
+		_filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
 	_destroy_loop_device $LOOP_DEV
@@ -104,7 +100,6 @@ _grow_loop $((168024*4096)) 1376452608 4096 1
 
 # Some other blocksize cases...
 _grow_loop $((168024*2048)) 1376452608 2048 1
-_grow_loop $((168024*512)) 1376452608 512 1 16m
 _grow_loop $((168024*1024)) 688230400 1024 1
 
 # Other corner cases suggested by dgc
diff --git a/tests/xfs/078.out b/tests/xfs/078.out
index cc3c47d13..7bf5ed03e 100644
--- a/tests/xfs/078.out
+++ b/tests/xfs/078.out
@@ -37,24 +37,6 @@ data blocks changed from 168024 to 672096
 *** unmount
 *** check
 
-=== GROWFS (from 86028288 to 1376452608, 512 blocksize)
-
-*** mkfs loop file (size=86028288)
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
-*** extend loop file
-wrote 512/512 bytes at offset 1376452608
-*** mount loop filesystem
-*** grow loop filesystem
-xfs_growfs --BlockSize=512 --Blocks=163840
-data blocks changed from 163840 to 2688384
-*** unmount
-*** check
-
 === GROWFS (from 172056576 to 688230400, 1024 blocksize)
 
 *** mkfs loop file (size=172056576)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 4/6] xfs/263: remove the nocrc sub-test
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
                   ` (2 preceding siblings ...)
  2024-04-08 13:32 ` [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-09 15:57   ` Darrick J. Wong
  2024-04-08 13:32 ` [PATCH 5/6] xfs/522: use reflink instead of crc as test feature Christoph Hellwig
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

Remove the test on nocrc file systems as v5 has been the default for 10
years and the kernel has made v4 support optional, which would fail this
sub-case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/263     |  5 ---
 tests/xfs/263.out | 85 -----------------------------------------------
 2 files changed, 90 deletions(-)

diff --git a/tests/xfs/263 b/tests/xfs/263
index bd30dab11..54e9355aa 100755
--- a/tests/xfs/263
+++ b/tests/xfs/263
@@ -66,11 +66,6 @@ function test_all_state()
 	done
 }
 
-echo "==== NO CRC ===="
-_scratch_mkfs_xfs "-m crc=0 -n ftype=0" >> $seqres.full
-test_all_state
-
-echo "==== CRC ===="
 _scratch_mkfs_xfs "-m crc=1" >>$seqres.full
 test_all_state
 
diff --git a/tests/xfs/263.out b/tests/xfs/263.out
index 531d45de5..64c1a5876 100644
--- a/tests/xfs/263.out
+++ b/tests/xfs/263.out
@@ -1,89 +1,4 @@
 QA output created by 263
-==== NO CRC ====
-== Options: rw ==
-== Options: usrquota,rw ==
-User quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Group quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Project quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Blocks grace time: [7 days]
-Inodes grace time: [7 days]
-Realtime Blocks grace time: [7 days]
-== Options: grpquota,rw ==
-User quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode #XXX (1 blocks, 1 extents)
-Group quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Project quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Blocks grace time: [7 days]
-Inodes grace time: [7 days]
-Realtime Blocks grace time: [7 days]
-== Options: usrquota,grpquota,rw ==
-User quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Group quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Project quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Blocks grace time: [7 days]
-Inodes grace time: [7 days]
-Realtime Blocks grace time: [7 days]
-== Options: prjquota,rw ==
-User quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode #XXX (1 blocks, 1 extents)
-Group quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Project quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Blocks grace time: [7 days]
-Inodes grace time: [7 days]
-Realtime Blocks grace time: [7 days]
-== Options: usrquota,prjquota,rw ==
-User quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Group quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: OFF
-  Enforcement: OFF
-  Inode: N/A
-Project quota state on SCRATCH_MNT (SCRATCH_DEV)
-  Accounting: ON
-  Enforcement: ON
-  Inode #XXX (1 blocks, 1 extents)
-Blocks grace time: [7 days]
-Inodes grace time: [7 days]
-Realtime Blocks grace time: [7 days]
-== Options: grpquota,prjquota,rw ==
-== Options: usrquota,grpquota,prjquota,rw ==
-==== CRC ====
 == Options: rw ==
 == Options: usrquota,rw ==
 User quota state on SCRATCH_MNT (SCRATCH_DEV)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 5/6] xfs/522: use reflink instead of crc as test feature
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
                   ` (3 preceding siblings ...)
  2024-04-08 13:32 ` [PATCH 4/6] xfs/263: remove the nocrc sub-test Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-09 15:39   ` Darrick J. Wong
  2024-04-08 13:32 ` [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported Christoph Hellwig
  2024-04-08 14:55 ` fix kernels without v5 support Zorro Lang
  6 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

Replace crc as the main test feature with reflink so that this test
do not require v4 file system support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/522 | 58 +++++++++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/tests/xfs/522 b/tests/xfs/522
index 2475d5844..05251b0e2 100755
--- a/tests/xfs/522
+++ b/tests/xfs/522
@@ -46,58 +46,58 @@ test_mkfs_config() {
 echo Simplest config file
 cat > $def_cfgfile << ENDL
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config $def_cfgfile
 
 echo Piped-in config file
 test_mkfs_config << ENDL
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc = 1
+reflink = 1
 ENDL
 
 echo Full line comment
 test_mkfs_config << ENDL
 # This is a full line comment.
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
  # This is a full line comment.
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
 #This is a full line comment.
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 
 echo End of line comment
 test_mkfs_config << ENDL
 [metadata]
-crc = 0 ; This is an eol comment.
+reflink = 0 ; This is an eol comment.
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc = 0 ;This is an eol comment.
+reflink = 0 ;This is an eol comment.
 ENDL
 
 echo Multiple directives
 test_mkfs_config << ENDL
 [metadata]
-crc = 0
+reflink = 0
 finobt = 0
 ENDL
 
 echo Multiple sections
 test_mkfs_config << ENDL
 [metadata]
-crc = 0
+reflink = 0
 
 [inode]
 sparse = 0
@@ -111,92 +111,92 @@ ENDL
 echo Space around the section name
 test_mkfs_config << ENDL
  [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
 [metadata] 
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
  [metadata] 
-crc = 0
+reflink = 0
 ENDL
 
 echo Single space around the key/value directive
 test_mkfs_config << ENDL
 [metadata]
- crc=0
+ reflink=0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc =0
+reflink =0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc= 0
+reflink= 0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc=0 
+reflink=0 
 ENDL
 
 echo Two spaces around the key/value directive
 test_mkfs_config << ENDL
 [metadata]
- crc =0
+ reflink =0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
- crc= 0
+ reflink= 0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
- crc=0 
+ reflink=0 
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc = 0
+reflink = 0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc =0 
+reflink =0 
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc= 0 
+reflink= 0 
 ENDL
 
 echo Three spaces around the key/value directive
 test_mkfs_config << ENDL
 [metadata]
- crc = 0
+ reflink = 0
 ENDL
 test_mkfs_config << ENDL
 [metadata]
- crc= 0 
+ reflink= 0 
 ENDL
 test_mkfs_config << ENDL
 [metadata]
-crc = 0 
+reflink = 0 
 ENDL
 
 echo Four spaces around the key/value directive
 test_mkfs_config << ENDL
 [metadata]
- crc = 0 
+ reflink = 0 
 ENDL
 
 echo Arbitrary spaces and tabs
 test_mkfs_config << ENDL
 [metadata]
-	  crc 	  	=   	  	 0	  	 	  
+	  reflink 	  	=   	  	 0	  	 	  
 ENDL
 
 echo ambiguous comment/section names
 test_mkfs_config << ENDL
 [metadata]
 #[data]
-crc = 0
+reflink = 0
 ENDL
 
 echo ambiguous comment/variable names
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
                   ` (4 preceding siblings ...)
  2024-04-08 13:32 ` [PATCH 5/6] xfs/522: use reflink instead of crc as test feature Christoph Hellwig
@ 2024-04-08 13:32 ` Christoph Hellwig
  2024-04-09 15:56   ` Darrick J. Wong
  2024-04-08 14:55 ` fix kernels without v5 support Zorro Lang
  6 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 13:32 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Darrick J . Wong , linux-xfs, fstests

Add a _require_xfs_nocrc helper that checks that we can mkfs and mount
a crc=0 file systems before running tests that rely on it to avoid failures
on kernels with CONFIG_XFS_SUPPORT_V4 disabled.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/xfs    | 10 ++++++++++
 tests/xfs/002 |  1 +
 tests/xfs/045 |  1 +
 tests/xfs/095 |  1 +
 tests/xfs/132 |  1 +
 tests/xfs/148 |  2 ++
 tests/xfs/158 |  1 +
 tests/xfs/160 |  1 +
 tests/xfs/194 |  2 ++
 tests/xfs/199 |  1 +
 tests/xfs/300 |  1 +
 tests/xfs/513 |  1 +
 tests/xfs/526 |  1 +
 13 files changed, 24 insertions(+)

diff --git a/common/xfs b/common/xfs
index 49ca5a2d5..733c3a5be 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1852,3 +1852,13 @@ _xfs_discard_max_offset_kb()
 	$XFS_IO_PROG -c 'statfs' "$1" | \
 		awk '{g[$1] = $3} END {print (g["geom.bsize"] * g["geom.datablocks"] / 1024)}'
 }
+
+# check if mkfs and the kernel support nocrc (v4) file systems
+_require_xfs_nocrc()
+{
+	_scratch_mkfs_xfs -m crc=0 > /dev/null 2>&1 || \
+		_notrun "v4 file systems not supported"
+	_try_scratch_mount > /dev/null 2>&1 || \
+		_notrun "v4 file systems not supported"
+	_scratch_unmount
+}
diff --git a/tests/xfs/002 b/tests/xfs/002
index 8dfd2693b..26d0cd6e4 100755
--- a/tests/xfs/002
+++ b/tests/xfs/002
@@ -23,6 +23,7 @@ _begin_fstest auto quick growfs
 _supported_fs xfs
 _require_scratch_nocheck
 _require_no_large_scratch_dev
+_require_xfs_nocrc
 
 _scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
 
diff --git a/tests/xfs/045 b/tests/xfs/045
index d8cc9ac29..69531ba71 100755
--- a/tests/xfs/045
+++ b/tests/xfs/045
@@ -22,6 +22,7 @@ _supported_fs xfs
 
 _require_test
 _require_scratch_nocheck
+_require_xfs_nocrc
 
 echo "*** get uuid"
 uuid=`_get_existing_uuid`
diff --git a/tests/xfs/095 b/tests/xfs/095
index a3891c85e..e7dc3e9f4 100755
--- a/tests/xfs/095
+++ b/tests/xfs/095
@@ -19,6 +19,7 @@ _begin_fstest log v2log auto
 _supported_fs xfs
 _require_scratch
 _require_v2log
+_require_xfs_nocrc
 
 if [ "$(blockdev --getss $SCRATCH_DEV)" != "512" ]; then
 	_notrun "need 512b sector size"
diff --git a/tests/xfs/132 b/tests/xfs/132
index ee1c8c1ec..b46d3d28c 100755
--- a/tests/xfs/132
+++ b/tests/xfs/132
@@ -19,6 +19,7 @@ _supported_fs xfs
 
 # we intentionally corrupt the filesystem, so don't check it after the test
 _require_scratch_nocheck
+_require_xfs_nocrc
 
 # on success, we'll get a shutdown filesystem with a really noisy log message
 # due to transaction cancellation.  Hence we don't want to check dmesg here.
diff --git a/tests/xfs/148 b/tests/xfs/148
index c9f634cfd..72d05f12f 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -27,6 +27,8 @@ _cleanup()
 _supported_fs xfs
 _require_test
 _require_attrs
+_require_xfs_nocrc
+
 _disable_dmesg_check
 
 imgfile=$TEST_DIR/img-$seq
diff --git a/tests/xfs/158 b/tests/xfs/158
index 4440adf6e..0107fa3d6 100755
--- a/tests/xfs/158
+++ b/tests/xfs/158
@@ -18,6 +18,7 @@ _supported_fs xfs
 _require_scratch_xfs_inobtcount
 _require_command "$XFS_ADMIN_PROG" "xfs_admin"
 _require_xfs_repair_upgrade inobtcount
+_require_xfs_nocrc
 
 # Make sure we can't format a filesystem with inobtcount and not finobt.
 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \
diff --git a/tests/xfs/160 b/tests/xfs/160
index 399fe4bcf..134b38a18 100755
--- a/tests/xfs/160
+++ b/tests/xfs/160
@@ -18,6 +18,7 @@ _supported_fs xfs
 _require_command "$XFS_ADMIN_PROG" "xfs_admin"
 _require_scratch_xfs_bigtime
 _require_xfs_repair_upgrade bigtime
+_require_xfs_nocrc
 
 date --date='Jan 1 00:00:00 UTC 2040' > /dev/null 2>&1 || \
 	_notrun "Userspace does not support dates past 2038."
diff --git a/tests/xfs/194 b/tests/xfs/194
index 5a1dff5d2..2ef9403bb 100755
--- a/tests/xfs/194
+++ b/tests/xfs/194
@@ -30,6 +30,8 @@ _supported_fs xfs
 # real QA test starts here
 
 _require_scratch
+_require_xfs_nocrc
+
 _scratch_mkfs_xfs >/dev/null 2>&1
 
 # For this test we use block size = 1/8 page size
diff --git a/tests/xfs/199 b/tests/xfs/199
index 4669f2c3e..f99b04db3 100755
--- a/tests/xfs/199
+++ b/tests/xfs/199
@@ -26,6 +26,7 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
+_require_xfs_nocrc
 
 # clear any mkfs options so that we can directly specify the options we need to
 # be able to test the features bitmask behaviour correctly.
diff --git a/tests/xfs/300 b/tests/xfs/300
index 2ee5eee71..bc1f0efc6 100755
--- a/tests/xfs/300
+++ b/tests/xfs/300
@@ -13,6 +13,7 @@ _begin_fstest auto fsr
 . ./common/filter
 
 _require_scratch
+_require_xfs_nocrc
 
 # real QA test starts here
 
diff --git a/tests/xfs/513 b/tests/xfs/513
index ce2bb3491..42eceeb90 100755
--- a/tests/xfs/513
+++ b/tests/xfs/513
@@ -37,6 +37,7 @@ _fixed_by_kernel_commit 237d7887ae72 \
 _require_test
 _require_loop
 _require_xfs_io_command "falloc"
+_require_xfs_nocrc
 
 LOOP_IMG=$TEST_DIR/$seq.dev
 LOOP_SPARE_IMG=$TEST_DIR/$seq.logdev
diff --git a/tests/xfs/526 b/tests/xfs/526
index 4261e8497..188d0d514 100755
--- a/tests/xfs/526
+++ b/tests/xfs/526
@@ -26,6 +26,7 @@ _supported_fs xfs
 _require_test
 _require_scratch_nocheck
 _require_xfs_mkfs_cfgfile
+_require_xfs_nocrc
 
 cfgfile=$TEST_DIR/a
 rm -rf $cfgfile
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
                   ` (5 preceding siblings ...)
  2024-04-08 13:32 ` [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported Christoph Hellwig
@ 2024-04-08 14:55 ` Zorro Lang
  2024-04-08 14:59   ` Christoph Hellwig
  6 siblings, 1 reply; 30+ messages in thread
From: Zorro Lang @ 2024-04-08 14:55 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:37PM +0200, Christoph Hellwig wrote:
> Hi all,
> 
> this series ensures tests pass on kernels without v5 support.  As a side
> effect it also removes support for historic kernels and xfsprogs without
> any v5 support, and without mkfs input validation.

Thanks for doing this! I'm wondering if fstests should do this "removing"
earlier than xfs? Hope to hear more opinions from xfs list and other fstests
users (especially from some LTS distro) :)

Thanks,
Zorro

> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-08 14:55 ` fix kernels without v5 support Zorro Lang
@ 2024-04-08 14:59   ` Christoph Hellwig
  2024-04-08 19:00     ` Zorro Lang
  0 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 14:59 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Christoph Hellwig, Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Mon, Apr 08, 2024 at 10:55:54PM +0800, Zorro Lang wrote:
> > this series ensures tests pass on kernels without v5 support.  As a side
> > effect it also removes support for historic kernels and xfsprogs without
> > any v5 support, and without mkfs input validation.
> 
> Thanks for doing this! I'm wondering if fstests should do this "removing"
> earlier than xfs? Hope to hear more opinions from xfs list and other fstests
> users (especially from some LTS distro) :)

What is being removed is support for kernels and xfsprogs that do not
support v5 file systems at all, not testing on v4 file system for the
test device and the large majority of tests using the scratch device
without specifying an explicit version.

The exception from the above are two sub-cases for v4 that are removed in
the this series - if we really care about them I could move them into
separate tests, but I doubt it's worth it.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
@ 2024-04-08 15:03   ` Eric Biggers
  2024-04-08 15:04     ` Christoph Hellwig
  2024-04-09 15:26   ` Darrick J. Wong
  2024-04-29  9:34   ` Chandan Babu R
  2 siblings, 1 reply; 30+ messages in thread
From: Eric Biggers @ 2024-04-08 15:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:38PM +0200, Christoph Hellwig wrote:
> xfs: remove support for tools and kernels with v5 support

I think you mean tools and kernels *without* v5 support.

- Eric

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-08 15:03   ` Eric Biggers
@ 2024-04-08 15:04     ` Christoph Hellwig
  0 siblings, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-08 15:04 UTC (permalink / raw)
  To: Eric Biggers
  Cc: Christoph Hellwig, Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Mon, Apr 08, 2024 at 11:03:03AM -0400, Eric Biggers wrote:
> On Mon, Apr 08, 2024 at 03:32:38PM +0200, Christoph Hellwig wrote:
> > xfs: remove support for tools and kernels with v5 support
> 
> I think you mean tools and kernels *without* v5 support.

Yes.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-08 14:59   ` Christoph Hellwig
@ 2024-04-08 19:00     ` Zorro Lang
  2024-04-10 14:42       ` Zorro Lang
  0 siblings, 1 reply; 30+ messages in thread
From: Zorro Lang @ 2024-04-08 19:00 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Mon, Apr 08, 2024 at 04:59:39PM +0200, Christoph Hellwig wrote:
> On Mon, Apr 08, 2024 at 10:55:54PM +0800, Zorro Lang wrote:
> > > this series ensures tests pass on kernels without v5 support.  As a side
> > > effect it also removes support for historic kernels and xfsprogs without
> > > any v5 support, and without mkfs input validation.
> > 
> > Thanks for doing this! I'm wondering if fstests should do this "removing"
> > earlier than xfs? Hope to hear more opinions from xfs list and other fstests
> > users (especially from some LTS distro) :)
> 
> What is being removed is support for kernels and xfsprogs that do not
> support v5 file systems at all, not testing on v4 file system for the
> test device and the large majority of tests using the scratch device
> without specifying an explicit version.

Sure, I think most of systems testing doesn't need this, except some old
LTS distros.

> 
> The exception from the above are two sub-cases for v4 that are removed in
> the this series - if we really care about them I could move them into
> separate tests, but I doubt it's worth it.

Let me check and test this patchset more, before acking it. And give some
time to get more review. Thanks for this patchset!

Thanks,
Zorro

> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
  2024-04-08 15:03   ` Eric Biggers
@ 2024-04-09 15:26   ` Darrick J. Wong
  2024-04-29  9:34   ` Chandan Babu R
  2 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:26 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:38PM +0200, Christoph Hellwig wrote:
> v5 file systems have been the default for more than 10 years.  Drop
> support for non-v5 enabled kernels and xfsprogs.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Seems fine to me.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  common/config | 13 -------------
>  common/xfs    | 26 --------------------------
>  tests/xfs/002 |  3 ---
>  tests/xfs/005 |  1 -
>  tests/xfs/077 |  1 -
>  tests/xfs/083 |  2 --
>  tests/xfs/132 |  1 -
>  tests/xfs/148 |  1 -
>  tests/xfs/263 |  5 -----
>  tests/xfs/299 |  2 --
>  tests/xfs/304 |  2 --
>  tests/xfs/305 |  2 --
>  12 files changed, 59 deletions(-)
> 
> diff --git a/common/config b/common/config
> index 2a1434bb1..6a0496fdd 100644
> --- a/common/config
> +++ b/common/config
> @@ -329,19 +329,6 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
>  	export SELINUX_MOUNT_OPTIONS
>  fi
>  
> -# check if mkfs.xfs supports v5 xfs
> -if [ "$FSTYP" == "xfs" ]; then
> -	XFS_MKFS_HAS_NO_META_SUPPORT=""
> -	touch /tmp/crc_check.img
> -	$MKFS_XFS_PROG -N -d file,name=/tmp/crc_check.img,size=32m -m crc=0 \
> -		>/dev/null 2>&1;
> -	if [ $? -ne 0 ]; then
> -		XFS_MKFS_HAS_NO_META_SUPPORT=true
> -	fi
> -	rm -f /tmp/crc_check.img
> -	export XFS_MKFS_HAS_NO_META_SUPPORT
> -fi
> -
>  _common_mount_opts()
>  {
>  	case $FSTYP in
> diff --git a/common/xfs b/common/xfs
> index 65b509691..57d21762c 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -59,11 +59,6 @@ _scratch_mkfs_xfs_opts()
>  {
>  	mkfs_opts=$*
>  
> -	# remove metadata related mkfs options if mkfs.xfs doesn't them
> -	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
> -		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
> -	fi
> -
>  	_scratch_options mkfs
>  
>  	echo "$MKFS_XFS_PROG $SCRATCH_OPTIONS $mkfs_opts"
> @@ -439,24 +434,6 @@ _require_projid16bit()
>  	   || _notrun "16 bit project IDs not supported on $SCRATCH_DEV"
>  }
>  
> -# this test requires the crc feature to be available in mkfs.xfs
> -#
> -_require_xfs_mkfs_crc()
> -{
> -	_scratch_mkfs_xfs_supported -m crc=1 >/dev/null 2>&1 \
> -	   || _notrun "mkfs.xfs doesn't have crc feature"
> -}
> -
> -# this test requires the xfs kernel support crc feature
> -#
> -_require_xfs_crc()
> -{
> -	_scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
> -	_try_scratch_mount >/dev/null 2>&1 \
> -	   || _notrun "Kernel doesn't support crc feature"
> -	_scratch_unmount
> -}
> -
>  # If the xfs_info output for the given XFS filesystem mount mentions the given
>  # feature.  If so, return 0 for success.  If not, return 1 for failure.  If the
>  # third option is -v, echo 1 for success and 0 for not.
> @@ -1268,9 +1245,6 @@ _require_scratch_xfs_shrink()
>  #
>  _require_meta_uuid()
>  {
> -	# This will create a crc fs on $SCRATCH_DEV
> -	_require_xfs_crc
> -
>  	_scratch_xfs_db -x -c "uuid restore" 2>&1 \
>  	   | grep -q "invalid UUID\|supported on V5 fs" \
>  	   && _notrun "Userspace doesn't support meta_uuid feature"
> diff --git a/tests/xfs/002 b/tests/xfs/002
> index 6c0bb4d04..8dfd2693b 100755
> --- a/tests/xfs/002
> +++ b/tests/xfs/002
> @@ -24,9 +24,6 @@ _supported_fs xfs
>  _require_scratch_nocheck
>  _require_no_large_scratch_dev
>  
> -# So we can explicitly turn it _off_:
> -_require_xfs_mkfs_crc
> -
>  _scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
>  
>  # Scribble past a couple V4 secondary superblocks to populate sb_crc
> diff --git a/tests/xfs/005 b/tests/xfs/005
> index 5f1ab8348..019790295 100755
> --- a/tests/xfs/005
> +++ b/tests/xfs/005
> @@ -20,7 +20,6 @@ _begin_fstest auto quick
>  _supported_fs xfs
>  
>  _require_scratch_nocheck
> -_require_xfs_mkfs_crc
>  
>  _scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
>  
> diff --git a/tests/xfs/077 b/tests/xfs/077
> index f24f6f004..37ea931f1 100755
> --- a/tests/xfs/077
> +++ b/tests/xfs/077
> @@ -24,7 +24,6 @@ _supported_fs xfs
>  _require_xfs_copy
>  _require_scratch
>  _require_no_large_scratch_dev
> -_require_xfs_crc
>  _require_meta_uuid
>  
>  # Takes 2 args, 2nd optional:
> diff --git a/tests/xfs/083 b/tests/xfs/083
> index edab3b7b0..e8ce2221c 100755
> --- a/tests/xfs/083
> +++ b/tests/xfs/083
> @@ -28,8 +28,6 @@ _cleanup()
>  _supported_fs xfs
>  
>  _require_scratch
> -#_require_xfs_crc	# checksum not required, but you probably want it anyway...
> -#_require_xfs_mkfs_crc
>  _require_attrs
>  _require_populate_commands
>  
> diff --git a/tests/xfs/132 b/tests/xfs/132
> index fa36c09c2..ee1c8c1ec 100755
> --- a/tests/xfs/132
> +++ b/tests/xfs/132
> @@ -24,7 +24,6 @@ _require_scratch_nocheck
>  # due to transaction cancellation.  Hence we don't want to check dmesg here.
>  _disable_dmesg_check
>  
> -_require_xfs_mkfs_crc
>  _scratch_mkfs -m crc=0 > $seqres.full 2>&1
>  
>  # The files that EIO in the golden output changes if we have quotas enabled
> diff --git a/tests/xfs/148 b/tests/xfs/148
> index 5d0a0bf42..c9f634cfd 100755
> --- a/tests/xfs/148
> +++ b/tests/xfs/148
> @@ -27,7 +27,6 @@ _cleanup()
>  _supported_fs xfs
>  _require_test
>  _require_attrs
> -_require_xfs_mkfs_crc
>  _disable_dmesg_check
>  
>  imgfile=$TEST_DIR/img-$seq
> diff --git a/tests/xfs/263 b/tests/xfs/263
> index bce4e13f9..bd30dab11 100755
> --- a/tests/xfs/263
> +++ b/tests/xfs/263
> @@ -21,11 +21,6 @@ _supported_fs xfs
>  _require_scratch
>  _require_xfs_quota
>  
> -# We could test older, non-project capable kernels but keep it simpler;
> -# Only test crc and beyond (but we will test with and without the feature)
> -_require_xfs_mkfs_crc
> -_require_xfs_crc
> -
>  function option_string()
>  {
>  	VAL=$1
> diff --git a/tests/xfs/299 b/tests/xfs/299
> index 4b9df3c6a..1df1988ac 100755
> --- a/tests/xfs/299
> +++ b/tests/xfs/299
> @@ -31,8 +31,6 @@ chmod a+rwx $seqres.full	# arbitrary users will write here
>  
>  _require_scratch
>  _require_xfs_quota
> -_require_xfs_mkfs_crc
> -_require_xfs_crc
>  
>  # The actual point at which limit enforcement takes place for the
>  # hard block limit is variable depending on filesystem blocksize,
> diff --git a/tests/xfs/304 b/tests/xfs/304
> index 3c38e6132..0ee6dad63 100755
> --- a/tests/xfs/304
> +++ b/tests/xfs/304
> @@ -19,8 +19,6 @@ _supported_fs xfs
>  
>  _require_scratch
>  _require_xfs_quota
> -_require_xfs_mkfs_crc
> -_require_xfs_crc
>  
>  _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
>  
> diff --git a/tests/xfs/305 b/tests/xfs/305
> index d8a6712e5..e76dfdec1 100755
> --- a/tests/xfs/305
> +++ b/tests/xfs/305
> @@ -19,8 +19,6 @@ _supported_fs xfs
>  
>  _require_scratch
>  _require_xfs_quota
> -_require_xfs_mkfs_crc
> -_require_xfs_crc
>  _require_command "$KILLALL_PROG" killall
>  
>  _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/6] remove xfs/096
  2024-04-08 13:32 ` [PATCH 2/6] remove xfs/096 Christoph Hellwig
@ 2024-04-09 15:27   ` Darrick J. Wong
  0 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:27 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:39PM +0200, Christoph Hellwig wrote:
> This test exercises mkfs error handling before strict validation was added
> and thus is useless for xfsprogs > 4.5.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Yesssssssss decruftifying. :)
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  .gitignore                 |   1 -
>  common/xfs                 |   9 ---
>  tests/xfs/096              | 130 -------------------------------------
>  tests/xfs/096.out.external |  50 --------------
>  tests/xfs/096.out.internal |  51 ---------------
>  5 files changed, 241 deletions(-)
>  delete mode 100755 tests/xfs/096
>  delete mode 100644 tests/xfs/096.out.external
>  delete mode 100644 tests/xfs/096.out.internal
> 
> diff --git a/.gitignore b/.gitignore
> index 3b160209a..51cda513d 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -211,7 +211,6 @@ tags
>  /tests/generic/050.out
>  /tests/xfs/033.out
>  /tests/xfs/071.out
> -/tests/xfs/096.out
>  /tests/xfs/216.out
>  
>  # cscope files
> diff --git a/common/xfs b/common/xfs
> index 57d21762c..49ca5a2d5 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -1211,15 +1211,6 @@ _require_xfs_mkfs_validation()
>  	fi
>  }
>  
> -# The opposite of _require_xfs_mkfs_validation.
> -_require_xfs_mkfs_without_validation()
> -{
> -	_xfs_mkfs_validation_check
> -	if [ "$?" -ne 0 ]; then
> -		_notrun "Requires older mkfs without strict input checks: the last supported version of xfsprogs is 4.5."
> -	fi
> -}
> -
>  _require_scratch_xfs_shrink()
>  {
>  	_require_scratch
> diff --git a/tests/xfs/096 b/tests/xfs/096
> deleted file mode 100755
> index a7a5444f8..000000000
> --- a/tests/xfs/096
> +++ /dev/null
> @@ -1,130 +0,0 @@
> -#! /bin/bash
> -# SPDX-License-Identifier: GPL-2.0
> -# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
> -#
> -# FS QA Test No. 096
> -#
> -# test out mkfs_xfs output on IRIX/Linux and some of its error handling
> -# ensure pv#920679 is addressed
> -#
> -seqfull=$0
> -. ./common/preamble
> -_begin_fstest mkfs v2log auto quick
> -
> -# Import common functions.
> -. ./common/filter
> -. ./common/log
> -
> -#
> -# filter out counts which will vary
> -#   - extsz, blocks, agsize, agcount, device name, rtextents
> -#   - log version varies for crc enabled fs
> -#   - lsunit varies for 512/4k sector devices
> -# filter out differences between linux and irix:
> -#   - sectsz on Linux
> -#   - mmr, mixed-case on IRIX
> -#   - lazy-count on IRIX
> -#   - inode-paths on IRIX
> -#   - trailing spaces on Linux but not on IRIX
> -#
> -# Example output:
> -#  meta-data=DEV isize=256    agcount=N, agsize=N blks
> -#  data     =                       bsize=4096   blocks=N, imaxpct=25
> -#           =                       sunit=65     swidth=65 blks, unwritten=1
> -#  naming   =version 2              bsize=4096
> -#  log      =internal log           bsize=4096   blocks=N, version=1
> -#           =                       sunit=0 blks
> -#  realtime =none                   extsz=65536  blocks=N, rtextents=N
> -#
> -mkfs_filter()
> -{
> -   tee -a $seqres.full | \
> -   sed \
> -	-e 's/extsz=[0-9][0-9]*[ ]*/extsz=N, /' \
> -	-e 's/blocks=[0-9][0-9]*/blocks=N/' \
> -	-e 's/imaxpct=[0-9][0-9]*/imaxpct=N/' \
> -	-e 's/agsize=[0-9][0-9]*/agsize=N/' \
> -	-e 's/agcount=[0-9][0-9]*/agcount=N/' \
> -        -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=[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]//' \
> -	-e 's/ *ascii-ci=[01]//' \
> -	-e 's/\(version=\)\([12]\)/\1N/' \
> -	-e 's/\(sunit=\)\([018] blks\)/\1N blks/' \
> -	-e 's/sectsz=[0-9][0-9]* *//' \
> -	-e 's/, lazy-count.*//' \
> -	-e '/inode-paths/d' \
> -	-e 's/\(log[ 	]*=\).*bsize/\1LOG                    bsize/' \
> -	-e 's/\(realtime[ 	]*=\).*extsz/\1REALTIME               extsz/' \
> -	-e '/.*crc=/d' \
> -	-e 's/ *$//' \
> -	-e 's/ ftype=[01]//' \
> -	-e '/^log stripe unit.*too large/d' \
> -	-e '/^log stripe unit adjusted/d' \
> -	-e '/Discarding/d' \
> -   | grep -v parent
> -}
> -
> -# real QA test starts here
> -
> -# Modify as appropriate.
> -_supported_fs xfs
> -_require_scratch
> -_require_v2log
> -_require_xfs_mkfs_without_validation
> -
> -# choose .out file based on internal/external log
> -rm -f $seqfull.out
> -if [ "$USE_EXTERNAL" = yes ]; then
> -	ln -s $seq.out.external $seqfull.out
> -else
> -	ln -s $seq.out.internal $seqfull.out
> -fi
> -
> -# maximum log record size
> -max_lr_size=`expr 256 \* 1024`
> -
> -big_su=`expr $max_lr_size + 4096`
> -
> -#
> -# Test out various mkfs param combinations
> -#
> -cat >$tmp.seq.params <<EOF
> -# su too big but must be a multiple of fs block size too
> -  -l version=2,su=`expr $max_lr_size + 512`
> -# test log stripe greater than LR size
> -  -l version=2,su=$big_su
> -# same test but get log stripe from data stripe
> -  -l version=2 -d su=$big_su,sw=1
> -# test out data stripe
> -  -m crc=0 -l version=1 -d su=$big_su,sw=1
> -# test out data stripe the same but using sunit & swidth
> -  -m crc=0 -l version=1 -d sunit=`expr $big_su / 512`,swidth=`expr $big_su / 512`
> -EOF
> -
> -#
> -# call mkfs in a loop for various params
> -#
> -echo ""
> -cat $tmp.seq.params \
> -| while read mkfs
> -do
> -    if echo $mkfs | grep -q '^#'; then
> -        # print out header & ignore comment
> -	echo $mkfs
> -	continue
> -    fi
> -    echo "--- mkfs=$mkfs ---"
> -    export MKFS_OPTIONS="$mkfs"
> -    _scratch_mkfs_xfs 2>&1 | mkfs_filter
> -    echo ""
> -    echo ""
> -done
> -
> -# success, all done
> -status=0
> -exit
> diff --git a/tests/xfs/096.out.external b/tests/xfs/096.out.external
> deleted file mode 100644
> index 3122330ac..000000000
> --- a/tests/xfs/096.out.external
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -QA output created by 096
> -
> -# su too big but must be a multiple of fs block size too
> ---- mkfs=-l version=2,su=262656 ---
> -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=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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -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=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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> -# test out data stripe
> ---- 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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> -# test out data stripe the same but using sunit & swidth
> ---- 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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> diff --git a/tests/xfs/096.out.internal b/tests/xfs/096.out.internal
> deleted file mode 100644
> index 80201d25b..000000000
> --- a/tests/xfs/096.out.internal
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -QA output created by 096
> -
> -# su too big but must be a multiple of fs block size too
> ---- mkfs=-l version=2,su=262656 ---
> -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=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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -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=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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> -# test out data stripe
> ---- 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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> -# test out data stripe the same but using sunit & swidth
> ---- 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
> -log      =LOG                    bsize=4096   blocks=N, version=N
> -         =                       sunit=N blks
> -realtime =REALTIME               extsz=N, blocks=N, rtextents=N
> -
> -
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case
  2024-04-08 13:32 ` [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case Christoph Hellwig
@ 2024-04-09 15:32   ` Darrick J. Wong
  0 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:32 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:40PM +0200, Christoph Hellwig wrote:
> 512 byte block sizes are only supported for v4 file systems, and
> xfs/078 crudely forces use of v4 file systems for it.  This doesn't
> work if the kernel is built without v4 support.  Given that v4
> support is slowly being phased out and 512 byte block sizes have never
> been common, drop this part of the test.

I've long wondered just how many people actually used that blocksize...

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/xfs/078     |  9 ++-------
>  tests/xfs/078.out | 18 ------------------
>  2 files changed, 2 insertions(+), 25 deletions(-)
> 
> diff --git a/tests/xfs/078 b/tests/xfs/078
> index 1f475c963..501551e5e 100755
> --- a/tests/xfs/078
> +++ b/tests/xfs/078
> @@ -69,12 +69,8 @@ _grow_loop()
>  	echo
>  
>  	echo "*** mkfs loop file (size=$original)"
> -	mkfs_crc_opts=""
> -	if [ $bsize -lt 1024 -a -z "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
> -		mkfs_crc_opts="-m crc=0"
> -	fi

...because this was particularly nasty.  Why wouldn't this test have
skipped this iteration if the fs config doesn't support 512 blocksizes?

Who cares.  Anyway,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> -	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
> -		| _filter_mkfs 2>/dev/null
> +	$MKFS_XFS_PROG -b size=$bsize $dparam $LOOP_DEV | \
> +		_filter_mkfs 2>/dev/null
>  
>  	echo "*** extend loop file"
>  	_destroy_loop_device $LOOP_DEV
> @@ -104,7 +100,6 @@ _grow_loop $((168024*4096)) 1376452608 4096 1
>  
>  # Some other blocksize cases...
>  _grow_loop $((168024*2048)) 1376452608 2048 1
> -_grow_loop $((168024*512)) 1376452608 512 1 16m
>  _grow_loop $((168024*1024)) 688230400 1024 1
>  
>  # Other corner cases suggested by dgc
> diff --git a/tests/xfs/078.out b/tests/xfs/078.out
> index cc3c47d13..7bf5ed03e 100644
> --- a/tests/xfs/078.out
> +++ b/tests/xfs/078.out
> @@ -37,24 +37,6 @@ data blocks changed from 168024 to 672096
>  *** unmount
>  *** check
>  
> -=== GROWFS (from 86028288 to 1376452608, 512 blocksize)
> -
> -*** mkfs loop file (size=86028288)
> -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
> -data     = bsize=XXX blocks=XXX, imaxpct=PCT
> -         = sunit=XXX swidth=XXX, unwritten=X
> -naming   =VERN bsize=XXX
> -log      =LDEV bsize=XXX blocks=XXX
> -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
> -*** extend loop file
> -wrote 512/512 bytes at offset 1376452608
> -*** mount loop filesystem
> -*** grow loop filesystem
> -xfs_growfs --BlockSize=512 --Blocks=163840
> -data blocks changed from 163840 to 2688384
> -*** unmount
> -*** check
> -
>  === GROWFS (from 172056576 to 688230400, 1024 blocksize)
>  
>  *** mkfs loop file (size=172056576)
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 5/6] xfs/522: use reflink instead of crc as test feature
  2024-04-08 13:32 ` [PATCH 5/6] xfs/522: use reflink instead of crc as test feature Christoph Hellwig
@ 2024-04-09 15:39   ` Darrick J. Wong
  0 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:39 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:42PM +0200, Christoph Hellwig wrote:
> Replace crc as the main test feature with reflink so that this test
> do not require v4 file system support.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Pretty straight conversion, so
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/522 | 58 +++++++++++++++++++++++++--------------------------
>  1 file changed, 29 insertions(+), 29 deletions(-)
> 
> diff --git a/tests/xfs/522 b/tests/xfs/522
> index 2475d5844..05251b0e2 100755
> --- a/tests/xfs/522
> +++ b/tests/xfs/522
> @@ -46,58 +46,58 @@ test_mkfs_config() {
>  echo Simplest config file
>  cat > $def_cfgfile << ENDL
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config $def_cfgfile
>  
>  echo Piped-in config file
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 1
> +reflink = 1
>  ENDL
>  
>  echo Full line comment
>  test_mkfs_config << ENDL
>  # This is a full line comment.
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>   # This is a full line comment.
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>  #This is a full line comment.
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  
>  echo End of line comment
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0 ; This is an eol comment.
> +reflink = 0 ; This is an eol comment.
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0 ;This is an eol comment.
> +reflink = 0 ;This is an eol comment.
>  ENDL
>  
>  echo Multiple directives
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0
> +reflink = 0
>  finobt = 0
>  ENDL
>  
>  echo Multiple sections
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0
> +reflink = 0
>  
>  [inode]
>  sparse = 0
> @@ -111,92 +111,92 @@ ENDL
>  echo Space around the section name
>  test_mkfs_config << ENDL
>   [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata] 
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>   [metadata] 
> -crc = 0
> +reflink = 0
>  ENDL
>  
>  echo Single space around the key/value directive
>  test_mkfs_config << ENDL
>  [metadata]
> - crc=0
> + reflink=0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc =0
> +reflink =0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc= 0
> +reflink= 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc=0 
> +reflink=0 
>  ENDL
>  
>  echo Two spaces around the key/value directive
>  test_mkfs_config << ENDL
>  [metadata]
> - crc =0
> + reflink =0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> - crc= 0
> + reflink= 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> - crc=0 
> + reflink=0 
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0
> +reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc =0 
> +reflink =0 
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc= 0 
> +reflink= 0 
>  ENDL
>  
>  echo Three spaces around the key/value directive
>  test_mkfs_config << ENDL
>  [metadata]
> - crc = 0
> + reflink = 0
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> - crc= 0 
> + reflink= 0 
>  ENDL
>  test_mkfs_config << ENDL
>  [metadata]
> -crc = 0 
> +reflink = 0 
>  ENDL
>  
>  echo Four spaces around the key/value directive
>  test_mkfs_config << ENDL
>  [metadata]
> - crc = 0 
> + reflink = 0 
>  ENDL
>  
>  echo Arbitrary spaces and tabs
>  test_mkfs_config << ENDL
>  [metadata]
> -	  crc 	  	=   	  	 0	  	 	  
> +	  reflink 	  	=   	  	 0	  	 	  
>  ENDL
>  
>  echo ambiguous comment/section names
>  test_mkfs_config << ENDL
>  [metadata]
>  #[data]
> -crc = 0
> +reflink = 0
>  ENDL
>  
>  echo ambiguous comment/variable names
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported
  2024-04-08 13:32 ` [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported Christoph Hellwig
@ 2024-04-09 15:56   ` Darrick J. Wong
  2024-04-10  4:14     ` Christoph Hellwig
  0 siblings, 1 reply; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:56 UTC (permalink / raw)
  To: Christoph Hellwig, Eric Sandeen; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:43PM +0200, Christoph Hellwig wrote:
> Add a _require_xfs_nocrc helper that checks that we can mkfs and mount
> a crc=0 file systems before running tests that rely on it to avoid failures
> on kernels with CONFIG_XFS_SUPPORT_V4 disabled.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  common/xfs    | 10 ++++++++++
>  tests/xfs/002 |  1 +

Looks fine to me.

>  tests/xfs/045 |  1 +

xfs_db can change uuids on v5 filesystems now, so we don't nee the
-mcrc=0 in this test.

>  tests/xfs/095 |  1 +
>  tests/xfs/132 |  1 +

Looks fine to me.

>  tests/xfs/148 |  2 ++

I wonder if we could rewrite this test to use either the xfs_db write -d
command on dirents or attrs directly; or the link/attrset commands,
since AFAICT the dir/attr code doesn't itself run namecheck when
creating entries/attrs.

>  tests/xfs/158 |  1 +
>  tests/xfs/160 |  1 +

inobtcount and bigtime are new features, maybe these two tests should
lose the clause that checks that we can't upgrade a V4 filesystem?

>  tests/xfs/194 |  2 ++

Not sure why this one is fixated on $pagesize/8.  Was that a requirement
to induce an error?  Or would this work just as well on a 1k fsblock fs?

(Eric?)

>  tests/xfs/199 |  1 +
>  tests/xfs/300 |  1 +

Looks fine to me.

>  tests/xfs/513 |  1 +

I think we should split this into separate tests for V4/V5 options and
only _require_xfs_nocrc the one with V4 options, because I wouldn't want
to stop testing V5 codepaths simply because someone turned off V4
support in the kernle.

>  tests/xfs/526 |  1 +

I'm at a loss on this one -- what it does is useful, but there aren't
any V5 mkfs options that conflict as nicely as crc=0 does.

>  13 files changed, 24 insertions(+)
> 
> diff --git a/common/xfs b/common/xfs
> index 49ca5a2d5..733c3a5be 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -1852,3 +1852,13 @@ _xfs_discard_max_offset_kb()
>  	$XFS_IO_PROG -c 'statfs' "$1" | \
>  		awk '{g[$1] = $3} END {print (g["geom.bsize"] * g["geom.datablocks"] / 1024)}'
>  }
> +
> +# check if mkfs and the kernel support nocrc (v4) file systems
> +_require_xfs_nocrc()
> +{
> +	_scratch_mkfs_xfs -m crc=0 > /dev/null 2>&1 || \
> +		_notrun "v4 file systems not supported"
> +	_try_scratch_mount > /dev/null 2>&1 || \
> +		_notrun "v4 file systems not supported"
> +	_scratch_unmount
> +}
> diff --git a/tests/xfs/002 b/tests/xfs/002
> index 8dfd2693b..26d0cd6e4 100755
> --- a/tests/xfs/002
> +++ b/tests/xfs/002
> @@ -23,6 +23,7 @@ _begin_fstest auto quick growfs
>  _supported_fs xfs
>  _require_scratch_nocheck
>  _require_no_large_scratch_dev
> +_require_xfs_nocrc
>  
>  _scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
>  
> diff --git a/tests/xfs/045 b/tests/xfs/045
> index d8cc9ac29..69531ba71 100755
> --- a/tests/xfs/045
> +++ b/tests/xfs/045
> @@ -22,6 +22,7 @@ _supported_fs xfs
>  
>  _require_test
>  _require_scratch_nocheck
> +_require_xfs_nocrc
>  
>  echo "*** get uuid"
>  uuid=`_get_existing_uuid`
> diff --git a/tests/xfs/095 b/tests/xfs/095
> index a3891c85e..e7dc3e9f4 100755
> --- a/tests/xfs/095
> +++ b/tests/xfs/095
> @@ -19,6 +19,7 @@ _begin_fstest log v2log auto
>  _supported_fs xfs
>  _require_scratch
>  _require_v2log
> +_require_xfs_nocrc
>  
>  if [ "$(blockdev --getss $SCRATCH_DEV)" != "512" ]; then
>  	_notrun "need 512b sector size"
> diff --git a/tests/xfs/132 b/tests/xfs/132
> index ee1c8c1ec..b46d3d28c 100755
> --- a/tests/xfs/132
> +++ b/tests/xfs/132
> @@ -19,6 +19,7 @@ _supported_fs xfs
>  
>  # we intentionally corrupt the filesystem, so don't check it after the test
>  _require_scratch_nocheck
> +_require_xfs_nocrc
>  
>  # on success, we'll get a shutdown filesystem with a really noisy log message
>  # due to transaction cancellation.  Hence we don't want to check dmesg here.
> diff --git a/tests/xfs/148 b/tests/xfs/148
> index c9f634cfd..72d05f12f 100755
> --- a/tests/xfs/148
> +++ b/tests/xfs/148
> @@ -27,6 +27,8 @@ _cleanup()
>  _supported_fs xfs
>  _require_test
>  _require_attrs
> +_require_xfs_nocrc
> +
>  _disable_dmesg_check
>  
>  imgfile=$TEST_DIR/img-$seq
> diff --git a/tests/xfs/158 b/tests/xfs/158
> index 4440adf6e..0107fa3d6 100755
> --- a/tests/xfs/158
> +++ b/tests/xfs/158
> @@ -18,6 +18,7 @@ _supported_fs xfs
>  _require_scratch_xfs_inobtcount
>  _require_command "$XFS_ADMIN_PROG" "xfs_admin"
>  _require_xfs_repair_upgrade inobtcount
> +_require_xfs_nocrc
>  
>  # Make sure we can't format a filesystem with inobtcount and not finobt.
>  _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \
> diff --git a/tests/xfs/160 b/tests/xfs/160
> index 399fe4bcf..134b38a18 100755
> --- a/tests/xfs/160
> +++ b/tests/xfs/160
> @@ -18,6 +18,7 @@ _supported_fs xfs
>  _require_command "$XFS_ADMIN_PROG" "xfs_admin"
>  _require_scratch_xfs_bigtime
>  _require_xfs_repair_upgrade bigtime
> +_require_xfs_nocrc
>  
>  date --date='Jan 1 00:00:00 UTC 2040' > /dev/null 2>&1 || \
>  	_notrun "Userspace does not support dates past 2038."
> diff --git a/tests/xfs/194 b/tests/xfs/194
> index 5a1dff5d2..2ef9403bb 100755
> --- a/tests/xfs/194
> +++ b/tests/xfs/194
> @@ -30,6 +30,8 @@ _supported_fs xfs
>  # real QA test starts here
>  
>  _require_scratch
> +_require_xfs_nocrc
> +
>  _scratch_mkfs_xfs >/dev/null 2>&1
>  
>  # For this test we use block size = 1/8 page size
> diff --git a/tests/xfs/199 b/tests/xfs/199
> index 4669f2c3e..f99b04db3 100755
> --- a/tests/xfs/199
> +++ b/tests/xfs/199
> @@ -26,6 +26,7 @@ _cleanup()
>  _supported_fs xfs
>  
>  _require_scratch
> +_require_xfs_nocrc
>  
>  # clear any mkfs options so that we can directly specify the options we need to
>  # be able to test the features bitmask behaviour correctly.
> diff --git a/tests/xfs/300 b/tests/xfs/300
> index 2ee5eee71..bc1f0efc6 100755
> --- a/tests/xfs/300
> +++ b/tests/xfs/300
> @@ -13,6 +13,7 @@ _begin_fstest auto fsr
>  . ./common/filter
>  
>  _require_scratch
> +_require_xfs_nocrc
>  
>  # real QA test starts here
>  
> diff --git a/tests/xfs/513 b/tests/xfs/513
> index ce2bb3491..42eceeb90 100755
> --- a/tests/xfs/513
> +++ b/tests/xfs/513
> @@ -37,6 +37,7 @@ _fixed_by_kernel_commit 237d7887ae72 \
>  _require_test
>  _require_loop
>  _require_xfs_io_command "falloc"
> +_require_xfs_nocrc
>  
>  LOOP_IMG=$TEST_DIR/$seq.dev
>  LOOP_SPARE_IMG=$TEST_DIR/$seq.logdev
> diff --git a/tests/xfs/526 b/tests/xfs/526
> index 4261e8497..188d0d514 100755
> --- a/tests/xfs/526
> +++ b/tests/xfs/526
> @@ -26,6 +26,7 @@ _supported_fs xfs
>  _require_test
>  _require_scratch_nocheck
>  _require_xfs_mkfs_cfgfile
> +_require_xfs_nocrc
>  
>  cfgfile=$TEST_DIR/a
>  rm -rf $cfgfile
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 4/6] xfs/263: remove the nocrc sub-test
  2024-04-08 13:32 ` [PATCH 4/6] xfs/263: remove the nocrc sub-test Christoph Hellwig
@ 2024-04-09 15:57   ` Darrick J. Wong
  2024-04-10  4:11     ` Christoph Hellwig
  0 siblings, 1 reply; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-09 15:57 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:41PM +0200, Christoph Hellwig wrote:
> Remove the test on nocrc file systems as v5 has been the default for 10
> years and the kernel has made v4 support optional, which would fail this
> sub-case.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/xfs/263     |  5 ---
>  tests/xfs/263.out | 85 -----------------------------------------------
>  2 files changed, 90 deletions(-)
> 
> diff --git a/tests/xfs/263 b/tests/xfs/263
> index bd30dab11..54e9355aa 100755
> --- a/tests/xfs/263
> +++ b/tests/xfs/263
> @@ -66,11 +66,6 @@ function test_all_state()
>  	done
>  }
>  
> -echo "==== NO CRC ===="
> -_scratch_mkfs_xfs "-m crc=0 -n ftype=0" >> $seqres.full
> -test_all_state

I think we should continue testing V4 quota options all the way to the
end of support (~2030) by splitting these into two tests, one of which
can use the _require_xfs_nocrc predicate introduced in the next patch.
Thoughts?

--D

> -
> -echo "==== CRC ===="
>  _scratch_mkfs_xfs "-m crc=1" >>$seqres.full
>  test_all_state
>  
> diff --git a/tests/xfs/263.out b/tests/xfs/263.out
> index 531d45de5..64c1a5876 100644
> --- a/tests/xfs/263.out
> +++ b/tests/xfs/263.out
> @@ -1,89 +1,4 @@
>  QA output created by 263
> -==== NO CRC ====
> -== Options: rw ==
> -== Options: usrquota,rw ==
> -User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Blocks grace time: [7 days]
> -Inodes grace time: [7 days]
> -Realtime Blocks grace time: [7 days]
> -== Options: grpquota,rw ==
> -User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode #XXX (1 blocks, 1 extents)
> -Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Blocks grace time: [7 days]
> -Inodes grace time: [7 days]
> -Realtime Blocks grace time: [7 days]
> -== Options: usrquota,grpquota,rw ==
> -User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Blocks grace time: [7 days]
> -Inodes grace time: [7 days]
> -Realtime Blocks grace time: [7 days]
> -== Options: prjquota,rw ==
> -User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode #XXX (1 blocks, 1 extents)
> -Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Blocks grace time: [7 days]
> -Inodes grace time: [7 days]
> -Realtime Blocks grace time: [7 days]
> -== Options: usrquota,prjquota,rw ==
> -User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Group quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: OFF
> -  Enforcement: OFF
> -  Inode: N/A
> -Project quota state on SCRATCH_MNT (SCRATCH_DEV)
> -  Accounting: ON
> -  Enforcement: ON
> -  Inode #XXX (1 blocks, 1 extents)
> -Blocks grace time: [7 days]
> -Inodes grace time: [7 days]
> -Realtime Blocks grace time: [7 days]
> -== Options: grpquota,prjquota,rw ==
> -== Options: usrquota,grpquota,prjquota,rw ==
> -==== CRC ====
>  == Options: rw ==
>  == Options: usrquota,rw ==
>  User quota state on SCRATCH_MNT (SCRATCH_DEV)
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 4/6] xfs/263: remove the nocrc sub-test
  2024-04-09 15:57   ` Darrick J. Wong
@ 2024-04-10  4:11     ` Christoph Hellwig
  0 siblings, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-10  4:11 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, Zorro Lang, linux-xfs, fstests

On Tue, Apr 09, 2024 at 08:57:28AM -0700, Darrick J. Wong wrote:
> I think we should continue testing V4 quota options all the way to the
> end of support (~2030) by splitting these into two tests, one of which
> can use the _require_xfs_nocrc predicate introduced in the next patch.
> Thoughts?

Sure.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported
  2024-04-09 15:56   ` Darrick J. Wong
@ 2024-04-10  4:14     ` Christoph Hellwig
  2024-04-10 15:05       ` Darrick J. Wong
  0 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-10  4:14 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Eric Sandeen, Zorro Lang, linux-xfs, fstests

On Tue, Apr 09, 2024 at 08:56:12AM -0700, Darrick J. Wong wrote:
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> >  common/xfs    | 10 ++++++++++
> >  tests/xfs/002 |  1 +
> 
> Looks fine to me.
> 
> >  tests/xfs/045 |  1 +
> 
> xfs_db can change uuids on v5 filesystems now, so we don't nee the
> -mcrc=0 in this test.

Ok, I'll look into that.

> Looks fine to me.
> 
> >  tests/xfs/148 |  2 ++
> 
> I wonder if we could rewrite this test to use either the xfs_db write -d
> command on dirents or attrs directly; or the link/attrset commands,
> since AFAICT the dir/attr code doesn't itself run namecheck when
> creating entries/attrs.

Can I leave that to you? :)

> >  tests/xfs/158 |  1 +
> >  tests/xfs/160 |  1 +
> 
> inobtcount and bigtime are new features, maybe these two tests should
> lose the clause that checks that we can't upgrade a V4 filesystem?

I'll take a look.

> >  tests/xfs/194 |  2 ++
> 
> Not sure why this one is fixated on $pagesize/8.  Was that a requirement
> to induce an error?  Or would this work just as well on a 1k fsblock fs?
> 
> (Eric?)

I can check if it could be made to work on $pagesize/4, but I'll
need to defer to Eric if that even makes sense.

> >  tests/xfs/513 |  1 +
> 
> I think we should split this into separate tests for V4/V5 options and
> only _require_xfs_nocrc the one with V4 options, because I wouldn't want
> to stop testing V5 codepaths simply because someone turned off V4
> support in the kernle.

Ok.

> >  tests/xfs/526 |  1 +
> 
> I'm at a loss on this one -- what it does is useful, but there aren't
> any V5 mkfs options that conflict as nicely as crc=0 does.

Yes, I tried to look for conflicting options, but I couldn't find
anything.  Maybe we'll grow some before the v4 support is retired
for real :)


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-08 19:00     ` Zorro Lang
@ 2024-04-10 14:42       ` Zorro Lang
  2024-04-10 14:51         ` Christoph Hellwig
  0 siblings, 1 reply; 30+ messages in thread
From: Zorro Lang @ 2024-04-10 14:42 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Tue, Apr 09, 2024 at 03:00:43AM +0800, Zorro Lang wrote:
> On Mon, Apr 08, 2024 at 04:59:39PM +0200, Christoph Hellwig wrote:
> > On Mon, Apr 08, 2024 at 10:55:54PM +0800, Zorro Lang wrote:
> > > > this series ensures tests pass on kernels without v5 support.  As a side
> > > > effect it also removes support for historic kernels and xfsprogs without
> > > > any v5 support, and without mkfs input validation.
> > > 
> > > Thanks for doing this! I'm wondering if fstests should do this "removing"
> > > earlier than xfs? Hope to hear more opinions from xfs list and other fstests
> > > users (especially from some LTS distro) :)
> > 
> > What is being removed is support for kernels and xfsprogs that do not
> > support v5 file systems at all, not testing on v4 file system for the
> > test device and the large majority of tests using the scratch device
> > without specifying an explicit version.
> 
> Sure, I think most of systems testing doesn't need this, except some old
> LTS distros.
> 
> > 
> > The exception from the above are two sub-cases for v4 that are removed in
> > the this series - if we really care about them I could move them into
> > separate tests, but I doubt it's worth it.
> 
> Let me check and test this patchset more, before acking it. And give some
> time to get more review. Thanks for this patchset!

My testing done on some old and new distro/kernels with v4 and v5 xfs.
It looks good, doesn't bring in more issues. So I'd like to have this
change.

But as the review points from XFS list, looks like the patch 4/6 is better
to not be merged, and the patch 6/6 need further changes? So I'll look forward
the V2, to take more actions.

Thanks,
Zorro

> 
> Thanks,
> Zorro
> 
> > 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-10 14:42       ` Zorro Lang
@ 2024-04-10 14:51         ` Christoph Hellwig
  2024-04-10 15:16           ` Darrick J. Wong
  2024-04-10 19:38           ` Zorro Lang
  0 siblings, 2 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-10 14:51 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Christoph Hellwig, Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Wed, Apr 10, 2024 at 10:42:54PM +0800, Zorro Lang wrote:
> But as the review points from XFS list, looks like the patch 4/6 is better
> to not be merged, and the patch 6/6 need further changes? So I'll look forward
> the V2, to take more actions.

Maybe you can take 1-3 and 5 for now and I'll rework the others?


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported
  2024-04-10  4:14     ` Christoph Hellwig
@ 2024-04-10 15:05       ` Darrick J. Wong
  0 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-10 15:05 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Eric Sandeen, Zorro Lang, linux-xfs, fstests

On Wed, Apr 10, 2024 at 06:14:02AM +0200, Christoph Hellwig wrote:
> On Tue, Apr 09, 2024 at 08:56:12AM -0700, Darrick J. Wong wrote:
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > > ---
> > >  common/xfs    | 10 ++++++++++
> > >  tests/xfs/002 |  1 +
> > 
> > Looks fine to me.
> > 
> > >  tests/xfs/045 |  1 +
> > 
> > xfs_db can change uuids on v5 filesystems now, so we don't nee the
> > -mcrc=0 in this test.
> 
> Ok, I'll look into that.
> 
> > Looks fine to me.
> > 
> > >  tests/xfs/148 |  2 ++
> > 
> > I wonder if we could rewrite this test to use either the xfs_db write -d
> > command on dirents or attrs directly; or the link/attrset commands,
> > since AFAICT the dir/attr code doesn't itself run namecheck when
> > creating entries/attrs.
> 
> Can I leave that to you? :)

Yes.

> > >  tests/xfs/158 |  1 +
> > >  tests/xfs/160 |  1 +
> > 
> > inobtcount and bigtime are new features, maybe these two tests should
> > lose the clause that checks that we can't upgrade a V4 filesystem?
> 
> I'll take a look.
> 
> > >  tests/xfs/194 |  2 ++
> > 
> > Not sure why this one is fixated on $pagesize/8.  Was that a requirement
> > to induce an error?  Or would this work just as well on a 1k fsblock fs?
> > 
> > (Eric?)
> 
> I can check if it could be made to work on $pagesize/4, but I'll
> need to defer to Eric if that even makes sense.
> 
> > >  tests/xfs/513 |  1 +
> > 
> > I think we should split this into separate tests for V4/V5 options and
> > only _require_xfs_nocrc the one with V4 options, because I wouldn't want
> > to stop testing V5 codepaths simply because someone turned off V4
> > support in the kernle.
> 
> Ok.
> 
> > >  tests/xfs/526 |  1 +
> > 
> > I'm at a loss on this one -- what it does is useful, but there aren't
> > any V5 mkfs options that conflict as nicely as crc=0 does.
> 
> Yes, I tried to look for conflicting options, but I couldn't find
> anything.  Maybe we'll grow some before the v4 support is retired
> for real :)

Well hilariously just yesterday djwong-wtf just grew one now that you
can't format rtgroups=1 without exchange=1 so I guess there's some hope.

--D

--D

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-10 14:51         ` Christoph Hellwig
@ 2024-04-10 15:16           ` Darrick J. Wong
  2024-04-10 15:18             ` Christoph Hellwig
  2024-04-10 19:38           ` Zorro Lang
  1 sibling, 1 reply; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-10 15:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Zorro Lang, linux-xfs, fstests

On Wed, Apr 10, 2024 at 04:51:40PM +0200, Christoph Hellwig wrote:
> On Wed, Apr 10, 2024 at 10:42:54PM +0800, Zorro Lang wrote:
> > But as the review points from XFS list, looks like the patch 4/6 is better
> > to not be merged, and the patch 6/6 need further changes? So I'll look forward
> > the V2, to take more actions.
> 
> Maybe you can take 1-3 and 5 for now and I'll rework the others?

I second that.  I'll deal with xfs/158, 160, and 526, but the other
patches that were ok could go in.

--D

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-10 15:16           ` Darrick J. Wong
@ 2024-04-10 15:18             ` Christoph Hellwig
  2024-04-10 16:03               ` Darrick J. Wong
  0 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-10 15:18 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Zorro Lang, Zorro Lang, linux-xfs, fstests

On Wed, Apr 10, 2024 at 08:16:00AM -0700, Darrick J. Wong wrote:
> I second that.  I'll deal with xfs/158, 160, and 526, but the other
> patches that were ok could go in.

Should I resend with the other review comments fixed but the
_require_xfs_nocrc left in those for now?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-10 15:18             ` Christoph Hellwig
@ 2024-04-10 16:03               ` Darrick J. Wong
  0 siblings, 0 replies; 30+ messages in thread
From: Darrick J. Wong @ 2024-04-10 16:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Zorro Lang, linux-xfs, fstests

On Wed, Apr 10, 2024 at 05:18:00PM +0200, Christoph Hellwig wrote:
> On Wed, Apr 10, 2024 at 08:16:00AM -0700, Darrick J. Wong wrote:
> > I second that.  I'll deal with xfs/158, 160, and 526, but the other
> > patches that were ok could go in.
> 
> Should I resend with the other review comments fixed but the
> _require_xfs_nocrc left in those for now?

Yes.  You could even do:

_require_xfs_nocrc	# FIXME: djwong said he'd fix this for real

If you like. ;)

--D

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: fix kernels without v5 support
  2024-04-10 14:51         ` Christoph Hellwig
  2024-04-10 15:16           ` Darrick J. Wong
@ 2024-04-10 19:38           ` Zorro Lang
  1 sibling, 0 replies; 30+ messages in thread
From: Zorro Lang @ 2024-04-10 19:38 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong , linux-xfs, fstests

On Wed, Apr 10, 2024 at 04:51:40PM +0200, Christoph Hellwig wrote:
> On Wed, Apr 10, 2024 at 10:42:54PM +0800, Zorro Lang wrote:
> > But as the review points from XFS list, looks like the patch 4/6 is better
> > to not be merged, and the patch 6/6 need further changes? So I'll look forward
> > the V2, to take more actions.
> 
> Maybe you can take 1-3 and 5 for now and I'll rework the others?

Sure, you can find these 4 patches in "patches-in-queue" branch. Feel free to
tell me if you hope to change something.

Thanks,
Zorro

> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
  2024-04-08 15:03   ` Eric Biggers
  2024-04-09 15:26   ` Darrick J. Wong
@ 2024-04-29  9:34   ` Chandan Babu R
  2024-04-29  9:53     ` Christoph Hellwig
  2024-04-29 14:20     ` Zorro Lang
  2 siblings, 2 replies; 30+ messages in thread
From: Chandan Babu R @ 2024-04-29  9:34 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Zorro Lang, Darrick J . Wong, linux-xfs, fstests

On Mon, Apr 08, 2024 at 03:32:38 PM +0200, Christoph Hellwig wrote:
> v5 file systems have been the default for more than 10 years.  Drop
> support for non-v5 enabled kernels and xfsprogs.
>

Hi,

This patch is causing xfs/077 to fail as shown below,

# ./check xfs/077
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 xfs-crc 6.9.0-rc4+ #2 SMP PREEMPT_DYNAMIC Mon Apr 29 08:08:05 GMT 2024
MKFS_OPTIONS  -- -f -f -m crc=1,reflink=0,rmapbt=0, -i sparse=0 /dev/loop6
MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota -o context=system_u:object_r:root_t:s0 /dev/loop6 /media/scratch

xfs/077 9s ... [not run] Kernel doesn't support meta_uuid feature
Ran: xfs/077
Not run: xfs/077
Passed all 1 tests

The corresponding configuration file used had the following,

  export TEST_DEV=/dev/loop5
  export TEST_DIR=/media/test
  export SCRATCH_DEV=/dev/loop6
  export SCRATCH_MNT=/media/scratch
  
  MKFS_OPTIONS='-f -m crc=1,reflink=0,rmapbt=0, -i sparse=0'
  MOUNT_OPTIONS='-o usrquota,grpquota,prjquota'

-- 
Chandan

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-29  9:34   ` Chandan Babu R
@ 2024-04-29  9:53     ` Christoph Hellwig
  2024-04-29 14:20     ` Zorro Lang
  1 sibling, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2024-04-29  9:53 UTC (permalink / raw)
  To: Chandan Babu R
  Cc: Christoph Hellwig, Zorro Lang, Darrick J . Wong, linux-xfs, fstests

On Mon, Apr 29, 2024 at 03:04:51PM +0530, Chandan Babu R wrote:
> On Mon, Apr 08, 2024 at 03:32:38 PM +0200, Christoph Hellwig wrote:
> > v5 file systems have been the default for more than 10 years.  Drop
> > support for non-v5 enabled kernels and xfsprogs.
> >
> 
> Hi,
> 
> This patch is causing xfs/077 to fail as shown below,

That's not a failure, but it isn't run.  AFAICS it is because
_require_meta_uuid expects to work on a scratch fs, but none is
generated beforehand as the _require_xfs_mkfs_crc that did that under
the hood now went away.

The fix is to probably just nuke _require_meta_uuid and explicitly
create a CRC-enabled fs.  I'll look into that.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/6] xfs: remove support for tools and kernels with v5 support
  2024-04-29  9:34   ` Chandan Babu R
  2024-04-29  9:53     ` Christoph Hellwig
@ 2024-04-29 14:20     ` Zorro Lang
  1 sibling, 0 replies; 30+ messages in thread
From: Zorro Lang @ 2024-04-29 14:20 UTC (permalink / raw)
  To: Chandan Babu R
  Cc: Christoph Hellwig, Zorro Lang, Darrick J . Wong, linux-xfs, fstests

On Mon, Apr 29, 2024 at 03:04:51PM +0530, Chandan Babu R wrote:
> On Mon, Apr 08, 2024 at 03:32:38 PM +0200, Christoph Hellwig wrote:
> > v5 file systems have been the default for more than 10 years.  Drop
> > support for non-v5 enabled kernels and xfsprogs.
> >
> 
> Hi,
> 
> This patch is causing xfs/077 to fail as shown below,
> 
> # ./check xfs/077
> FSTYP         -- xfs (debug)
> PLATFORM      -- Linux/x86_64 xfs-crc 6.9.0-rc4+ #2 SMP PREEMPT_DYNAMIC Mon Apr 29 08:08:05 GMT 2024
> MKFS_OPTIONS  -- -f -f -m crc=1,reflink=0,rmapbt=0, -i sparse=0 /dev/loop6
> MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota -o context=system_u:object_r:root_t:s0 /dev/loop6 /media/scratch
> 
> xfs/077 9s ... [not run] Kernel doesn't support meta_uuid feature
> Ran: xfs/077
> Not run: xfs/077
> Passed all 1 tests
> 
> The corresponding configuration file used had the following,
> 
>   export TEST_DEV=/dev/loop5
>   export TEST_DIR=/media/test
>   export SCRATCH_DEV=/dev/loop6
>   export SCRATCH_MNT=/media/scratch
>   
>   MKFS_OPTIONS='-f -m crc=1,reflink=0,rmapbt=0, -i sparse=0'
>   MOUNT_OPTIONS='-o usrquota,grpquota,prjquota'

Thanks for finding this issue, the _require_meta_uuid helper or the calling
of _require_meta_uuid looks not correct. The xfs/077 calls _require_meta_uuid
as:

  _supported_fs xfs
  _require_xfs_copy
  _require_scratch
  _require_no_large_scratch_dev
  _require_meta_uuid            <=====
  ...

The x/077 hasn't mkfs on SCRATCH_DEV, but the _require_meta_uuid does
_scratch_xfs_db directly. That looks not right.

I think we should do "_scratch_mkfs ..." before doing _require_meta_uuid.
E.g. mkfs at the beginning of _require_meta_uuid.

Any thoughts?

Thanks,
Zorro

> 
> -- 
> Chandan
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-04-29 14:20 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-08 13:32 fix kernels without v5 support Christoph Hellwig
2024-04-08 13:32 ` [PATCH 1/6] xfs: remove support for tools and kernels with " Christoph Hellwig
2024-04-08 15:03   ` Eric Biggers
2024-04-08 15:04     ` Christoph Hellwig
2024-04-09 15:26   ` Darrick J. Wong
2024-04-29  9:34   ` Chandan Babu R
2024-04-29  9:53     ` Christoph Hellwig
2024-04-29 14:20     ` Zorro Lang
2024-04-08 13:32 ` [PATCH 2/6] remove xfs/096 Christoph Hellwig
2024-04-09 15:27   ` Darrick J. Wong
2024-04-08 13:32 ` [PATCH 3/6] xfs/078: remove the 512 byte block size sub-case Christoph Hellwig
2024-04-09 15:32   ` Darrick J. Wong
2024-04-08 13:32 ` [PATCH 4/6] xfs/263: remove the nocrc sub-test Christoph Hellwig
2024-04-09 15:57   ` Darrick J. Wong
2024-04-10  4:11     ` Christoph Hellwig
2024-04-08 13:32 ` [PATCH 5/6] xfs/522: use reflink instead of crc as test feature Christoph Hellwig
2024-04-09 15:39   ` Darrick J. Wong
2024-04-08 13:32 ` [PATCH 6/6] xfs: don't run tests that require v4 file systems when not supported Christoph Hellwig
2024-04-09 15:56   ` Darrick J. Wong
2024-04-10  4:14     ` Christoph Hellwig
2024-04-10 15:05       ` Darrick J. Wong
2024-04-08 14:55 ` fix kernels without v5 support Zorro Lang
2024-04-08 14:59   ` Christoph Hellwig
2024-04-08 19:00     ` Zorro Lang
2024-04-10 14:42       ` Zorro Lang
2024-04-10 14:51         ` Christoph Hellwig
2024-04-10 15:16           ` Darrick J. Wong
2024-04-10 15:18             ` Christoph Hellwig
2024-04-10 16:03               ` Darrick J. Wong
2024-04-10 19:38           ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).