public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups
  2022-12-30 22:20 [PATCHSET v1.0 00/13] fstests: fixes for realtime rmap Darrick J. Wong
@ 2022-12-30 22:20 ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:20 UTC (permalink / raw)
  To: zlang, djwong; +Cc: linux-xfs, fstests, guan

From: Darrick J. Wong <djwong@kernel.org>

Now that we've sharded the realtime volume and created per-group rmap
btrees, we need to adjust downward the size of rtrmapbt records since
the block counts are now 32-bit instead of 64-bit.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/populate |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/common/populate b/common/populate
index c0bbbc3f3b..7d57cd1287 100644
--- a/common/populate
+++ b/common/populate
@@ -379,7 +379,7 @@ _scratch_xfs_populate() {
 	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 	if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then
 		echo "+ rtrmapbt btree"
-		nr="$((blksz * 2 / 32))"
+		nr="$((blksz * 2 / 24))"
 		$XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTRMAPBT"
 		__populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RTRMAPBT"
 	fi


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

* [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups
  2023-12-31 20:00 [PATCHSET v2.0 4/9] fstests: fixes for realtime rmap Darrick J. Wong
@ 2023-12-27 14:00 ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2023-12-27 14:00 UTC (permalink / raw)
  To: djwong, zlang; +Cc: guan, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that we've sharded the realtime volume and created per-group rmap
btrees, we need to adjust downward the size of rtrmapbt records since
the block counts are now 32-bit instead of 64-bit.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/populate |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/common/populate b/common/populate
index dc89eee70e..d8d19bf782 100644
--- a/common/populate
+++ b/common/populate
@@ -450,7 +450,7 @@ _scratch_xfs_populate() {
 	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 	if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then
 		echo "+ rtrmapbt btree"
-		nr="$((blksz * 2 / 32))"
+		nr="$((blksz * 2 / 24))"
 		$XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTRMAPBT"
 		__populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RTRMAPBT"
 	fi


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

* [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes
@ 2025-02-19  0:43 Darrick J. Wong
  2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
                   ` (11 more replies)
  0 siblings, 12 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:43 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests, xfs, Christoph Hellwig

Hi everyone,

As most developers are aware, the fstests for-next branch has not moved
forward since early December.  That logjam is hopefully resolved at long
last in the patches-in-queue branch:

https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/log/?h=patches-in-queue

So here's all the stuff that I was *going* to send late last year to
catch up fstests to the final versions of online fsck (6.12) and the xfs
metadata directory changes (6.13).  I'm adding the realtime rmap and
reflink changes (6.14) because we're three weeks past the merge window.

These patches are (more or less) based atop the patches in queue branch.
First come some fixes for last week's for-next push, and some gentle
reworking of the zeroout support in the log replay code that I was
working on last October.

After that is all the 6.12-6.14 stuff, and a functional test for the
rdump command that's out for review.  Apologies for the huge dump, I
was not expecting things to back up for 79 days.

You might want to just pull the branch:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfstests-dev.git/log/?h=rdump_2025-02-18

--Darrick

Here's the list of unreviewed patches, though it's basically every patch
in here.

[PATCHSET 01/12] fstests: more random fixes for v2025.02.16
  [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT
  [PATCH 2/2] dio_writeback_race: align the directio buffer to base
[PATCHSET 02/12] fstests: fix logwrites zeroing
  [PATCH 1/3] logwrites: warn if we don't think read after discard
  [PATCH 2/3] logwrites: use BLKZEROOUT if it's available
  [PATCH 3/3] logwrites: only use BLKDISCARD if we know discard zeroes
[PATCHSET v32.1 03/12] fstests: fix online and offline fsck test
  [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress
  [PATCH 02/12] misc: rename the dangerous_repair group to
  [PATCH 03/12] misc: rename the dangerous_online_repair group to
  [PATCH 04/12] misc: rename the dangerous_bothrepair group to
  [PATCH 05/12] misc: rename the dangerous_norepair group to
  [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests
  [PATCH 07/12] misc: fix misclassification of xfs_scrub + xfs_repair
  [PATCH 08/12] misc: fix misclassification of verifier fuzz tests
  [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the
  [PATCH 10/12] misc: remove the dangerous_scrub group
  [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  [PATCH 12/12] xfs/349: reclassify this test as not dangerous
[PATCHSET v6.4 04/12] fstests: enable metadir
  [PATCH 01/12] various: fix finding metadata inode numbers when
  [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory
  [PATCH 03/12] common/repair: patch up repair sb inode value
  [PATCH 04/12] xfs/206: update for metadata directory support
  [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to
  [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata
  [PATCH 07/12] xfs: create fuzz tests for metadata directories
  [PATCH 08/12] xfs/163: bigger fs for metadir
  [PATCH 09/12] xfs/122: disable this test for any codebase that knows
  [PATCH 10/12] common/populate: label newly created xfs filesystems
  [PATCH 11/12] scrub: race metapath online fsck with fsstress
  [PATCH 12/12] xfs: test metapath repairs
[PATCHSET v6.4 05/12] fstests: make protofiles less janky
  [PATCH 1/4] xfs/019: reduce _fail calls in test
  [PATCH 2/4] xfs/019: test reserved file support
  [PATCH 3/4] xfs: test filesystem creation with xfs_protofile
  [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support
[PATCHSET v6.4 06/12] fstests: shard the realtime section
  [PATCH 01/15] common/populate: refactor caching of metadumps to a
  [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore
  [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems
  [PATCH 04/15] fuzzy: run fsx on data and rt sections of xfs
  [PATCH 05/15] common/ext4: reformat external logs during mdrestore
  [PATCH 06/15] common/populate: use metadump v2 format by default for
  [PATCH 07/15] punch-alternating: detect xfs realtime files with large
  [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature
  [PATCH 09/15] common: pass the realtime device to xfs_db when
  [PATCH 10/15] xfs/185: update for rtgroups
  [PATCH 11/15] xfs/449: update test to know about xfs_db -R
  [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output
  [PATCH 13/15] common/xfs: capture realtime devices during
  [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support
  [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary
[PATCHSET v6.4 07/12] fstests: store quota files in the metadir
  [PATCH 1/4] xfs: update tests for quota files in the metadir
  [PATCH 2/4] xfs: test persistent quota flags
  [PATCH 3/4] xfs: fix quota detection in fuzz tests
  [PATCH 4/4] xfs: fix tests for persistent qflags
[PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes
  [PATCH 1/3] common: enable testing of realtime quota when supported
  [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota
  [PATCH 3/3] xfs: regression testing of quota on the realtime device
[PATCHSET 09/12] fstests: check new 6.14 behaviors
  [PATCH 1/1] common: test statfs reporting with project quota
[PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support
  [PATCH 01/13] xfs: fix tests that try to access the realtime rmap
  [PATCH 02/13] xfs/336: port to common/metadump
  [PATCH 03/13] fuzz: for fuzzing the rtrmapbt,
  [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and
  [PATCH 05/13] xfs: fix various problems with fsmap detecting the data
  [PATCH 06/13] xfs/341: update test for rtgroup-based rmap
  [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater
  [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding
  [PATCH 09/13] xfs: skip tests if formatting small filesystem fails
  [PATCH 10/13] xfs/443: use file allocation unit, not dbsize
  [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups
  [PATCH 12/13] populate: check that we created a realtime rmap btree
  [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees
[PATCHSET v6.4 11/12] fstests: reflink on the realtime device
  [PATCH 1/7] common/populate: create realtime refcount btree
  [PATCH 2/7] xfs: create fuzz tests for the realtime refcount btree
  [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime
  [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and
  [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime
  [PATCH 6/7] generic/331,xfs/240: support files that skip delayed
  [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit
[PATCHSET 12/12] fstests: dump fs directory trees
  [PATCH 1/1] xfs: test filesystem recovery with rdump

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

* [PATCHSET 01/12] fstests: more random fixes for v2025.02.16
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
@ 2025-02-19  0:46 ` Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size Darrick J. Wong
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:46 UTC (permalink / raw)
  To: zlang, djwong; +Cc: fstests, hch, linux-xfs, fstests

Hi all,

Here's the usual odd fixes for fstests.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=more-fixes
---
Commits in this patchset:
 * dio-writeback-race: fix missing mode in O_CREAT
 * dio_writeback_race: align the directio buffer to base page size
---
 src/dio-writeback-race.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


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

* [PATCHSET 02/12] fstests: fix logwrites zeroing
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
  2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
@ 2025-02-19  0:46 ` Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 1/3] logwrites: warn if we don't think read after discard returns zeroes Darrick J. Wong
                     ` (3 more replies)
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                   ` (9 subsequent siblings)
  11 siblings, 4 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:46 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

This patchset attempts to fix the behavior of the logwrites replay tests
when running on XFS.  In short, the logwrites code logs every write made
to a block device and can set tags at arbitrary points in that log.  The
replay tests then erase the block device and replay up to those tags,
and then invoke the filesystem to see if it can recover the filesystem.

However, the logwrites replay has long had subtle problems.  XFS log
recovery won't replay a metadata block from the log if the ondisk block
has a newer log sequence number (LSNs), which rests on the assumption
that ondisk filesystem metadata do not have LSNs greater than that of
the head of the log.  This is not true if we're replaying to a point in
the past, so log recovery fails to produce a consistent filesystem.

The logwrites replay code works around this issue by erasing the block
device before replaying.  Unfortunately, it uses BLKDISCARD, which has
never guaranteed the results of a read after the discard completes.
Some devices return zeroes, others do nothing.  This inconsistency has
been worked around by installing the one block device that guarantees
that reads after a mass discard always return zeros -- dm-thinp.

Unfortunately that leaves a subtle landmine for test authors.  If their
filesystem's recovery doesn't behave like XFS's then they might not need
thinp.  If it does, it's all too easy to write a broken testcase.

Fix this whole situation by adding a warning to the logwrites setup code
if the block device is not known to guarantee that reads after discard
returns zeroes; fix the replay program to use BLKZEROOUT so that the
block device is zeroed before replay begins; and then fix the logwrites
setup to tell the replay program that it can use BLKDISCARD for the
devices where we know that will work, because discard is much faster
than writing zeroes.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=logwrites-fix-zeroing
---
Commits in this patchset:
 * logwrites: warn if we don't think read after discard returns zeroes
 * logwrites: use BLKZEROOUT if it's available
 * logwrites: only use BLKDISCARD if we know discard zeroes data
---
 src/log-writes/log-writes.h |    1 +
 common/dmlogwrites          |   39 ++++++++++++++++++++++++++++++++++++++-
 src/log-writes/log-writes.c |   10 ++++++++++
 src/log-writes/replay-log.c |    8 ++++++++
 4 files changed, 57 insertions(+), 1 deletion(-)


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

* [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
  2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
@ 2025-02-19  0:46 ` Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests Darrick J. Wong
                     ` (11 more replies)
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                   ` (8 subsequent siblings)
  11 siblings, 12 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:46 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

I've been working on online fsck for years, and hardening offline fsck
whenever I notice easy to fix discrepancies between the two tools.  Now
that it's been a couple of years since I've seen any problems, I think
it's time to open this to wider testing by dropping /some/ of the
"dangerous" tags.

While working on this I also noticed that some of the fuzz tests were
misclassified, so this patchset fixes those problems too.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=fix-fsck-test-classifications
---
Commits in this patchset:
 * misc: drop the dangerous label from xfs_scrub fsstress tests
 * misc: rename the dangerous_repair group to fuzzers_repair
 * misc: rename the dangerous_online_repair group to fuzzers_online_repair
 * misc: rename the dangerous_bothrepair group to fuzzers_bothrepair
 * misc: rename the dangerous_norepair group to fuzzers_norepair
 * misc: fix misclassification of xfs_repair fuzz tests
 * misc: fix misclassification of xfs_scrub + xfs_repair fuzz tests
 * misc: fix misclassification of verifier fuzz tests
 * misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups
 * misc: remove the dangerous_scrub group
 * xfs/28[56],xfs/56[56]: add to the auto group
 * xfs/349: reclassify this test as not dangerous
---
 doc/group-names.txt |   13 ++++++-------
 tests/xfs/285       |    2 +-
 tests/xfs/286       |    2 +-
 tests/xfs/349       |    3 +--
 tests/xfs/350       |    2 +-
 tests/xfs/351       |    2 +-
 tests/xfs/352       |    2 +-
 tests/xfs/353       |    2 +-
 tests/xfs/354       |    2 +-
 tests/xfs/355       |    2 +-
 tests/xfs/356       |    2 +-
 tests/xfs/357       |    2 +-
 tests/xfs/358       |    2 +-
 tests/xfs/359       |    2 +-
 tests/xfs/360       |    2 +-
 tests/xfs/361       |    2 +-
 tests/xfs/362       |    2 +-
 tests/xfs/363       |    2 +-
 tests/xfs/364       |    2 +-
 tests/xfs/365       |    2 +-
 tests/xfs/366       |    2 +-
 tests/xfs/367       |    2 +-
 tests/xfs/368       |    2 +-
 tests/xfs/369       |    2 +-
 tests/xfs/370       |    2 +-
 tests/xfs/371       |    2 +-
 tests/xfs/372       |    2 +-
 tests/xfs/373       |    2 +-
 tests/xfs/374       |    2 +-
 tests/xfs/375       |    2 +-
 tests/xfs/376       |    2 +-
 tests/xfs/377       |    2 +-
 tests/xfs/378       |    2 +-
 tests/xfs/379       |    2 +-
 tests/xfs/380       |    2 +-
 tests/xfs/381       |    2 +-
 tests/xfs/382       |    2 +-
 tests/xfs/383       |    2 +-
 tests/xfs/384       |    2 +-
 tests/xfs/385       |    2 +-
 tests/xfs/386       |    2 +-
 tests/xfs/387       |    2 +-
 tests/xfs/388       |    2 +-
 tests/xfs/389       |    2 +-
 tests/xfs/390       |    2 +-
 tests/xfs/391       |    2 +-
 tests/xfs/392       |    2 +-
 tests/xfs/393       |    2 +-
 tests/xfs/394       |    2 +-
 tests/xfs/395       |    2 +-
 tests/xfs/396       |    2 +-
 tests/xfs/397       |    2 +-
 tests/xfs/398       |    2 +-
 tests/xfs/399       |    2 +-
 tests/xfs/400       |    2 +-
 tests/xfs/401       |    2 +-
 tests/xfs/402       |    2 +-
 tests/xfs/403       |    2 +-
 tests/xfs/404       |    2 +-
 tests/xfs/405       |    2 +-
 tests/xfs/406       |    2 +-
 tests/xfs/407       |    2 +-
 tests/xfs/408       |    2 +-
 tests/xfs/409       |    2 +-
 tests/xfs/410       |    2 +-
 tests/xfs/411       |    2 +-
 tests/xfs/412       |    2 +-
 tests/xfs/413       |    2 +-
 tests/xfs/414       |    2 +-
 tests/xfs/415       |    2 +-
 tests/xfs/416       |    2 +-
 tests/xfs/417       |    2 +-
 tests/xfs/418       |    2 +-
 tests/xfs/422       |    2 +-
 tests/xfs/423       |    2 +-
 tests/xfs/425       |    2 +-
 tests/xfs/426       |    2 +-
 tests/xfs/427       |    2 +-
 tests/xfs/428       |    2 +-
 tests/xfs/429       |    2 +-
 tests/xfs/430       |    2 +-
 tests/xfs/453       |    2 +-
 tests/xfs/454       |    2 +-
 tests/xfs/455       |    2 +-
 tests/xfs/456       |    2 +-
 tests/xfs/457       |    2 +-
 tests/xfs/458       |    2 +-
 tests/xfs/459       |    2 +-
 tests/xfs/460       |    2 +-
 tests/xfs/461       |    2 +-
 tests/xfs/462       |    2 +-
 tests/xfs/463       |    2 +-
 tests/xfs/464       |    2 +-
 tests/xfs/465       |    2 +-
 tests/xfs/466       |    2 +-
 tests/xfs/467       |    2 +-
 tests/xfs/468       |    2 +-
 tests/xfs/469       |    2 +-
 tests/xfs/470       |    2 +-
 tests/xfs/471       |    2 +-
 tests/xfs/472       |    2 +-
 tests/xfs/473       |    2 +-
 tests/xfs/474       |    2 +-
 tests/xfs/475       |    2 +-
 tests/xfs/476       |    2 +-
 tests/xfs/477       |    2 +-
 tests/xfs/478       |    2 +-
 tests/xfs/479       |    2 +-
 tests/xfs/480       |    2 +-
 tests/xfs/481       |    2 +-
 tests/xfs/482       |    2 +-
 tests/xfs/483       |    2 +-
 tests/xfs/484       |    2 +-
 tests/xfs/485       |    2 +-
 tests/xfs/486       |    2 +-
 tests/xfs/487       |    2 +-
 tests/xfs/488       |    2 +-
 tests/xfs/489       |    2 +-
 tests/xfs/496       |    2 +-
 tests/xfs/497       |    2 +-
 tests/xfs/498       |    2 +-
 tests/xfs/561       |    2 +-
 tests/xfs/562       |    2 +-
 tests/xfs/563       |    2 +-
 tests/xfs/564       |    2 +-
 tests/xfs/565       |    2 +-
 tests/xfs/566       |    2 +-
 tests/xfs/570       |    2 +-
 tests/xfs/571       |    2 +-
 tests/xfs/572       |    2 +-
 tests/xfs/573       |    2 +-
 tests/xfs/574       |    2 +-
 tests/xfs/575       |    2 +-
 tests/xfs/576       |    2 +-
 tests/xfs/577       |    2 +-
 tests/xfs/578       |    2 +-
 tests/xfs/579       |    2 +-
 tests/xfs/580       |    2 +-
 tests/xfs/581       |    2 +-
 tests/xfs/582       |    2 +-
 tests/xfs/583       |    2 +-
 tests/xfs/584       |    2 +-
 tests/xfs/585       |    2 +-
 tests/xfs/586       |    2 +-
 tests/xfs/587       |    2 +-
 tests/xfs/588       |    2 +-
 tests/xfs/589       |    2 +-
 tests/xfs/590       |    2 +-
 tests/xfs/591       |    2 +-
 tests/xfs/592       |    2 +-
 tests/xfs/593       |    2 +-
 tests/xfs/594       |    2 +-
 tests/xfs/595       |    2 +-
 tests/xfs/621       |    2 +-
 tests/xfs/622       |    2 +-
 tests/xfs/628       |    2 +-
 tests/xfs/708       |    2 +-
 tests/xfs/709       |    2 +-
 tests/xfs/710       |    2 +-
 tests/xfs/711       |    2 +-
 tests/xfs/712       |    2 +-
 tests/xfs/713       |    2 +-
 tests/xfs/714       |    2 +-
 tests/xfs/715       |    2 +-
 tests/xfs/717       |    2 +-
 tests/xfs/718       |    2 +-
 tests/xfs/719       |    2 +-
 tests/xfs/721       |    2 +-
 tests/xfs/722       |    2 +-
 tests/xfs/723       |    2 +-
 tests/xfs/724       |    2 +-
 tests/xfs/725       |    2 +-
 tests/xfs/726       |    2 +-
 tests/xfs/727       |    2 +-
 tests/xfs/728       |    2 +-
 tests/xfs/729       |    2 +-
 tests/xfs/730       |    2 +-
 tests/xfs/731       |    2 +-
 tests/xfs/733       |    2 +-
 tests/xfs/734       |    2 +-
 tests/xfs/735       |    2 +-
 tests/xfs/736       |    2 +-
 tests/xfs/737       |    2 +-
 tests/xfs/738       |    2 +-
 tests/xfs/739       |    2 +-
 tests/xfs/740       |    2 +-
 tests/xfs/741       |    2 +-
 tests/xfs/742       |    2 +-
 tests/xfs/743       |    2 +-
 tests/xfs/744       |    2 +-
 tests/xfs/745       |    2 +-
 tests/xfs/746       |    2 +-
 tests/xfs/747       |    2 +-
 tests/xfs/748       |    2 +-
 tests/xfs/749       |    2 +-
 tests/xfs/750       |    2 +-
 tests/xfs/751       |    2 +-
 tests/xfs/752       |    2 +-
 tests/xfs/753       |    2 +-
 tests/xfs/754       |    2 +-
 tests/xfs/755       |    2 +-
 tests/xfs/756       |    2 +-
 tests/xfs/757       |    2 +-
 tests/xfs/758       |    2 +-
 tests/xfs/759       |    2 +-
 tests/xfs/760       |    2 +-
 tests/xfs/761       |    2 +-
 tests/xfs/762       |    2 +-
 tests/xfs/763       |    2 +-
 tests/xfs/764       |    2 +-
 tests/xfs/765       |    2 +-
 tests/xfs/766       |    2 +-
 tests/xfs/767       |    2 +-
 tests/xfs/768       |    2 +-
 tests/xfs/769       |    2 +-
 tests/xfs/770       |    2 +-
 tests/xfs/771       |    2 +-
 tests/xfs/772       |    2 +-
 tests/xfs/773       |    2 +-
 tests/xfs/774       |    2 +-
 tests/xfs/775       |    2 +-
 tests/xfs/776       |    2 +-
 tests/xfs/777       |    2 +-
 tests/xfs/778       |    2 +-
 tests/xfs/779       |    2 +-
 tests/xfs/780       |    2 +-
 tests/xfs/781       |    2 +-
 tests/xfs/782       |    2 +-
 tests/xfs/783       |    2 +-
 tests/xfs/784       |    2 +-
 tests/xfs/785       |    2 +-
 tests/xfs/786       |    2 +-
 tests/xfs/787       |    2 +-
 tests/xfs/788       |    2 +-
 tests/xfs/793       |    2 +-
 tests/xfs/794       |    2 +-
 tests/xfs/796       |    2 +-
 tests/xfs/797       |    2 +-
 tests/xfs/799       |    2 +-
 tests/xfs/800       |    2 +-
 tests/xfs/801       |    2 +-
 241 files changed, 246 insertions(+), 248 deletions(-)


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

* [PATCHSET v6.4 04/12] fstests: enable metadir
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (2 preceding siblings ...)
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
@ 2025-02-19  0:46 ` Darrick J. Wong
  2025-02-19  0:53   ` [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled Darrick J. Wong
                     ` (11 more replies)
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
                   ` (7 subsequent siblings)
  11 siblings, 12 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:46 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Adjust fstests as needed to support the XFS metadata directory feature,
and add some new tests for online fsck and fuzz testing of the ondisk
metadata.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=metadir

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=metadir

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=metadir

xfsdocs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-documentation.git/log/?h=metadir
---
Commits in this patchset:
 * various: fix finding metadata inode numbers when metadir is enabled
 * xfs/{030,033,178}: forcibly disable metadata directory trees
 * common/repair: patch up repair sb inode value complaints
 * xfs/206: update for metadata directory support
 * xfs/{050,144,153,299,330}: update quota reports to handle metadir trees
 * xfs/509: adjust inumbers accounting for metadata directories
 * xfs: create fuzz tests for metadata directories
 * xfs/163: bigger fs for metadir
 * xfs/122: disable this test for any codebase that knows about metadir
 * common/populate: label newly created xfs filesystems
 * scrub: race metapath online fsck with fsstress
 * xfs: test metapath repairs
---
 common/filter      |    7 ++-
 common/populate    |    8 +++
 common/repair      |    4 ++
 common/xfs         |  100 +++++++++++++++++++++++++++++++++++++++++++-
 tests/xfs/007      |   16 ++++---
 tests/xfs/030      |    1 
 tests/xfs/033      |    1 
 tests/xfs/050      |    5 ++
 tests/xfs/122      |    6 +++
 tests/xfs/153      |    5 ++
 tests/xfs/1546     |   34 +++++++++++++++
 tests/xfs/1546.out |    4 ++
 tests/xfs/1547     |   34 +++++++++++++++
 tests/xfs/1547.out |    4 ++
 tests/xfs/1548     |   34 +++++++++++++++
 tests/xfs/1548.out |    4 ++
 tests/xfs/1549     |   35 +++++++++++++++
 tests/xfs/1549.out |    4 ++
 tests/xfs/1550     |   34 +++++++++++++++
 tests/xfs/1550.out |    4 ++
 tests/xfs/1551     |   34 +++++++++++++++
 tests/xfs/1551.out |    4 ++
 tests/xfs/1552     |   34 +++++++++++++++
 tests/xfs/1552.out |    4 ++
 tests/xfs/1553     |   35 +++++++++++++++
 tests/xfs/1553.out |    4 ++
 tests/xfs/163      |    2 -
 tests/xfs/178      |    1 
 tests/xfs/1874     |  119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1874.out |   19 ++++++++
 tests/xfs/1892     |   66 +++++++++++++++++++++++++++++
 tests/xfs/1892.out |    2 +
 tests/xfs/1893     |   67 +++++++++++++++++++++++++++++
 tests/xfs/1893.out |    2 +
 tests/xfs/206      |    1 
 tests/xfs/299      |    1 
 tests/xfs/330      |    6 ++-
 tests/xfs/509      |   23 +++++++++-
 tests/xfs/529      |    5 +-
 tests/xfs/530      |    6 +--
 tests/xfs/739      |    9 +---
 tests/xfs/740      |    9 +---
 tests/xfs/741      |    9 +---
 tests/xfs/742      |    9 +---
 tests/xfs/743      |    9 +---
 tests/xfs/744      |    9 +---
 tests/xfs/745      |    9 +---
 tests/xfs/746      |    9 +---
 48 files changed, 773 insertions(+), 78 deletions(-)
 create mode 100755 tests/xfs/1546
 create mode 100644 tests/xfs/1546.out
 create mode 100755 tests/xfs/1547
 create mode 100644 tests/xfs/1547.out
 create mode 100755 tests/xfs/1548
 create mode 100644 tests/xfs/1548.out
 create mode 100755 tests/xfs/1549
 create mode 100644 tests/xfs/1549.out
 create mode 100755 tests/xfs/1550
 create mode 100644 tests/xfs/1550.out
 create mode 100755 tests/xfs/1551
 create mode 100644 tests/xfs/1551.out
 create mode 100755 tests/xfs/1552
 create mode 100644 tests/xfs/1552.out
 create mode 100755 tests/xfs/1553
 create mode 100644 tests/xfs/1553.out
 create mode 100755 tests/xfs/1874
 create mode 100644 tests/xfs/1874.out
 create mode 100755 tests/xfs/1892
 create mode 100644 tests/xfs/1892.out
 create mode 100755 tests/xfs/1893
 create mode 100644 tests/xfs/1893.out


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

* [PATCHSET v6.4 05/12] fstests: make protofiles less janky
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (3 preceding siblings ...)
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
@ 2025-02-19  0:47 ` Darrick J. Wong
  2025-02-19  0:56   ` [PATCH 1/4] xfs/019: reduce _fail calls in test Darrick J. Wong
                     ` (3 more replies)
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                   ` (6 subsequent siblings)
  11 siblings, 4 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:47 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Add a new regression test for xattr support of xfs protofiles.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=protofiles

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=protofiles
---
Commits in this patchset:
 * xfs/019: reduce _fail calls in test
 * xfs/019: test reserved file support
 * xfs: test filesystem creation with xfs_protofile
 * fstests: test mkfs.xfs protofiles with xattr support
---
 common/config      |    1 
 tests/xfs/019      |   14 +++--
 tests/xfs/019.out  |    5 ++
 tests/xfs/1894     |  109 +++++++++++++++++++++++++++++++++++++++
 tests/xfs/1894.out |    4 +
 tests/xfs/1937     |  144 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1937.out |  102 +++++++++++++++++++++++++++++++++++++
 7 files changed, 374 insertions(+), 5 deletions(-)
 create mode 100755 tests/xfs/1894
 create mode 100644 tests/xfs/1894.out
 create mode 100755 tests/xfs/1937
 create mode 100644 tests/xfs/1937.out


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

* [PATCHSET v6.4 06/12] fstests: shard the realtime section
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (4 preceding siblings ...)
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
@ 2025-02-19  0:47 ` Darrick J. Wong
  2025-02-19  0:57   ` [PATCH 01/15] common/populate: refactor caching of metadumps to a helper Darrick J. Wong
                     ` (14 more replies)
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
                   ` (5 subsequent siblings)
  11 siblings, 15 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:47 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Right now, the realtime section uses a single pair of metadata inodes to
store the free space information.  This presents a scalability problem
since every thread trying to allocate or free rt extents have to lock
these files.  It would be very useful if we could begin to tackle these
problems by sharding the realtime section, so create the notion of
realtime groups, which are similar to allocation groups on the data
section.

While we're at it, define a superblock to be stamped into the start of
each rt section.  This enables utilities such as blkid to identify block
devices containing realtime sections, and helpfully avoids the situation
where a file extent can cross an rtgroup boundary.

The best advantage for rtgroups will become evident later when we get to
adding rmap and reflink to the realtime volume, since the geometry
constraints are the same for rt groups and AGs.  Hence we can reuse all
that code directly.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-groups

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=realtime-groups

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=realtime-groups

xfsdocs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-documentation.git/log/?h=realtime-groups
---
Commits in this patchset:
 * common/populate: refactor caching of metadumps to a helper
 * common/{fuzzy,populate}: use _scratch_xfs_mdrestore
 * fuzzy: stress data and rt sections of xfs filesystems equally
 * fuzzy: run fsx on data and rt sections of xfs filesystems equally
 * common/ext4: reformat external logs during mdrestore operations
 * common/populate: use metadump v2 format by default for fs metadata snapshots
 * punch-alternating: detect xfs realtime files with large allocation units
 * xfs/206: update mkfs filtering for rt groups feature
 * common: pass the realtime device to xfs_db when possible
 * xfs/185: update for rtgroups
 * xfs/449: update test to know about xfs_db -R
 * xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands
 * common/xfs: capture realtime devices during metadump/mdrestore
 * common/fuzzy: adapt the scrub stress tests to support rtgroups
 * xfs: fix fuzz tests of rtgroups bitmap and summary files
---
 common/ext4             |   17 +++++-
 common/fuzzy            |  138 ++++++++++++++++++++++++++++++++++++-----------
 common/metadump         |   22 ++++++-
 common/populate         |   85 +++++++++++++++++------------
 common/xfs              |   87 +++++++++++++++++++++++++++---
 src/punch-alternating.c |   28 +++++++++-
 tests/xfs/114           |    4 +
 tests/xfs/146           |    2 -
 tests/xfs/185           |   65 +++++++++++++++++-----
 tests/xfs/187           |    3 +
 tests/xfs/206           |    1 
 tests/xfs/271           |    4 +
 tests/xfs/341           |    4 +
 tests/xfs/449           |    6 ++
 tests/xfs/556           |   16 +++--
 tests/xfs/581           |    9 +++
 tests/xfs/582           |   14 ++---
 tests/xfs/720           |    2 -
 tests/xfs/739           |    6 ++
 tests/xfs/740           |    6 ++
 tests/xfs/741           |    6 ++
 tests/xfs/742           |    6 ++
 tests/xfs/743           |    6 ++
 tests/xfs/744           |    6 ++
 tests/xfs/745           |    6 ++
 tests/xfs/746           |    6 ++
 tests/xfs/793           |   14 ++---
 tests/xfs/795           |    2 -
 28 files changed, 436 insertions(+), 135 deletions(-)


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

* [PATCHSET v6.4 07/12] fstests: store quota files in the metadir
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (5 preceding siblings ...)
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
@ 2025-02-19  0:47 ` Darrick J. Wong
  2025-02-19  1:01   ` [PATCH 1/4] xfs: update tests for " Darrick J. Wong
                     ` (4 more replies)
  2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
                   ` (4 subsequent siblings)
  11 siblings, 5 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:47 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Store the quota files in the metadata directory tree instead of the superblock.
Since we're introducing a new incompat feature flag, let's also make the mount
process bring up quotas in whatever state they were when the filesystem was
last unmounted, instead of requiring sysadmins to remember that themselves.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=metadir-quotas

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=metadir-quotas

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=metadir-quotas
---
Commits in this patchset:
 * xfs: update tests for quota files in the metadir
 * xfs: test persistent quota flags
 * xfs: fix quota detection in fuzz tests
 * xfs: fix tests for persistent qflags
---
 common/quota              |    1 
 common/rc                 |    1 
 common/xfs                |   21 ++++++
 tests/generic/563         |    8 ++
 tests/xfs/007             |    2 -
 tests/xfs/096             |    1 
 tests/xfs/096.out         |    2 -
 tests/xfs/106             |    2 -
 tests/xfs/116             |   13 ++++
 tests/xfs/116.cfg         |    1 
 tests/xfs/116.out.default |    0 
 tests/xfs/116.out.metadir |    3 +
 tests/xfs/152             |    2 -
 tests/xfs/1891            |  128 +++++++++++++++++++++++++++++++++++++++
 tests/xfs/1891.out        |  147 +++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/263             |    1 
 tests/xfs/263.out         |    2 -
 tests/xfs/425             |    5 +-
 tests/xfs/426             |    5 +-
 tests/xfs/427             |    5 +-
 tests/xfs/428             |    5 +-
 tests/xfs/429             |    5 +-
 tests/xfs/430             |    5 +-
 tests/xfs/487             |    5 +-
 tests/xfs/488             |    5 +-
 tests/xfs/489             |    5 +-
 tests/xfs/779             |    5 +-
 tests/xfs/780             |    5 +-
 tests/xfs/781             |    5 +-
 29 files changed, 376 insertions(+), 19 deletions(-)
 create mode 100644 tests/xfs/116.cfg
 rename tests/xfs/{116.out => 116.out.default} (100%)
 create mode 100644 tests/xfs/116.out.metadir
 create mode 100755 tests/xfs/1891
 create mode 100644 tests/xfs/1891.out


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

* [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (6 preceding siblings ...)
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
@ 2025-02-19  0:47 ` Darrick J. Wong
  2025-02-19  1:02   ` [PATCH 1/3] common: enable testing of realtime quota when supported Darrick J. Wong
                     ` (2 more replies)
  2025-02-19  0:48 ` [PATCHSET 09/12] fstests: check new 6.14 behaviors Darrick J. Wong
                   ` (3 subsequent siblings)
  11 siblings, 3 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:47 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

The sole patch in this series sets up functional testing for quota on
the xfs realtime device.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-quotas

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=realtime-quotas

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=realtime-quotas
---
Commits in this patchset:
 * common: enable testing of realtime quota when supported
 * xfs: fix quota tests to adapt to realtime quota
 * xfs: regression testing of quota on the realtime device
---
 common/populate    |   10 ++-
 common/quota       |   45 ++++++++-----
 common/xfs         |   62 +++++++++++++++++++
 tests/generic/219  |    1 
 tests/generic/230  |    1 
 tests/generic/305  |    1 
 tests/generic/326  |    1 
 tests/generic/327  |    1 
 tests/generic/328  |    1 
 tests/generic/566  |    4 +
 tests/generic/587  |    1 
 tests/generic/603  |    1 
 tests/generic/691  |    2 +
 tests/generic/710  |    4 +
 tests/xfs/050      |    2 +
 tests/xfs/096      |    4 +
 tests/xfs/106      |    1 
 tests/xfs/108      |    2 +
 tests/xfs/152      |    1 
 tests/xfs/153      |    2 +
 tests/xfs/161      |    1 
 tests/xfs/1858     |  174 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1858.out |   47 ++++++++++++++
 tests/xfs/213      |    1 
 tests/xfs/214      |    1 
 tests/xfs/220      |    2 +
 tests/xfs/299      |    2 +
 tests/xfs/330      |    1 
 tests/xfs/434      |    1 
 tests/xfs/435      |    1 
 tests/xfs/440      |    3 +
 tests/xfs/441      |    1 
 tests/xfs/442      |    1 
 tests/xfs/508      |    2 +
 tests/xfs/511      |   10 +++
 tests/xfs/720      |    5 +
 36 files changed, 377 insertions(+), 23 deletions(-)
 create mode 100755 tests/xfs/1858
 create mode 100644 tests/xfs/1858.out


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

* [PATCHSET 09/12] fstests: check new 6.14 behaviors
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (7 preceding siblings ...)
  2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
@ 2025-02-19  0:48 ` Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 1/1] common: test statfs reporting with project quota Darrick J. Wong
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:48 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Adjust fstests to check for new behaviors introduced in 6.14.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=linux-6.14-sync
---
Commits in this patchset:
 * common: test statfs reporting with project quota
---
 tests/generic/1955     |  114 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/1955.out |   13 +++++
 2 files changed, 127 insertions(+)
 create mode 100755 tests/generic/1955
 create mode 100644 tests/generic/1955.out


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

* [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (8 preceding siblings ...)
  2025-02-19  0:48 ` [PATCHSET 09/12] fstests: check new 6.14 behaviors Darrick J. Wong
@ 2025-02-19  0:48 ` Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode Darrick J. Wong
                     ` (12 more replies)
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
  2025-02-19  0:49 ` [PATCHSET 12/12] fstests: dump fs directory trees Darrick J. Wong
  11 siblings, 13 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:48 UTC (permalink / raw)
  To: zlang, djwong; +Cc: fstests, hch, linux-xfs, fstests

Hi all,

Fix a few regressions in fstests when rmap is enabled on the realtime
volume.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-rmap

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=realtime-rmap

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=realtime-rmap

xfsdocs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-documentation.git/log/?h=realtime-rmap
---
Commits in this patchset:
 * xfs: fix tests that try to access the realtime rmap inode
 * xfs/336: port to common/metadump
 * fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file
 * xfs: race fsstress with realtime rmap btree scrub and repair
 * xfs: fix various problems with fsmap detecting the data device
 * xfs/341: update test for rtgroup-based rmap
 * xfs/3{43,32}: adapt tests for rt extent size greater than 1
 * xfs/291: use _scratch_mkfs_sized instead of opencoding the logic
 * xfs: skip tests if formatting small filesystem fails
 * xfs/443: use file allocation unit, not dbsize
 * populate: adjust rtrmap calculations for rtgroups
 * populate: check that we created a realtime rmap btree of the given height
 * fuzzy: create missing fuzz tests for rt rmap btrees
---
 common/populate    |   36 +++++++++++++++++++++++++
 common/xfs         |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/104      |    1 +
 tests/xfs/122.out  |    1 -
 tests/xfs/1528     |   38 +++++++++++++++++++++++++++
 tests/xfs/1528.out |    4 +++
 tests/xfs/1529     |   37 ++++++++++++++++++++++++++
 tests/xfs/1529.out |    4 +++
 tests/xfs/1817     |   39 +++++++++++++++++++++++++++
 tests/xfs/1817.out |    2 +
 tests/xfs/1821     |   45 ++++++++++++++++++++++++++++++++
 tests/xfs/1821.out |    2 +
 tests/xfs/1857     |   39 +++++++++++++++++++++++++++
 tests/xfs/1857.out |    2 +
 tests/xfs/1893     |    2 +
 tests/xfs/272      |    2 +
 tests/xfs/276      |    2 +
 tests/xfs/277      |    2 +
 tests/xfs/291      |    2 +
 tests/xfs/332      |    6 +---
 tests/xfs/332.out  |    2 -
 tests/xfs/333      |   43 ------------------------------
 tests/xfs/333.out  |    6 ----
 tests/xfs/336      |   34 ++++++++----------------
 tests/xfs/336.out  |    4 +--
 tests/xfs/337      |    2 +
 tests/xfs/338      |   30 ++++++++++++++++++---
 tests/xfs/339      |    5 ++--
 tests/xfs/340      |   25 ++++++++++++++----
 tests/xfs/341      |   12 +++-----
 tests/xfs/341.out  |    1 -
 tests/xfs/342      |    4 +--
 tests/xfs/343      |    2 +
 tests/xfs/406      |    6 +++-
 tests/xfs/407      |    6 +++-
 tests/xfs/408      |    7 ++++-
 tests/xfs/409      |    7 ++++-
 tests/xfs/443      |    9 ++++--
 tests/xfs/481      |    6 +++-
 tests/xfs/482      |    7 ++++-
 40 files changed, 429 insertions(+), 129 deletions(-)
 create mode 100755 tests/xfs/1528
 create mode 100644 tests/xfs/1528.out
 create mode 100755 tests/xfs/1529
 create mode 100644 tests/xfs/1529.out
 create mode 100755 tests/xfs/1817
 create mode 100644 tests/xfs/1817.out
 create mode 100755 tests/xfs/1821
 create mode 100644 tests/xfs/1821.out
 create mode 100755 tests/xfs/1857
 create mode 100644 tests/xfs/1857.out
 delete mode 100755 tests/xfs/333
 delete mode 100644 tests/xfs/333.out


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

* [PATCHSET v6.4 11/12] fstests: reflink on the realtime device
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (9 preceding siblings ...)
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
@ 2025-02-19  0:48 ` Darrick J. Wong
  2025-02-19  1:07   ` [PATCH 1/7] common/populate: create realtime refcount btree Darrick J. Wong
                     ` (6 more replies)
  2025-02-19  0:49 ` [PATCHSET 12/12] fstests: dump fs directory trees Darrick J. Wong
  11 siblings, 7 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:48 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

This patchset enables use of the file data block sharing feature (i.e.
reflink) on the realtime device.  It follows the same basic sequence as
the realtime rmap series -- first a few cleanups; then widening of the
API parameters; and introduction of the new btree format and inode fork
format.  Next comes enabling CoW and remapping for the rt device; new
scrub, repair, and health reporting code; and at the end we implement
some code to lengthen write requests so that rt extents are always CoWed
fully.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=realtime-reflink

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=realtime-reflink

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=realtime-reflink

xfsdocs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-documentation.git/log/?h=realtime-reflink
---
Commits in this patchset:
 * common/populate: create realtime refcount btree
 * xfs: create fuzz tests for the realtime refcount btree
 * xfs/27[24]: adapt for checking files on the realtime volume
 * xfs: race fsstress with realtime refcount btree scrub and repair
 * xfs: remove xfs/131 now that we allow reflink on realtime volumes
 * generic/331,xfs/240: support files that skip delayed allocation
 * common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section
---
 common/populate       |   26 ++++++++++++++++++---
 common/xfs            |   15 ++++++++++++
 tests/generic/331     |   13 +++++++++-
 tests/generic/331.out |    2 +-
 tests/xfs/131         |   46 ------------------------------------
 tests/xfs/131.out     |    5 ----
 tests/xfs/1538        |   38 ++++++++++++++++++++++++++++++
 tests/xfs/1538.out    |    4 +++
 tests/xfs/1539        |   38 ++++++++++++++++++++++++++++++
 tests/xfs/1539.out    |    4 +++
 tests/xfs/1540        |   38 ++++++++++++++++++++++++++++++
 tests/xfs/1540.out    |    4 +++
 tests/xfs/1541        |   39 +++++++++++++++++++++++++++++++
 tests/xfs/1541.out    |    4 +++
 tests/xfs/1542        |   38 ++++++++++++++++++++++++++++++
 tests/xfs/1542.out    |    4 +++
 tests/xfs/1543        |   37 +++++++++++++++++++++++++++++
 tests/xfs/1543.out    |    4 +++
 tests/xfs/1544        |   37 +++++++++++++++++++++++++++++
 tests/xfs/1544.out    |    4 +++
 tests/xfs/1545        |   38 ++++++++++++++++++++++++++++++
 tests/xfs/1545.out    |    4 +++
 tests/xfs/1818        |   40 ++++++++++++++++++++++++++++++++
 tests/xfs/1818.out    |    2 ++
 tests/xfs/1819        |   40 ++++++++++++++++++++++++++++++++
 tests/xfs/1819.out    |    2 ++
 tests/xfs/1893        |    2 +-
 tests/xfs/240         |   12 ++++++++-
 tests/xfs/240.out     |    2 +-
 tests/xfs/272         |   40 +++++++++++++++++++++-----------
 tests/xfs/274         |   62 ++++++++++++++++++++++++++++++++++---------------
 31 files changed, 551 insertions(+), 93 deletions(-)
 delete mode 100755 tests/xfs/131
 delete mode 100644 tests/xfs/131.out
 create mode 100755 tests/xfs/1538
 create mode 100644 tests/xfs/1538.out
 create mode 100755 tests/xfs/1539
 create mode 100644 tests/xfs/1539.out
 create mode 100755 tests/xfs/1540
 create mode 100644 tests/xfs/1540.out
 create mode 100755 tests/xfs/1541
 create mode 100644 tests/xfs/1541.out
 create mode 100755 tests/xfs/1542
 create mode 100644 tests/xfs/1542.out
 create mode 100755 tests/xfs/1543
 create mode 100644 tests/xfs/1543.out
 create mode 100755 tests/xfs/1544
 create mode 100644 tests/xfs/1544.out
 create mode 100755 tests/xfs/1545
 create mode 100644 tests/xfs/1545.out
 create mode 100755 tests/xfs/1818
 create mode 100644 tests/xfs/1818.out
 create mode 100755 tests/xfs/1819
 create mode 100644 tests/xfs/1819.out


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

* [PATCHSET 12/12] fstests: dump fs directory trees
  2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
                   ` (10 preceding siblings ...)
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
@ 2025-02-19  0:49 ` Darrick J. Wong
  2025-02-19  1:09   ` [PATCH 1/1] xfs: test filesystem recovery with rdump Darrick J. Wong
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:49 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

Hi all,

Here's a functional test for recovering parts or entire filesystem
trees with xfs_db.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=rdump

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=rdump
---
Commits in this patchset:
 * xfs: test filesystem recovery with rdump
---
 tests/xfs/1895     |  153 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1895.out |    6 ++
 2 files changed, 159 insertions(+)
 create mode 100755 tests/xfs/1895
 create mode 100644 tests/xfs/1895.out


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

* [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT
  2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
@ 2025-02-19  0:49   ` Darrick J. Wong
  2025-02-19  5:50     ` Christoph Hellwig
  2025-02-19  0:49   ` [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size Darrick J. Wong
  1 sibling, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:49 UTC (permalink / raw)
  To: zlang, djwong; +Cc: fstests, hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Fix this build error:

In file included from /usr/include/fcntl.h:314,
                 from dio-writeback-race.c:40:
In function 'open',
    inlined from 'main' at dio-writeback-race.c:110:7:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:11: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
   50 |           __open_missing_mode ();
      |           ^~~~~~~~~~~~~~~~~~~~~~

Cc: <fstests@vger.kernel.org> # v2025.02.16
Fixes: 17fb49493426ad ("fstests: add a generic test to verify direct IO writes with buffer contents change")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 src/dio-writeback-race.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/src/dio-writeback-race.c b/src/dio-writeback-race.c
index 963ed207fc1b6b..2d3156e5b0974a 100644
--- a/src/dio-writeback-race.c
+++ b/src/dio-writeback-race.c
@@ -107,7 +107,7 @@ int main (int argc, char *argv[])
 		fprintf(stderr, "failed to allocate aligned memory\n");
 		exit(EXIT_FAILURE);
 	}
-	fd = open(argv[optind], O_DIRECT | O_WRONLY | O_CREAT);
+	fd = open(argv[optind], O_DIRECT | O_WRONLY | O_CREAT, 0600);
 	if (fd < 0) {
 		fprintf(stderr, "failed to open file '%s': %m\n", argv[optind]);
 		goto error;


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

* [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size
  2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT Darrick J. Wong
@ 2025-02-19  0:49   ` Darrick J. Wong
  2025-02-19  5:51     ` Christoph Hellwig
  1 sibling, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:49 UTC (permalink / raw)
  To: zlang, djwong; +Cc: fstests, hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

There's no need to align the memory buffer for the direcio write to the
file allocation unit size; base page size will do.  This fixes the
following error when generic/761 is run against an XFS rt filesystem
with a 28k rtextsize:

 QA output created by 761
+failed to allocate aligned memory
+cat: /opt/foobar: No such file or directory
 Silence is golden

Cc: <fstests@vger.kernel.org> # v2025.02.16
Fixes: 17fb49493426ad ("fstests: add a generic test to verify direct IO writes with buffer contents change")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 src/dio-writeback-race.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/src/dio-writeback-race.c b/src/dio-writeback-race.c
index 2d3156e5b0974a..cca7d0e3b94cc9 100644
--- a/src/dio-writeback-race.c
+++ b/src/dio-writeback-race.c
@@ -102,7 +102,7 @@ int main (int argc, char *argv[])
 		fprintf(stderr, "missing argument\n");
 		goto error;
 	}
-	ret = posix_memalign(&buf, blocksize, blocksize);
+	ret = posix_memalign(&buf, sysconf(_SC_PAGESIZE), blocksize);
 	if (!buf) {
 		fprintf(stderr, "failed to allocate aligned memory\n");
 		exit(EXIT_FAILURE);


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

* [PATCH 1/3] logwrites: warn if we don't think read after discard returns zeroes
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
@ 2025-02-19  0:49   ` Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 2/3] logwrites: use BLKZEROOUT if it's available Darrick J. Wong
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:49 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The logwrites replay program expects that it can issue a DISCARD against
the block device passed to _log_writes_init and that will cause all
subsequent reads to return zeroes.  This is required for correct log
recovery on filesystems such as XFS that skip recovering buffers if
newer ones are found on disk.

Unfortunately, there's no way to discover if a device's discard
implementation actually guarantees zeroes.  There used to be a sysfs
knob keyed to an allowlist, but it is now hardwired to return 0.  So
either we need a magic device that does discard-and-zero, or we need to
do the zeroing ourselves.  The logwrites program does its own zeroing if
there is no discard support, and some tests do their own zeroing.

The only devices we know to work reliably are the software defined ones
that are provided by the kernel itself -- which means dm-thinp.  Warn if
we have a device that supports discard that isn't thinp and the test
fails.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/dmlogwrites |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)


diff --git a/common/dmlogwrites b/common/dmlogwrites
index a27e1966a933a6..96101d53c38b4a 100644
--- a/common/dmlogwrites
+++ b/common/dmlogwrites
@@ -59,6 +59,35 @@ _require_log_writes_dax_mountopt()
 	fi
 }
 
+_log_writes_check_bdev()
+{
+	local sysfs="/sys/block/$(_short_dev $1)"
+
+	# Some filesystems (e.g. XFS) optimize log recovery by assuming that
+	# they can elide replay of metadata blocks if the block has a higher
+	# log serial number than the transaction being recovered.  This is a
+	# problem if the filesystem log contents can go back in time, which is
+	# what the logwrites replay program does.
+	#
+	# The logwrites replay program begins by erasing the block device's
+	# contents.  This can be done very quickly with DISCARD provided the
+	# device guarantees that all reads after a DISCARD return zeroes, or
+	# very slowly by writing zeroes to the device.  Fast is preferable, but
+	# there's no longer any way to detect that DISCARD actually unmaps
+	# zeroes, so warn the user about this requirement if the test happens
+	# to fail.
+
+	# No discard support means the logwrites will do its own zeroing
+	test "$(cat "$sysfs/queue/discard_max_bytes")" -eq 0 && return
+
+	# dm-thinp guarantees that reads after discards return zeroes
+	dmsetup status "$blkdev" 2>/dev/null | grep -q '^0.* thin ' && return
+
+	echo "HINT: $blkdev doesn't guarantee that reads after DISCARD will return zeroes" >> $seqres.hints
+	echo "      This is required for correct journal replay on some filesystems (e.g. xfs)" >> $seqres.hints
+	echo >> $seqres.hints
+}
+
 # Set up a dm-log-writes device
 #
 # blkdev: the specified target device
@@ -84,6 +113,8 @@ _log_writes_init()
 	LOGWRITES_NAME=logwrites-test
 	LOGWRITES_DMDEV=/dev/mapper/$LOGWRITES_NAME
 	LOGWRITES_TABLE="0 $BLK_DEV_SIZE log-writes $blkdev $LOGWRITES_DEV"
+
+	_log_writes_check_bdev "$blkdev"
 	_dmsetup_create $LOGWRITES_NAME --table "$LOGWRITES_TABLE" || \
 		_fail "failed to create log-writes device"
 }


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

* [PATCH 2/3] logwrites: use BLKZEROOUT if it's available
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 1/3] logwrites: warn if we don't think read after discard returns zeroes Darrick J. Wong
@ 2025-02-19  0:50   ` Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 3/3] logwrites: only use BLKDISCARD if we know discard zeroes data Darrick J. Wong
  2025-02-19  5:55   ` [PATCHSET 02/12] fstests: fix logwrites zeroing Christoph Hellwig
  3 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:50 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Use the BLKZEROOUT ioctl instead of writing zeroed buffers if the kernel
supports it.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 src/log-writes/log-writes.h |    1 +
 src/log-writes/log-writes.c |   10 ++++++++++
 2 files changed, 11 insertions(+)


diff --git a/src/log-writes/log-writes.h b/src/log-writes/log-writes.h
index b9f571ac3b2384..f659931634e64a 100644
--- a/src/log-writes/log-writes.h
+++ b/src/log-writes/log-writes.h
@@ -63,6 +63,7 @@ struct log_write_entry {
 
 #define LOG_IGNORE_DISCARD (1 << 0)
 #define LOG_DISCARD_NOT_SUPP (1 << 1)
+#define LOG_ZEROOUT_NOT_SUPP (1 << 2)
 
 struct log {
 	int logfd;
diff --git a/src/log-writes/log-writes.c b/src/log-writes/log-writes.c
index aa53473974d9e8..8f94ae5629e085 100644
--- a/src/log-writes/log-writes.c
+++ b/src/log-writes/log-writes.c
@@ -42,6 +42,7 @@ static int discard_range(struct log *log, u64 start, u64 len)
 
 static int zero_range(struct log *log, u64 start, u64 len)
 {
+	u64 range[2] = { start, len };
 	u64 bufsize = len;
 	ssize_t ret;
 	char *buf = NULL;
@@ -54,6 +55,15 @@ static int zero_range(struct log *log, u64 start, u64 len)
 		return 0;
 	}
 
+	if (!(log->flags & LOG_ZEROOUT_NOT_SUPP)) {
+		if (ioctl(log->replayfd, BLKZEROOUT, &range) < 0) {
+			if (log_writes_verbose)
+				printf(
+ "replay device doesn't support zeroout, switching to writing zeros\n");
+			log->flags |= LOG_ZEROOUT_NOT_SUPP;
+		}
+	}
+
 	while (!buf) {
 		buf = malloc(bufsize);
 		if (!buf)


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

* [PATCH 3/3] logwrites: only use BLKDISCARD if we know discard zeroes data
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
  2025-02-19  0:49   ` [PATCH 1/3] logwrites: warn if we don't think read after discard returns zeroes Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 2/3] logwrites: use BLKZEROOUT if it's available Darrick J. Wong
@ 2025-02-19  0:50   ` Darrick J. Wong
  2025-02-19  5:55   ` [PATCHSET 02/12] fstests: fix logwrites zeroing Christoph Hellwig
  3 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:50 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Building off the checks established in the previous patch, only enable
the use of BLKDISCARD if we know that the logwrites device guarantees
that reads after a discard return zeroes.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/dmlogwrites          |   10 ++++++++--
 src/log-writes/replay-log.c |    8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)


diff --git a/common/dmlogwrites b/common/dmlogwrites
index 96101d53c38b4a..fbc8beb5ce597e 100644
--- a/common/dmlogwrites
+++ b/common/dmlogwrites
@@ -81,7 +81,10 @@ _log_writes_check_bdev()
 	test "$(cat "$sysfs/queue/discard_max_bytes")" -eq 0 && return
 
 	# dm-thinp guarantees that reads after discards return zeroes
-	dmsetup status "$blkdev" 2>/dev/null | grep -q '^0.* thin ' && return
+	if dmsetup status "$blkdev" 2>/dev/null | grep -q '^0.* thin '; then
+		LOGWRITES_REPLAY_ARGS+=(--discard-zeroes-data)
+		return
+	fi
 
 	echo "HINT: $blkdev doesn't guarantee that reads after DISCARD will return zeroes" >> $seqres.hints
 	echo "      This is required for correct journal replay on some filesystems (e.g. xfs)" >> $seqres.hints
@@ -110,6 +113,7 @@ _log_writes_init()
 		BLK_DEV_SIZE=$((length / blksz))
 	fi
 
+	LOGWRITES_REPLAY_ARGS=()
 	LOGWRITES_NAME=logwrites-test
 	LOGWRITES_DMDEV=/dev/mapper/$LOGWRITES_NAME
 	LOGWRITES_TABLE="0 $BLK_DEV_SIZE log-writes $blkdev $LOGWRITES_DEV"
@@ -161,7 +165,8 @@ _log_writes_replay_log()
 	[ $? -ne 0 ] && _fail "mark '$_mark' does not exist"
 
 	$here/src/log-writes/replay-log --log $LOGWRITES_DEV --replay $_blkdev \
-		--end-mark $_mark >> $seqres.full 2>&1
+		--end-mark $_mark "${LOGWRITES_REPLAY_ARGS[@]}" \
+		>> $seqres.full 2>&1
 	[ $? -ne 0 ] && _fail "replay failed"
 }
 
@@ -231,6 +236,7 @@ _log_writes_replay_log_range()
 	echo "=== replay to $end ===" >> $seqres.full
 	$here/src/log-writes/replay-log -vv --log $LOGWRITES_DEV \
 		--replay $blkdev --limit $(($end + 1)) \
+		"${LOGWRITES_REPLAY_ARGS[@]}" \
 		>> $seqres.full 2>&1
 	[ $? -ne 0 ] && _fail "replay failed"
 }
diff --git a/src/log-writes/replay-log.c b/src/log-writes/replay-log.c
index 968c82ab64a9ad..e07401f63af573 100644
--- a/src/log-writes/replay-log.c
+++ b/src/log-writes/replay-log.c
@@ -18,6 +18,7 @@ enum option_indexes {
 	FIND,
 	NUM_ENTRIES,
 	NO_DISCARD,
+	DISCARD_ZEROES_DATA,
 	FSCK,
 	CHECK,
 	START_MARK,
@@ -37,6 +38,7 @@ static struct option long_options[] = {
 	{"find", no_argument, NULL, 0},
 	{"num-entries", no_argument, NULL, 0},
 	{"no-discard", no_argument, NULL, 0},
+	{"discard-zeroes-data", no_argument, NULL, 0},
 	{"fsck", required_argument, NULL, 0},
 	{"check", required_argument, NULL, 0},
 	{"start-mark", required_argument, NULL, 0},
@@ -155,6 +157,7 @@ int main(int argc, char **argv)
 	int ret;
 	int print_num_entries = 0;
 	int discard = 1;
+	int use_kernel_discard = 0;
 	enum log_replay_check_mode check_mode = 0;
 
 	while ((c = getopt_long(argc, argv, "v", long_options,
@@ -242,6 +245,9 @@ int main(int argc, char **argv)
 		case NO_DISCARD:
 			discard = 0;
 			break;
+		case DISCARD_ZEROES_DATA:
+			use_kernel_discard = 1;
+			break;
 		case FSCK:
 			fsck_command = strdup(optarg);
 			if (!fsck_command) {
@@ -299,6 +305,8 @@ int main(int argc, char **argv)
 
 	if (!discard)
 		log->flags |= LOG_IGNORE_DISCARD;
+	if (!use_kernel_discard)
+		log->flags |= LOG_DISCARD_NOT_SUPP;
 
 	log->start_sector = start_sector;
 	log->end_sector = end_sector;


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

* [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
@ 2025-02-19  0:50   ` Darrick J. Wong
  2025-02-19  5:56     ` Christoph Hellwig
  2025-02-19  0:50   ` [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair Darrick J. Wong
                     ` (10 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:50 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that online fsck has been in the upstream kernel for 8 months, I
think it's stabilized enough that we don't need to hide the stress tests
behind the "dangerous" label anymore.

Also rename fsstress_repair to fsstress_online_repair to be consistent
with the online_repair group.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    4 ++--
 tests/xfs/285       |    2 +-
 tests/xfs/286       |    2 +-
 tests/xfs/422       |    2 +-
 tests/xfs/561       |    2 +-
 tests/xfs/562       |    2 +-
 tests/xfs/563       |    2 +-
 tests/xfs/564       |    2 +-
 tests/xfs/565       |    2 +-
 tests/xfs/566       |    2 +-
 tests/xfs/570       |    2 +-
 tests/xfs/571       |    2 +-
 tests/xfs/572       |    2 +-
 tests/xfs/573       |    2 +-
 tests/xfs/574       |    2 +-
 tests/xfs/575       |    2 +-
 tests/xfs/576       |    2 +-
 tests/xfs/577       |    2 +-
 tests/xfs/578       |    2 +-
 tests/xfs/579       |    2 +-
 tests/xfs/580       |    2 +-
 tests/xfs/581       |    2 +-
 tests/xfs/582       |    2 +-
 tests/xfs/583       |    2 +-
 tests/xfs/584       |    2 +-
 tests/xfs/585       |    2 +-
 tests/xfs/586       |    2 +-
 tests/xfs/587       |    2 +-
 tests/xfs/588       |    2 +-
 tests/xfs/589       |    2 +-
 tests/xfs/590       |    2 +-
 tests/xfs/591       |    2 +-
 tests/xfs/592       |    2 +-
 tests/xfs/593       |    2 +-
 tests/xfs/594       |    2 +-
 tests/xfs/595       |    2 +-
 tests/xfs/621       |    2 +-
 tests/xfs/622       |    2 +-
 tests/xfs/628       |    2 +-
 tests/xfs/708       |    2 +-
 tests/xfs/709       |    2 +-
 tests/xfs/710       |    2 +-
 tests/xfs/711       |    2 +-
 tests/xfs/712       |    2 +-
 tests/xfs/713       |    2 +-
 tests/xfs/714       |    2 +-
 tests/xfs/715       |    2 +-
 tests/xfs/717       |    2 +-
 tests/xfs/718       |    2 +-
 tests/xfs/719       |    2 +-
 tests/xfs/721       |    2 +-
 tests/xfs/722       |    2 +-
 tests/xfs/723       |    2 +-
 tests/xfs/724       |    2 +-
 tests/xfs/725       |    2 +-
 tests/xfs/726       |    2 +-
 tests/xfs/727       |    2 +-
 tests/xfs/728       |    2 +-
 tests/xfs/729       |    2 +-
 tests/xfs/731       |    2 +-
 tests/xfs/793       |    2 +-
 tests/xfs/794       |    2 +-
 tests/xfs/796       |    2 +-
 tests/xfs/797       |    2 +-
 tests/xfs/799       |    2 +-
 tests/xfs/800       |    2 +-
 tests/xfs/801       |    2 +-
 67 files changed, 68 insertions(+), 68 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index f5bf79a56c3304..57aa2001311383 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -34,8 +34,6 @@ dangerous_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 dangerous_fuzzers	fuzzers that can crash your computer
 dangerous_norepair	fuzzers to evaluate kernel metadata verifiers
 dangerous_online_repair	fuzzers to evaluate xfs_scrub online repair
-dangerous_fsstress_repair	race fsstress and xfs_scrub online repair
-dangerous_fsstress_scrub	race fsstress and xfs_scrub checking
 dangerous_repair	fuzzers to evaluate xfs_repair offline repair
 dangerous_scrub		fuzzers to evaluate xfs_scrub checking
 dangerous_selftest	selftests that crash/hang
@@ -58,6 +56,8 @@ fsck			general fsck tests
 fsmap			FS_IOC_GETFSMAP ioctl
 fsproperties		Filesystem properties
 fsr			XFS free space reorganizer
+fsstress_online_repair	race fsstress and xfs_scrub online repair
+fsstress_scrub		race fsstress and xfs_scrub checking
 fuzzers			filesystem fuzz tests
 growfs			increasing the size of a filesystem
 hardlink		hardlinks
diff --git a/tests/xfs/285 b/tests/xfs/285
index 909db488b3c3ab..f08cb449b61ad4 100755
--- a/tests/xfs/285
+++ b/tests/xfs/285
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/286 b/tests/xfs/286
index 7743d03718a478..046638296e04c6 100755
--- a/tests/xfs/286
+++ b/tests/xfs/286
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/422 b/tests/xfs/422
index 1043d419145fcf..833fb93a1684e9 100755
--- a/tests/xfs/422
+++ b/tests/xfs/422
@@ -7,7 +7,7 @@
 # Race fsstress and rmapbt repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair freeze
+_begin_fstest online_repair fsstress_online_repair freeze
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/561 b/tests/xfs/561
index bbfcefcb13d13a..baf8a450b96a7e 100755
--- a/tests/xfs/561
+++ b/tests/xfs/561
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 # Override the default cleanup function.
 _cleanup()
diff --git a/tests/xfs/562 b/tests/xfs/562
index 354992a614da67..aac363f071abd8 100755
--- a/tests/xfs/562
+++ b/tests/xfs/562
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 # Override the default cleanup function.
 _cleanup()
diff --git a/tests/xfs/563 b/tests/xfs/563
index 3cd00651e4bf82..db5f94e67a0507 100755
--- a/tests/xfs/563
+++ b/tests/xfs/563
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 # Override the default cleanup function.
 _cleanup()
diff --git a/tests/xfs/564 b/tests/xfs/564
index ae45952fea6034..5c21f5cf305913 100755
--- a/tests/xfs/564
+++ b/tests/xfs/564
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 # Override the default cleanup function.
 _cleanup()
diff --git a/tests/xfs/565 b/tests/xfs/565
index 40f1139ae4a520..43185a253d4d71 100755
--- a/tests/xfs/565
+++ b/tests/xfs/565
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/566 b/tests/xfs/566
index 19c73ff9ec0ab0..5398d1d0827ca2 100755
--- a/tests/xfs/566
+++ b/tests/xfs/566
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/570 b/tests/xfs/570
index 4e64a03a0c8bbb..707ff232807025 100755
--- a/tests/xfs/570
+++ b/tests/xfs/570
@@ -7,7 +7,7 @@
 # Race fsstress and superblock scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/571 b/tests/xfs/571
index 016387b43c631e..ce1ca3969dac22 100755
--- a/tests/xfs/571
+++ b/tests/xfs/571
@@ -7,7 +7,7 @@
 # Race fsstress and AGF scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/572 b/tests/xfs/572
index dfee982504cfd6..01122decf7d9b9 100755
--- a/tests/xfs/572
+++ b/tests/xfs/572
@@ -7,7 +7,7 @@
 # Race fsstress and AGFL scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/573 b/tests/xfs/573
index 5ff1bdbdc7a7d6..11c10a695bddc7 100755
--- a/tests/xfs/573
+++ b/tests/xfs/573
@@ -7,7 +7,7 @@
 # Race fsstress and AGI scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/574 b/tests/xfs/574
index 6250f5142c63ea..a6d7bf91100272 100755
--- a/tests/xfs/574
+++ b/tests/xfs/574
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/575 b/tests/xfs/575
index 6cf321ce47d4fb..75cc73e4c6a5cd 100755
--- a/tests/xfs/575
+++ b/tests/xfs/575
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/576 b/tests/xfs/576
index d3d3e783eea3e5..ffa5cacfb6ab9c 100755
--- a/tests/xfs/576
+++ b/tests/xfs/576
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/577 b/tests/xfs/577
index 35ca1468c2f64a..9afe9b2ee4b74f 100755
--- a/tests/xfs/577
+++ b/tests/xfs/577
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/578 b/tests/xfs/578
index 2101eb55c0a928..cc1203777ff02a 100755
--- a/tests/xfs/578
+++ b/tests/xfs/578
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/579 b/tests/xfs/579
index e552e499296efc..aa72276dd3b216 100755
--- a/tests/xfs/579
+++ b/tests/xfs/579
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/580 b/tests/xfs/580
index dac036f4ae5a0a..70a080e7a34fe5 100755
--- a/tests/xfs/580
+++ b/tests/xfs/580
@@ -8,7 +8,7 @@
 # if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/581 b/tests/xfs/581
index 73b51f994a3f00..39eb42da4b10c5 100755
--- a/tests/xfs/581
+++ b/tests/xfs/581
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/582 b/tests/xfs/582
index f390b77f3439ee..e92f128f8a5695 100755
--- a/tests/xfs/582
+++ b/tests/xfs/582
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/583 b/tests/xfs/583
index dcc60f126ed7f4..fc91d8f2596a44 100755
--- a/tests/xfs/583
+++ b/tests/xfs/583
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/584 b/tests/xfs/584
index 3f62261c06bbb3..12442b53c72abc 100755
--- a/tests/xfs/584
+++ b/tests/xfs/584
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/585 b/tests/xfs/585
index 987c799f5c2011..3f1b814c025349 100755
--- a/tests/xfs/585
+++ b/tests/xfs/585
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/586 b/tests/xfs/586
index d78dea5185ddfc..9e2312f4d1c05a 100755
--- a/tests/xfs/586
+++ b/tests/xfs/586
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/587 b/tests/xfs/587
index a9d4690471193c..0ae2f4c3bcc380 100755
--- a/tests/xfs/587
+++ b/tests/xfs/587
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/588 b/tests/xfs/588
index bd0788d3f18faf..a2249cc4aa9dbe 100755
--- a/tests/xfs/588
+++ b/tests/xfs/588
@@ -7,7 +7,7 @@
 # Race fsstress and data fork scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/589 b/tests/xfs/589
index 806c445fc43f2d..378e4f678ec51f 100755
--- a/tests/xfs/589
+++ b/tests/xfs/589
@@ -7,7 +7,7 @@
 # Race fsstress and attr fork scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/590 b/tests/xfs/590
index 59a42f11b68983..3a200ffc93c744 100755
--- a/tests/xfs/590
+++ b/tests/xfs/590
@@ -7,7 +7,7 @@
 # Race fsstress and cow fork scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/591 b/tests/xfs/591
index 9f080ebbefa7f7..856e2dfd1f0f51 100755
--- a/tests/xfs/591
+++ b/tests/xfs/591
@@ -7,7 +7,7 @@
 # Race fsstress and directory scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/592 b/tests/xfs/592
index 653ad256905fef..998be997519347 100755
--- a/tests/xfs/592
+++ b/tests/xfs/592
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/593 b/tests/xfs/593
index 118b7e75931d24..1706c83b912cc5 100755
--- a/tests/xfs/593
+++ b/tests/xfs/593
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/594 b/tests/xfs/594
index c86234e1f62778..7de5eed556eda7 100755
--- a/tests/xfs/594
+++ b/tests/xfs/594
@@ -8,7 +8,7 @@
 # We can't open symlink files directly for scrubbing, so we use xfs_scrub(8).
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/595 b/tests/xfs/595
index 75797b6cc41107..12cd0352b559cb 100755
--- a/tests/xfs/595
+++ b/tests/xfs/595
@@ -9,7 +9,7 @@
 # xfs_scrub(8).
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/621 b/tests/xfs/621
index 24fbbc4e9bbc0e..feafc6fd560b0d 100755
--- a/tests/xfs/621
+++ b/tests/xfs/621
@@ -8,7 +8,7 @@
 # see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/622 b/tests/xfs/622
index 59503cfa940422..2ba27947b39139 100755
--- a/tests/xfs/622
+++ b/tests/xfs/622
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/628 b/tests/xfs/628
index 8dc2689888e778..c77d67db358983 100755
--- a/tests/xfs/628
+++ b/tests/xfs/628
@@ -9,7 +9,7 @@
 # handle unlinked directories.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 # Import common functions.
 . ./common/filter
diff --git a/tests/xfs/708 b/tests/xfs/708
index 40c4d92d241b74..6e4e98f40ced96 100755
--- a/tests/xfs/708
+++ b/tests/xfs/708
@@ -7,7 +7,7 @@
 # Race fsstress and bnobt repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/709 b/tests/xfs/709
index 3a29ca12fc3b23..ae531359199e09 100755
--- a/tests/xfs/709
+++ b/tests/xfs/709
@@ -7,7 +7,7 @@
 # Race fsstress and inobt repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/710 b/tests/xfs/710
index dc599c0b647ab2..4e9d9862801e13 100755
--- a/tests/xfs/710
+++ b/tests/xfs/710
@@ -7,7 +7,7 @@
 # Race fsstress and refcountbt repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/711 b/tests/xfs/711
index 685ada10b82693..2bd2812cee8a0c 100755
--- a/tests/xfs/711
+++ b/tests/xfs/711
@@ -7,7 +7,7 @@
 # Race fsstress and superblock repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/712 b/tests/xfs/712
index 15a94a525bd99c..ef6afdc681704b 100755
--- a/tests/xfs/712
+++ b/tests/xfs/712
@@ -7,7 +7,7 @@
 # Race fsstress and agf repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/713 b/tests/xfs/713
index 551653917eba4b..32603fd1ddd6dc 100755
--- a/tests/xfs/713
+++ b/tests/xfs/713
@@ -7,7 +7,7 @@
 # Race fsstress and agfl repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/714 b/tests/xfs/714
index aa209ce5bb21ee..4371d93f125031 100755
--- a/tests/xfs/714
+++ b/tests/xfs/714
@@ -7,7 +7,7 @@
 # Race fsstress and agi repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/715 b/tests/xfs/715
index e6821c02556c98..01c1963ef974d8 100755
--- a/tests/xfs/715
+++ b/tests/xfs/715
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/717 b/tests/xfs/717
index 6368d704b8b0ee..ac8e83f66749d8 100755
--- a/tests/xfs/717
+++ b/tests/xfs/717
@@ -7,7 +7,7 @@
 # Race fsstress and data fork repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/718 b/tests/xfs/718
index 7b0fe2c467876c..6bff5461f20976 100755
--- a/tests/xfs/718
+++ b/tests/xfs/718
@@ -7,7 +7,7 @@
 # Race fsstress and attr fork repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/719 b/tests/xfs/719
index 81805402055468..8ea2faf796dc19 100755
--- a/tests/xfs/719
+++ b/tests/xfs/719
@@ -7,7 +7,7 @@
 # Race fsstress and CoW fork repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/721 b/tests/xfs/721
index c25cd269d8470b..fe9a93314e09d5 100755
--- a/tests/xfs/721
+++ b/tests/xfs/721
@@ -8,7 +8,7 @@
 # We can't open special files directly for scrubbing, so we use xfs_scrub(8).
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/722 b/tests/xfs/722
index b96163e32d0570..f04914945c4522 100755
--- a/tests/xfs/722
+++ b/tests/xfs/722
@@ -9,7 +9,7 @@
 # xfs_scrub(8).
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/723 b/tests/xfs/723
index 21b608aaae3f56..1cd3f7a7922503 100755
--- a/tests/xfs/723
+++ b/tests/xfs/723
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/724 b/tests/xfs/724
index a832063bed9573..890140b9978b7c 100755
--- a/tests/xfs/724
+++ b/tests/xfs/724
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/725 b/tests/xfs/725
index 2972aeb7164c4a..7e843d75689ed0 100755
--- a/tests/xfs/725
+++ b/tests/xfs/725
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/726 b/tests/xfs/726
index f4bedcca5f9fc7..24f5ef7e352b63 100755
--- a/tests/xfs/726
+++ b/tests/xfs/726
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/727 b/tests/xfs/727
index 2e882775442e71..d9abea46b36a91 100755
--- a/tests/xfs/727
+++ b/tests/xfs/727
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/728 b/tests/xfs/728
index b4cf95f57baae2..cc3f41c6b7e6cf 100755
--- a/tests/xfs/728
+++ b/tests/xfs/728
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/729 b/tests/xfs/729
index 45d65892eac29d..710ace978abdb8 100755
--- a/tests/xfs/729
+++ b/tests/xfs/729
@@ -7,7 +7,7 @@
 # Race fsstress and nlinks scrub for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/731 b/tests/xfs/731
index 8cc38f5841119f..496fd78a58cf77 100755
--- a/tests/xfs/731
+++ b/tests/xfs/731
@@ -9,7 +9,7 @@
 # filesystem activity, so we can't have userspace wandering in and thawing it.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 # Override the default cleanup function.
 _cleanup()
diff --git a/tests/xfs/793 b/tests/xfs/793
index d942d9807967b5..a779bf81738537 100755
--- a/tests/xfs/793
+++ b/tests/xfs/793
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/794 b/tests/xfs/794
index cdccf9699861f3..e0025ed5729658 100755
--- a/tests/xfs/794
+++ b/tests/xfs/794
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/796 b/tests/xfs/796
index e6a88cc6b21f89..df1161b7288c99 100755
--- a/tests/xfs/796
+++ b/tests/xfs/796
@@ -7,7 +7,7 @@
 # Race fsstress and directory repair for a while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/797 b/tests/xfs/797
index 642930f2feebeb..a9d1a6c162c0c1 100755
--- a/tests/xfs/797
+++ b/tests/xfs/797
@@ -8,7 +8,7 @@
 # livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	_scratch_xfs_stress_scrub_cleanup &> /dev/null
diff --git a/tests/xfs/799 b/tests/xfs/799
index 0a43eb01199e69..da13247b098b1f 100755
--- a/tests/xfs/799
+++ b/tests/xfs/799
@@ -8,7 +8,7 @@
 # while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/800 b/tests/xfs/800
index f12ef69e0afa3b..40ad12a15c1d80 100755
--- a/tests/xfs/800
+++ b/tests/xfs/800
@@ -8,7 +8,7 @@
 # while to see if we crash or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub dangerous_fsstress_scrub
+_begin_fstest scrub fsstress_scrub
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/801 b/tests/xfs/801
index 53122352ad75a3..1190cfab8a9f94 100755
--- a/tests/xfs/801
+++ b/tests/xfs/801
@@ -9,7 +9,7 @@
 # because the xfile code wasn't folioized.
 #
 . ./common/preamble
-_begin_fstest online_repair dangerous_fsstress_repair
+_begin_fstest online_repair fsstress_online_repair
 
 declare -A oldvalues
 


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

* [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests Darrick J. Wong
@ 2025-02-19  0:50   ` Darrick J. Wong
  2025-02-19  5:56     ` Christoph Hellwig
  2025-02-19  0:51   ` [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair Darrick J. Wong
                     ` (9 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:50 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

xfs_repair has been stable for many years now, so I think it's time the
fuzz tests for it stopped hiding behind the "dangerous" label.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    2 +-
 tests/xfs/350       |    2 +-
 tests/xfs/352       |    2 +-
 tests/xfs/354       |    2 +-
 tests/xfs/356       |    2 +-
 tests/xfs/358       |    2 +-
 tests/xfs/360       |    2 +-
 tests/xfs/362       |    2 +-
 tests/xfs/364       |    2 +-
 tests/xfs/366       |    2 +-
 tests/xfs/368       |    2 +-
 tests/xfs/370       |    2 +-
 tests/xfs/372       |    2 +-
 tests/xfs/374       |    2 +-
 tests/xfs/376       |    2 +-
 tests/xfs/378       |    2 +-
 tests/xfs/380       |    2 +-
 tests/xfs/382       |    2 +-
 tests/xfs/384       |    2 +-
 tests/xfs/386       |    2 +-
 tests/xfs/388       |    2 +-
 tests/xfs/390       |    2 +-
 tests/xfs/392       |    2 +-
 tests/xfs/394       |    2 +-
 tests/xfs/396       |    2 +-
 tests/xfs/398       |    2 +-
 tests/xfs/400       |    2 +-
 tests/xfs/402       |    2 +-
 tests/xfs/404       |    2 +-
 tests/xfs/406       |    2 +-
 tests/xfs/408       |    2 +-
 tests/xfs/410       |    2 +-
 tests/xfs/412       |    2 +-
 tests/xfs/414       |    2 +-
 tests/xfs/416       |    2 +-
 tests/xfs/418       |    2 +-
 tests/xfs/425       |    2 +-
 tests/xfs/427       |    2 +-
 tests/xfs/429       |    2 +-
 tests/xfs/496       |    2 +-
 tests/xfs/734       |    2 +-
 tests/xfs/737       |    2 +-
 tests/xfs/741       |    2 +-
 tests/xfs/742       |    2 +-
 tests/xfs/785       |    2 +-
 45 files changed, 45 insertions(+), 45 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index 57aa2001311383..cf263ed537db1f 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -34,7 +34,6 @@ dangerous_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 dangerous_fuzzers	fuzzers that can crash your computer
 dangerous_norepair	fuzzers to evaluate kernel metadata verifiers
 dangerous_online_repair	fuzzers to evaluate xfs_scrub online repair
-dangerous_repair	fuzzers to evaluate xfs_repair offline repair
 dangerous_scrub		fuzzers to evaluate xfs_scrub checking
 dangerous_selftest	selftests that crash/hang
 data			data loss checkers
@@ -59,6 +58,7 @@ fsr			XFS free space reorganizer
 fsstress_online_repair	race fsstress and xfs_scrub online repair
 fsstress_scrub		race fsstress and xfs_scrub checking
 fuzzers			filesystem fuzz tests
+fuzzers_repair		fuzzers to evaluate xfs_repair offline repair
 growfs			increasing the size of a filesystem
 hardlink		hardlinks
 health			XFS health reporting
diff --git a/tests/xfs/350 b/tests/xfs/350
index 4e618f41c5a4bf..99596dc81c2160 100755
--- a/tests/xfs/350
+++ b/tests/xfs/350
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/352 b/tests/xfs/352
index 8f56a2b8f6987b..9da8db57b83250 100755
--- a/tests/xfs/352
+++ b/tests/xfs/352
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/354 b/tests/xfs/354
index 625c4e955c57dc..645b8152223ef3 100755
--- a/tests/xfs/354
+++ b/tests/xfs/354
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/356 b/tests/xfs/356
index 3529425eb31504..5d6497a1867918 100755
--- a/tests/xfs/356
+++ b/tests/xfs/356
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/358 b/tests/xfs/358
index 11b29c5ce1efbe..4fab6e72c4226f 100755
--- a/tests/xfs/358
+++ b/tests/xfs/358
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/360 b/tests/xfs/360
index 7f5348a18a898d..7385506824d7d1 100755
--- a/tests/xfs/360
+++ b/tests/xfs/360
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/362 b/tests/xfs/362
index 0b54fc580bdc9d..f1678aee1ea0ce 100755
--- a/tests/xfs/362
+++ b/tests/xfs/362
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/364 b/tests/xfs/364
index 002b4765055816..aa5acbe2a07b3f 100755
--- a/tests/xfs/364
+++ b/tests/xfs/364
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/366 b/tests/xfs/366
index e902d1d360066d..2f28810cc3da03 100755
--- a/tests/xfs/366
+++ b/tests/xfs/366
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/368 b/tests/xfs/368
index 3de32a0c3bf191..75046e4a9cad47 100755
--- a/tests/xfs/368
+++ b/tests/xfs/368
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/370 b/tests/xfs/370
index ff19505b4d4abd..16e444f8da9d3c 100755
--- a/tests/xfs/370
+++ b/tests/xfs/370
@@ -9,7 +9,7 @@
 # Use xfs_repair to repair the problems.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/372 b/tests/xfs/372
index 01ac0e2b63fdb4..0599c9b830a27b 100755
--- a/tests/xfs/372
+++ b/tests/xfs/372
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/374 b/tests/xfs/374
index 807a8cd015a32a..0d69129f1652c7 100755
--- a/tests/xfs/374
+++ b/tests/xfs/374
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/376 b/tests/xfs/376
index dfca8f0be16433..fe47b00bcc33d5 100755
--- a/tests/xfs/376
+++ b/tests/xfs/376
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/378 b/tests/xfs/378
index 94c0dcdbc8ad65..c2d37e7125c307 100755
--- a/tests/xfs/378
+++ b/tests/xfs/378
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/380 b/tests/xfs/380
index 84715b09f26420..bd3c2cdc136495 100755
--- a/tests/xfs/380
+++ b/tests/xfs/380
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/382 b/tests/xfs/382
index ee7a18208b99bc..85a612c18c3d6f 100755
--- a/tests/xfs/382
+++ b/tests/xfs/382
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/384 b/tests/xfs/384
index 490701e438d0f2..45d235a8347c85 100755
--- a/tests/xfs/384
+++ b/tests/xfs/384
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/386 b/tests/xfs/386
index f8f5798cd49347..9b3023ad2b3af6 100755
--- a/tests/xfs/386
+++ b/tests/xfs/386
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/388 b/tests/xfs/388
index 504f786fbdd2db..2e1eb7f13de44a 100755
--- a/tests/xfs/388
+++ b/tests/xfs/388
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/390 b/tests/xfs/390
index c272fd8940cb40..4969bf66105513 100755
--- a/tests/xfs/390
+++ b/tests/xfs/390
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/392 b/tests/xfs/392
index 8eb7b962d16318..619665f8e3aa38 100755
--- a/tests/xfs/392
+++ b/tests/xfs/392
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/394 b/tests/xfs/394
index 692d45f548fe15..fd6a3330c31b60 100755
--- a/tests/xfs/394
+++ b/tests/xfs/394
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/396 b/tests/xfs/396
index 9b2a9a068a7e28..a7bcaa4a86ea2b 100755
--- a/tests/xfs/396
+++ b/tests/xfs/396
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/398 b/tests/xfs/398
index d9826725f9fc10..1b91347c4edb1e 100755
--- a/tests/xfs/398
+++ b/tests/xfs/398
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/400 b/tests/xfs/400
index 7191cff0be6abb..01f59b1b471f68 100755
--- a/tests/xfs/400
+++ b/tests/xfs/400
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/402 b/tests/xfs/402
index 0c2174e2ed417e..2bb4fc9c23bb1e 100755
--- a/tests/xfs/402
+++ b/tests/xfs/402
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/404 b/tests/xfs/404
index 2901b015c88d1e..075a788a66e638 100755
--- a/tests/xfs/404
+++ b/tests/xfs/404
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/406 b/tests/xfs/406
index 444dbd7266f498..9815090c9db335 100755
--- a/tests/xfs/406
+++ b/tests/xfs/406
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/408 b/tests/xfs/408
index 55b061ed436376..1e1a7a7336c093 100755
--- a/tests/xfs/408
+++ b/tests/xfs/408
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/410 b/tests/xfs/410
index 4155e03b5d9579..78da6cb4f2fec5 100755
--- a/tests/xfs/410
+++ b/tests/xfs/410
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/412 b/tests/xfs/412
index 2119282f988106..ba1eb482276782 100755
--- a/tests/xfs/412
+++ b/tests/xfs/412
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/414 b/tests/xfs/414
index c92c6eb0fc33fa..18ed8343eb4e4f 100755
--- a/tests/xfs/414
+++ b/tests/xfs/414
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/416 b/tests/xfs/416
index 2ee0e75140bcdc..68094b841fcace 100755
--- a/tests/xfs/416
+++ b/tests/xfs/416
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/418 b/tests/xfs/418
index dd7b70a46901cd..41ec77041f0d4d 100755
--- a/tests/xfs/418
+++ b/tests/xfs/418
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/425 b/tests/xfs/425
index 9ca10c666b3b1d..6108e19c0b5650 100755
--- a/tests/xfs/425
+++ b/tests/xfs/425
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/427 b/tests/xfs/427
index 539cb4f15ce4c0..c19c02f4ee3374 100755
--- a/tests/xfs/427
+++ b/tests/xfs/427
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/429 b/tests/xfs/429
index b0b5fa5770394b..eeb35945ec20d1 100755
--- a/tests/xfs/429
+++ b/tests/xfs/429
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/496 b/tests/xfs/496
index 22282ba0eb8c52..af1a636faa6049 100755
--- a/tests/xfs/496
+++ b/tests/xfs/496
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/734 b/tests/xfs/734
index 1ae020ea2d9397..3fe41ac2fe80ea 100755
--- a/tests/xfs/734
+++ b/tests/xfs/734
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/737 b/tests/xfs/737
index d85d251252126d..0e35bbe340ea73 100755
--- a/tests/xfs/737
+++ b/tests/xfs/737
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/741 b/tests/xfs/741
index 4e24fb4e2fef31..da0805273bd255 100755
--- a/tests/xfs/741
+++ b/tests/xfs/741
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/742 b/tests/xfs/742
index eabe766d725c07..d699aa10c68f6a 100755
--- a/tests/xfs/742
+++ b/tests/xfs/742
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/785 b/tests/xfs/785
index a51f62e842a5b6..f3707c730f31ac 100755
--- a/tests/xfs/785
+++ b/tests/xfs/785
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests Darrick J. Wong
  2025-02-19  0:50   ` [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair Darrick J. Wong
@ 2025-02-19  0:51   ` Darrick J. Wong
  2025-02-19  5:57     ` Christoph Hellwig
  2025-02-19  0:51   ` [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair Darrick J. Wong
                     ` (8 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:51 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that online fsck has been in the upstream kernel for 8 months, I
think it's stabilized enough that the scrub functionality tests don't
need to hide behind the "dangerous" label anymore.  It's time for more
widespread testing.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    2 +-
 tests/xfs/351       |    2 +-
 tests/xfs/353       |    2 +-
 tests/xfs/355       |    2 +-
 tests/xfs/357       |    2 +-
 tests/xfs/359       |    2 +-
 tests/xfs/361       |    2 +-
 tests/xfs/363       |    2 +-
 tests/xfs/365       |    2 +-
 tests/xfs/367       |    2 +-
 tests/xfs/369       |    2 +-
 tests/xfs/371       |    2 +-
 tests/xfs/373       |    2 +-
 tests/xfs/375       |    2 +-
 tests/xfs/377       |    2 +-
 tests/xfs/379       |    2 +-
 tests/xfs/381       |    2 +-
 tests/xfs/383       |    2 +-
 tests/xfs/385       |    2 +-
 tests/xfs/387       |    2 +-
 tests/xfs/389       |    2 +-
 tests/xfs/391       |    2 +-
 tests/xfs/393       |    2 +-
 tests/xfs/395       |    2 +-
 tests/xfs/397       |    2 +-
 tests/xfs/399       |    2 +-
 tests/xfs/401       |    2 +-
 tests/xfs/403       |    2 +-
 tests/xfs/405       |    2 +-
 tests/xfs/407       |    2 +-
 tests/xfs/409       |    2 +-
 tests/xfs/411       |    2 +-
 tests/xfs/413       |    2 +-
 tests/xfs/415       |    2 +-
 tests/xfs/417       |    2 +-
 tests/xfs/426       |    2 +-
 tests/xfs/428       |    2 +-
 tests/xfs/430       |    2 +-
 tests/xfs/497       |    2 +-
 tests/xfs/730       |    2 +-
 tests/xfs/733       |    2 +-
 tests/xfs/736       |    2 +-
 tests/xfs/739       |    2 +-
 tests/xfs/740       |    2 +-
 tests/xfs/786       |    2 +-
 45 files changed, 45 insertions(+), 45 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index cf263ed537db1f..25a982b6740504 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -33,7 +33,6 @@ dangerous		dangerous test that can crash the system
 dangerous_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 dangerous_fuzzers	fuzzers that can crash your computer
 dangerous_norepair	fuzzers to evaluate kernel metadata verifiers
-dangerous_online_repair	fuzzers to evaluate xfs_scrub online repair
 dangerous_scrub		fuzzers to evaluate xfs_scrub checking
 dangerous_selftest	selftests that crash/hang
 data			data loss checkers
@@ -58,6 +57,7 @@ fsr			XFS free space reorganizer
 fsstress_online_repair	race fsstress and xfs_scrub online repair
 fsstress_scrub		race fsstress and xfs_scrub checking
 fuzzers			filesystem fuzz tests
+fuzzers_online_repair	fuzzers to evaluate xfs_scrub online repair
 fuzzers_repair		fuzzers to evaluate xfs_repair offline repair
 growfs			increasing the size of a filesystem
 hardlink		hardlinks
diff --git a/tests/xfs/351 b/tests/xfs/351
index d03cc3315dc49c..38f3690406f7ff 100755
--- a/tests/xfs/351
+++ b/tests/xfs/351
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/353 b/tests/xfs/353
index 017e3ce28768d1..326adc4c7e4b60 100755
--- a/tests/xfs/353
+++ b/tests/xfs/353
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/355 b/tests/xfs/355
index f7377bd89c0c2f..309a83038b80fe 100755
--- a/tests/xfs/355
+++ b/tests/xfs/355
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/357 b/tests/xfs/357
index d21b9d3207110c..1a1c9d8aebbe33 100755
--- a/tests/xfs/357
+++ b/tests/xfs/357
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/359 b/tests/xfs/359
index 8d0da3d1f8c59a..517b34b0810747 100755
--- a/tests/xfs/359
+++ b/tests/xfs/359
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/361 b/tests/xfs/361
index 46f84888cc6277..9b9f58d33a5f6b 100755
--- a/tests/xfs/361
+++ b/tests/xfs/361
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/363 b/tests/xfs/363
index 9a5e893c25b29c..56e0773c8a4783 100755
--- a/tests/xfs/363
+++ b/tests/xfs/363
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/365 b/tests/xfs/365
index 7a7bb51a61d62d..31def0682a1cb0 100755
--- a/tests/xfs/365
+++ b/tests/xfs/365
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/367 b/tests/xfs/367
index 5a357bc6a318cd..99f73345c78691 100755
--- a/tests/xfs/367
+++ b/tests/xfs/367
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/369 b/tests/xfs/369
index 398ff9e9433aa2..cb741b3df932a8 100755
--- a/tests/xfs/369
+++ b/tests/xfs/369
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/371 b/tests/xfs/371
index 37850c08416af3..453612d63cd06d 100755
--- a/tests/xfs/371
+++ b/tests/xfs/371
@@ -9,7 +9,7 @@
 # Use xfs_scrub to repair the problems.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/373 b/tests/xfs/373
index 6759d78fc7ed78..6f33d4ba526504 100755
--- a/tests/xfs/373
+++ b/tests/xfs/373
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/375 b/tests/xfs/375
index 6518ac3c2ecdc2..bfd0a255521f12 100755
--- a/tests/xfs/375
+++ b/tests/xfs/375
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/377 b/tests/xfs/377
index 6be8c45ba57397..e10d01159e4899 100755
--- a/tests/xfs/377
+++ b/tests/xfs/377
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/379 b/tests/xfs/379
index b7e89fce976f86..5d1592990dd24e 100755
--- a/tests/xfs/379
+++ b/tests/xfs/379
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/381 b/tests/xfs/381
index aa5fb9149bcedb..0f371f7e025823 100755
--- a/tests/xfs/381
+++ b/tests/xfs/381
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/383 b/tests/xfs/383
index be619100872320..6abb49009d77b3 100755
--- a/tests/xfs/383
+++ b/tests/xfs/383
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/385 b/tests/xfs/385
index 63a7649e71ed6f..7fc4a614a43b1c 100755
--- a/tests/xfs/385
+++ b/tests/xfs/385
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/387 b/tests/xfs/387
index 805e27034b7b40..32df964413456e 100755
--- a/tests/xfs/387
+++ b/tests/xfs/387
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/389 b/tests/xfs/389
index f40bb6dae6d84b..cdea039119c250 100755
--- a/tests/xfs/389
+++ b/tests/xfs/389
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/391 b/tests/xfs/391
index 400ec31b82c576..c77d1d2c0478f1 100755
--- a/tests/xfs/391
+++ b/tests/xfs/391
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/393 b/tests/xfs/393
index e18572b5ab3802..3032430023f0b5 100755
--- a/tests/xfs/393
+++ b/tests/xfs/393
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/395 b/tests/xfs/395
index 5dac51cfef4647..ada20cf1ed901e 100755
--- a/tests/xfs/395
+++ b/tests/xfs/395
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/397 b/tests/xfs/397
index 878929e2786997..10a62c6c850515 100755
--- a/tests/xfs/397
+++ b/tests/xfs/397
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/399 b/tests/xfs/399
index 3a2ea05ab33d02..95d30351db60a4 100755
--- a/tests/xfs/399
+++ b/tests/xfs/399
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/401 b/tests/xfs/401
index 0e95a7dfe60d80..3574190d9f1089 100755
--- a/tests/xfs/401
+++ b/tests/xfs/401
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/403 b/tests/xfs/403
index b9276c8d9ab6d8..1decf1805f8ee8 100755
--- a/tests/xfs/403
+++ b/tests/xfs/403
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/405 b/tests/xfs/405
index 76f5afb70f859d..413c3b709cec3f 100755
--- a/tests/xfs/405
+++ b/tests/xfs/405
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/407 b/tests/xfs/407
index ee67a40f67566c..39c5f9833aaf88 100755
--- a/tests/xfs/407
+++ b/tests/xfs/407
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/409 b/tests/xfs/409
index 12d7c5cd9d76ee..580c261d71acad 100755
--- a/tests/xfs/409
+++ b/tests/xfs/409
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/411 b/tests/xfs/411
index 93af836be9dc45..6cef828eb56600 100755
--- a/tests/xfs/411
+++ b/tests/xfs/411
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/413 b/tests/xfs/413
index 5a36f29c292d41..89740083a51508 100755
--- a/tests/xfs/413
+++ b/tests/xfs/413
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/415 b/tests/xfs/415
index 2d5816d0eea61f..94dd0380f9ddd1 100755
--- a/tests/xfs/415
+++ b/tests/xfs/415
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/417 b/tests/xfs/417
index 30501ea35d772b..bf6ef478d83733 100755
--- a/tests/xfs/417
+++ b/tests/xfs/417
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/426 b/tests/xfs/426
index 2cda865a0c0509..4e44431edc3c15 100755
--- a/tests/xfs/426
+++ b/tests/xfs/426
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/428 b/tests/xfs/428
index 31694e1802860e..57100a8a79c6b3 100755
--- a/tests/xfs/428
+++ b/tests/xfs/428
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/430 b/tests/xfs/430
index 6331f82ea55620..8af00ce37a4f27 100755
--- a/tests/xfs/430
+++ b/tests/xfs/430
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/497 b/tests/xfs/497
index f9f36c6b084f7c..3e276d0dccf8fe 100755
--- a/tests/xfs/497
+++ b/tests/xfs/497
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/730 b/tests/xfs/730
index cd58d446d8d2ce..8320bd97d73efb 100755
--- a/tests/xfs/730
+++ b/tests/xfs/730
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/733 b/tests/xfs/733
index 71f16c2575191d..65b19d9158fe09 100755
--- a/tests/xfs/733
+++ b/tests/xfs/733
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/736 b/tests/xfs/736
index 2314d12a074c05..b76bb7d7802d19 100755
--- a/tests/xfs/736
+++ b/tests/xfs/736
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/739 b/tests/xfs/739
index a4f553d818c2be..6cd1c1c289b96e 100755
--- a/tests/xfs/739
+++ b/tests/xfs/739
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/740 b/tests/xfs/740
index 971bf31e3239b1..d6819476e904fc 100755
--- a/tests/xfs/740
+++ b/tests/xfs/740
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/786 b/tests/xfs/786
index 0a8bde8ccf9189..bbc64f50ef926c 100755
--- a/tests/xfs/786
+++ b/tests/xfs/786
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  0:51   ` [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair Darrick J. Wong
@ 2025-02-19  0:51   ` Darrick J. Wong
  2025-02-19  5:57     ` Christoph Hellwig
  2025-02-19  0:51   ` [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair Darrick J. Wong
                     ` (7 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:51 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that online fsck has been in the upstream kernel for 8 months, I
think it's stabilized enough that the scrub + repair functionality tests
don't need to hide behind the "dangerous" label anymore.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    2 +-
 tests/xfs/743       |    2 +-
 tests/xfs/744       |    2 +-
 tests/xfs/747       |    2 +-
 tests/xfs/748       |    2 +-
 tests/xfs/749       |    2 +-
 tests/xfs/750       |    2 +-
 tests/xfs/751       |    2 +-
 tests/xfs/752       |    2 +-
 tests/xfs/753       |    2 +-
 tests/xfs/754       |    2 +-
 tests/xfs/755       |    2 +-
 tests/xfs/756       |    2 +-
 tests/xfs/757       |    2 +-
 tests/xfs/758       |    2 +-
 tests/xfs/759       |    2 +-
 tests/xfs/760       |    2 +-
 tests/xfs/761       |    2 +-
 tests/xfs/762       |    2 +-
 tests/xfs/763       |    2 +-
 tests/xfs/764       |    2 +-
 tests/xfs/765       |    2 +-
 tests/xfs/766       |    2 +-
 tests/xfs/767       |    2 +-
 tests/xfs/768       |    2 +-
 tests/xfs/769       |    2 +-
 tests/xfs/770       |    2 +-
 tests/xfs/771       |    2 +-
 tests/xfs/772       |    2 +-
 tests/xfs/773       |    2 +-
 tests/xfs/774       |    2 +-
 tests/xfs/775       |    2 +-
 tests/xfs/776       |    2 +-
 tests/xfs/777       |    2 +-
 tests/xfs/778       |    2 +-
 tests/xfs/779       |    2 +-
 tests/xfs/780       |    2 +-
 tests/xfs/781       |    2 +-
 tests/xfs/782       |    2 +-
 tests/xfs/783       |    2 +-
 tests/xfs/784       |    2 +-
 tests/xfs/787       |    2 +-
 42 files changed, 42 insertions(+), 42 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index 25a982b6740504..8e1a62331738bb 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -30,7 +30,6 @@ copy			xfs_copy functionality
 copy_range		copy_file_range syscall
 copyup			overlayfs copyup
 dangerous		dangerous test that can crash the system
-dangerous_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 dangerous_fuzzers	fuzzers that can crash your computer
 dangerous_norepair	fuzzers to evaluate kernel metadata verifiers
 dangerous_scrub		fuzzers to evaluate xfs_scrub checking
@@ -56,6 +55,7 @@ fsproperties		Filesystem properties
 fsr			XFS free space reorganizer
 fsstress_online_repair	race fsstress and xfs_scrub online repair
 fsstress_scrub		race fsstress and xfs_scrub checking
+fuzzers_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 fuzzers			filesystem fuzz tests
 fuzzers_online_repair	fuzzers to evaluate xfs_scrub online repair
 fuzzers_repair		fuzzers to evaluate xfs_repair offline repair
diff --git a/tests/xfs/743 b/tests/xfs/743
index b5cec7d71a4002..90b3872440cb07 100755
--- a/tests/xfs/743
+++ b/tests/xfs/743
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_bothrepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/744 b/tests/xfs/744
index e2d097c2f0d59f..e7778417b53ff4 100755
--- a/tests/xfs/744
+++ b/tests/xfs/744
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_bothrepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/747 b/tests/xfs/747
index 03d0f5a42c67ec..37682e3c11e8be 100755
--- a/tests/xfs/747
+++ b/tests/xfs/747
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/748 b/tests/xfs/748
index 66b59fe44f2568..c7a89a1c9d5355 100755
--- a/tests/xfs/748
+++ b/tests/xfs/748
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/749 b/tests/xfs/749
index ea9c34a5002b02..37f96e6f7c250e 100755
--- a/tests/xfs/749
+++ b/tests/xfs/749
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/750 b/tests/xfs/750
index 0f451ecdacde2c..1bc6d5d4042535 100755
--- a/tests/xfs/750
+++ b/tests/xfs/750
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/751 b/tests/xfs/751
index dfd9e09b00bd33..542ca4261430c8 100755
--- a/tests/xfs/751
+++ b/tests/xfs/751
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/752 b/tests/xfs/752
index 88c064e73f92f8..f985e52fbdfeb6 100755
--- a/tests/xfs/752
+++ b/tests/xfs/752
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/753 b/tests/xfs/753
index b0984e99a35599..d4d30c165784f7 100755
--- a/tests/xfs/753
+++ b/tests/xfs/753
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/754 b/tests/xfs/754
index 9a37871125a34b..6464e52b88d3dd 100755
--- a/tests/xfs/754
+++ b/tests/xfs/754
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/755 b/tests/xfs/755
index 06b9cafe68b914..f287880d84b72b 100755
--- a/tests/xfs/755
+++ b/tests/xfs/755
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/756 b/tests/xfs/756
index 02dfc222cceeb3..0f6ffc5527a07e 100755
--- a/tests/xfs/756
+++ b/tests/xfs/756
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/757 b/tests/xfs/757
index 46391e1e9a5fe0..21357b83657945 100755
--- a/tests/xfs/757
+++ b/tests/xfs/757
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/758 b/tests/xfs/758
index 2a32c2f2836e27..4652e1c3b88d2f 100755
--- a/tests/xfs/758
+++ b/tests/xfs/758
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/759 b/tests/xfs/759
index 117dc6b1cb9c39..0c0f323fd3a8b0 100755
--- a/tests/xfs/759
+++ b/tests/xfs/759
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/760 b/tests/xfs/760
index f5032b95e55fd5..46aed18dc611a4 100755
--- a/tests/xfs/760
+++ b/tests/xfs/760
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/761 b/tests/xfs/761
index 19a2a273ce708a..10030e42ed3e8f 100755
--- a/tests/xfs/761
+++ b/tests/xfs/761
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/762 b/tests/xfs/762
index 98c48e89ddadc2..cf094ac43b408f 100755
--- a/tests/xfs/762
+++ b/tests/xfs/762
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/763 b/tests/xfs/763
index 430c01ba55eb4c..745684bd4bdd01 100755
--- a/tests/xfs/763
+++ b/tests/xfs/763
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/764 b/tests/xfs/764
index 83378ae2fa13c4..f970e1fe5830bf 100755
--- a/tests/xfs/764
+++ b/tests/xfs/764
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/765 b/tests/xfs/765
index 28c96737ca7dd1..ff0227ee0b9f32 100755
--- a/tests/xfs/765
+++ b/tests/xfs/765
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/766 b/tests/xfs/766
index c241d992bf2d09..bc09949278a374 100755
--- a/tests/xfs/766
+++ b/tests/xfs/766
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/767 b/tests/xfs/767
index 8fd5dded9c4fd0..bdc2d559e0dc72 100755
--- a/tests/xfs/767
+++ b/tests/xfs/767
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/768 b/tests/xfs/768
index f77e0942b7fb51..0f25cb4338247b 100755
--- a/tests/xfs/768
+++ b/tests/xfs/768
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/769 b/tests/xfs/769
index f09424e9e666a1..5eee69e498ba21 100755
--- a/tests/xfs/769
+++ b/tests/xfs/769
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/770 b/tests/xfs/770
index 96a64142f92b7c..baadda2b282a92 100755
--- a/tests/xfs/770
+++ b/tests/xfs/770
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/771 b/tests/xfs/771
index 568c6fd793a642..1eaeaf82ea99e2 100755
--- a/tests/xfs/771
+++ b/tests/xfs/771
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/772 b/tests/xfs/772
index a558877144daa7..a4f0fbac3715bb 100755
--- a/tests/xfs/772
+++ b/tests/xfs/772
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/773 b/tests/xfs/773
index e4e91d65fa9095..93e1d36c21daea 100755
--- a/tests/xfs/773
+++ b/tests/xfs/773
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/774 b/tests/xfs/774
index ca01eb2f4f8dd4..b4dad7d9933e73 100755
--- a/tests/xfs/774
+++ b/tests/xfs/774
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/775 b/tests/xfs/775
index 89f20ad6d255a2..736dfde68cd1a9 100755
--- a/tests/xfs/775
+++ b/tests/xfs/775
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/776 b/tests/xfs/776
index cfa5874ffd6479..6f86e43c465a76 100755
--- a/tests/xfs/776
+++ b/tests/xfs/776
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/777 b/tests/xfs/777
index de30fa32f2a54b..f3fa114e020b67 100755
--- a/tests/xfs/777
+++ b/tests/xfs/777
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/778 b/tests/xfs/778
index 893187d738a2a4..20d91fb3e1f254 100755
--- a/tests/xfs/778
+++ b/tests/xfs/778
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/779 b/tests/xfs/779
index 7c338b1c215abd..60b10511c8a7cd 100755
--- a/tests/xfs/779
+++ b/tests/xfs/779
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/780 b/tests/xfs/780
index 06194d3250c83d..1789c0468e2009 100755
--- a/tests/xfs/780
+++ b/tests/xfs/780
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/781 b/tests/xfs/781
index 7113a143406839..edbf195738b3b2 100755
--- a/tests/xfs/781
+++ b/tests/xfs/781
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/782 b/tests/xfs/782
index ba89d2198cc5fe..1e86dc2d68d600 100755
--- a/tests/xfs/782
+++ b/tests/xfs/782
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/783 b/tests/xfs/783
index 32f4ddfc9cc36d..dcb1292217d37d 100755
--- a/tests/xfs/783
+++ b/tests/xfs/783
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_bothrepair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/784 b/tests/xfs/784
index b7067efc60c447..286797257e025e 100755
--- a/tests/xfs/784
+++ b/tests/xfs/784
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_bothrepair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/787 b/tests/xfs/787
index 090c3f8b9e1f10..d610ff5a47dfdb 100755
--- a/tests/xfs/787
+++ b/tests/xfs/787
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_bothrepair
+_begin_fstest dangerous_fuzzers fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  0:51   ` [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair Darrick J. Wong
@ 2025-02-19  0:51   ` Darrick J. Wong
  2025-02-19  5:58     ` Christoph Hellwig
  2025-02-19  0:51   ` [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests Darrick J. Wong
                     ` (6 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:51 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

I've been running the norepair fuzzers (aka the verifier checks) for
most of the time that online fsck has been in development, and I haven't
seen any of the VMs crash in a couple of years.  I think it's time that
these tests stopped hiding behind the "dangerous" label.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    2 +-
 tests/xfs/453       |    2 +-
 tests/xfs/454       |    2 +-
 tests/xfs/455       |    2 +-
 tests/xfs/456       |    2 +-
 tests/xfs/457       |    2 +-
 tests/xfs/458       |    2 +-
 tests/xfs/459       |    2 +-
 tests/xfs/460       |    2 +-
 tests/xfs/461       |    2 +-
 tests/xfs/462       |    2 +-
 tests/xfs/463       |    2 +-
 tests/xfs/464       |    2 +-
 tests/xfs/465       |    2 +-
 tests/xfs/466       |    2 +-
 tests/xfs/467       |    2 +-
 tests/xfs/468       |    2 +-
 tests/xfs/469       |    2 +-
 tests/xfs/470       |    2 +-
 tests/xfs/471       |    2 +-
 tests/xfs/472       |    2 +-
 tests/xfs/473       |    2 +-
 tests/xfs/474       |    2 +-
 tests/xfs/475       |    2 +-
 tests/xfs/476       |    2 +-
 tests/xfs/477       |    2 +-
 tests/xfs/478       |    2 +-
 tests/xfs/479       |    2 +-
 tests/xfs/480       |    2 +-
 tests/xfs/481       |    2 +-
 tests/xfs/482       |    2 +-
 tests/xfs/483       |    2 +-
 tests/xfs/484       |    2 +-
 tests/xfs/485       |    2 +-
 tests/xfs/486       |    2 +-
 tests/xfs/487       |    2 +-
 tests/xfs/488       |    2 +-
 tests/xfs/489       |    2 +-
 tests/xfs/498       |    2 +-
 tests/xfs/735       |    2 +-
 tests/xfs/738       |    2 +-
 tests/xfs/745       |    2 +-
 tests/xfs/746       |    2 +-
 tests/xfs/788       |    2 +-
 44 files changed, 44 insertions(+), 44 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index 8e1a62331738bb..9fb72e65f2a63e 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -31,7 +31,6 @@ copy_range		copy_file_range syscall
 copyup			overlayfs copyup
 dangerous		dangerous test that can crash the system
 dangerous_fuzzers	fuzzers that can crash your computer
-dangerous_norepair	fuzzers to evaluate kernel metadata verifiers
 dangerous_scrub		fuzzers to evaluate xfs_scrub checking
 dangerous_selftest	selftests that crash/hang
 data			data loss checkers
@@ -57,6 +56,7 @@ fsstress_online_repair	race fsstress and xfs_scrub online repair
 fsstress_scrub		race fsstress and xfs_scrub checking
 fuzzers_bothrepair	fuzzers to evaluate xfs_scrub + xfs_repair repair
 fuzzers			filesystem fuzz tests
+fuzzers_norepair	fuzzers to evaluate kernel metadata verifiers
 fuzzers_online_repair	fuzzers to evaluate xfs_scrub online repair
 fuzzers_repair		fuzzers to evaluate xfs_repair offline repair
 growfs			increasing the size of a filesystem
diff --git a/tests/xfs/453 b/tests/xfs/453
index d586f79dd838ee..c005454f835262 100755
--- a/tests/xfs/453
+++ b/tests/xfs/453
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/454 b/tests/xfs/454
index 828b2d93aa6408..36b5746e80b2ee 100755
--- a/tests/xfs/454
+++ b/tests/xfs/454
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/455 b/tests/xfs/455
index c5d05b26cd94d3..05e9cc3d7e57a1 100755
--- a/tests/xfs/455
+++ b/tests/xfs/455
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/456 b/tests/xfs/456
index 3b2291570af786..d1cc3d9a2c1b0d 100755
--- a/tests/xfs/456
+++ b/tests/xfs/456
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/457 b/tests/xfs/457
index 41b51fb607528c..cc4867a619f569 100755
--- a/tests/xfs/457
+++ b/tests/xfs/457
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/458 b/tests/xfs/458
index fff31ce9b14c83..fbb27213591a76 100755
--- a/tests/xfs/458
+++ b/tests/xfs/458
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/459 b/tests/xfs/459
index b55899aed107e1..384a699d8018ce 100755
--- a/tests/xfs/459
+++ b/tests/xfs/459
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/460 b/tests/xfs/460
index d67ae555f48e3e..5ca6a34594ba2c 100755
--- a/tests/xfs/460
+++ b/tests/xfs/460
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/461 b/tests/xfs/461
index 7609ce9b080552..d1f6adfe639538 100755
--- a/tests/xfs/461
+++ b/tests/xfs/461
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/462 b/tests/xfs/462
index 0831f8e963a26d..bd891d330a3ecf 100755
--- a/tests/xfs/462
+++ b/tests/xfs/462
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/463 b/tests/xfs/463
index cbfd9c3c693f3d..184e827f5327e2 100755
--- a/tests/xfs/463
+++ b/tests/xfs/463
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/464 b/tests/xfs/464
index 71ce355726c001..f82762c7e14222 100755
--- a/tests/xfs/464
+++ b/tests/xfs/464
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/465 b/tests/xfs/465
index 30c472459be043..2384b1b1d0fab7 100755
--- a/tests/xfs/465
+++ b/tests/xfs/465
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/466 b/tests/xfs/466
index 4a470c90805c80..523d20727a3046 100755
--- a/tests/xfs/466
+++ b/tests/xfs/466
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/467 b/tests/xfs/467
index d64a7bb8cebcdf..1c0fe8e06458a4 100755
--- a/tests/xfs/467
+++ b/tests/xfs/467
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/468 b/tests/xfs/468
index fa501e402b8029..8bc6bb87c76be8 100755
--- a/tests/xfs/468
+++ b/tests/xfs/468
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/469 b/tests/xfs/469
index 20fdb78dc5f430..810e1b1d409d33 100755
--- a/tests/xfs/469
+++ b/tests/xfs/469
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/470 b/tests/xfs/470
index 52be985b3bb59d..dfb9b2edd7bd36 100755
--- a/tests/xfs/470
+++ b/tests/xfs/470
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/471 b/tests/xfs/471
index 6b72b80a8f440a..e3bdee5257ec68 100755
--- a/tests/xfs/471
+++ b/tests/xfs/471
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/472 b/tests/xfs/472
index 0ec3335ed9166d..74168fb4bf675c 100755
--- a/tests/xfs/472
+++ b/tests/xfs/472
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/473 b/tests/xfs/473
index 12924aee262b46..c51e93743b60da 100755
--- a/tests/xfs/473
+++ b/tests/xfs/473
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/474 b/tests/xfs/474
index d3c073524c73b3..f01f8935a033a1 100755
--- a/tests/xfs/474
+++ b/tests/xfs/474
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/475 b/tests/xfs/475
index 06317ee2a516bd..acd9d433583e9e 100755
--- a/tests/xfs/475
+++ b/tests/xfs/475
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/476 b/tests/xfs/476
index dd2fbf4dab3b51..da8fbe3487ce2d 100755
--- a/tests/xfs/476
+++ b/tests/xfs/476
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/477 b/tests/xfs/477
index fccd4f56a2ac62..ec0db3a3fff59a 100755
--- a/tests/xfs/477
+++ b/tests/xfs/477
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/478 b/tests/xfs/478
index 5909bd496c1232..2cf5d669c07638 100755
--- a/tests/xfs/478
+++ b/tests/xfs/478
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/479 b/tests/xfs/479
index e59726ef1ceab3..f4388ae2ec1f47 100755
--- a/tests/xfs/479
+++ b/tests/xfs/479
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/480 b/tests/xfs/480
index e5a1fa96a26e97..5dc2982e3d52fd 100755
--- a/tests/xfs/480
+++ b/tests/xfs/480
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/481 b/tests/xfs/481
index bc36beeec657fa..43eb14aafb2903 100755
--- a/tests/xfs/481
+++ b/tests/xfs/481
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair realtime
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/482 b/tests/xfs/482
index 66e44efd1a5192..2b08b9aab2bb01 100755
--- a/tests/xfs/482
+++ b/tests/xfs/482
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair realtime
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/483 b/tests/xfs/483
index 5225a18a7149f0..da19812ec955e8 100755
--- a/tests/xfs/483
+++ b/tests/xfs/483
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/484 b/tests/xfs/484
index ef768df8c09d7f..865fcc6c859f0b 100755
--- a/tests/xfs/484
+++ b/tests/xfs/484
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/485 b/tests/xfs/485
index f3dbc4f6644647..d82a39a809fc5e 100755
--- a/tests/xfs/485
+++ b/tests/xfs/485
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/486 b/tests/xfs/486
index 8ee65c0cb8ee64..4bdcef8f87d2ff 100755
--- a/tests/xfs/486
+++ b/tests/xfs/486
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/487 b/tests/xfs/487
index 8bd646ed908b39..0a5403a25dfd82 100755
--- a/tests/xfs/487
+++ b/tests/xfs/487
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/488 b/tests/xfs/488
index c58d21e2208589..0e67889f26f7a0 100755
--- a/tests/xfs/488
+++ b/tests/xfs/488
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/489 b/tests/xfs/489
index b9df871a236d7e..ef65525c224764 100755
--- a/tests/xfs/489
+++ b/tests/xfs/489
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/498 b/tests/xfs/498
index f4671519453bc1..f8580e2b912857 100755
--- a/tests/xfs/498
+++ b/tests/xfs/498
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/735 b/tests/xfs/735
index 04bbcc5cb9aa99..861763b3db8bd8 100755
--- a/tests/xfs/735
+++ b/tests/xfs/735
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_norepair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/738 b/tests/xfs/738
index 32f12a70b3097e..f432607075ca91 100755
--- a/tests/xfs/738
+++ b/tests/xfs/738
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_norepair
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/745 b/tests/xfs/745
index d139aeefdd8a37..38a858e8cffd0a 100755
--- a/tests/xfs/745
+++ b/tests/xfs/745
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_norepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/746 b/tests/xfs/746
index 696d024532982a..e81d4f93a9059f 100755
--- a/tests/xfs/746
+++ b/tests/xfs/746
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_norepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/788 b/tests/xfs/788
index 46438eabafd008..0864823a9e35d4 100755
--- a/tests/xfs/788
+++ b/tests/xfs/788
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (4 preceding siblings ...)
  2025-02-19  0:51   ` [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair Darrick J. Wong
@ 2025-02-19  0:51   ` Darrick J. Wong
  2025-02-19  5:58     ` Christoph Hellwig
  2025-02-19  0:52   ` [PATCH 07/12] misc: fix misclassification of xfs_scrub + " Darrick J. Wong
                     ` (5 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:51 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

All the tests in the "fuzzers_repair" group actually test xfs_repair,
not scrub.  Therefore, we should remove them all from 'dangerous_scrub'
and put them in the 'repair' group.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/350 |    2 +-
 tests/xfs/352 |    2 +-
 tests/xfs/354 |    2 +-
 tests/xfs/356 |    2 +-
 tests/xfs/358 |    2 +-
 tests/xfs/360 |    2 +-
 tests/xfs/362 |    2 +-
 tests/xfs/364 |    2 +-
 tests/xfs/366 |    2 +-
 tests/xfs/368 |    2 +-
 tests/xfs/370 |    2 +-
 tests/xfs/372 |    2 +-
 tests/xfs/374 |    2 +-
 tests/xfs/376 |    2 +-
 tests/xfs/378 |    2 +-
 tests/xfs/380 |    2 +-
 tests/xfs/382 |    2 +-
 tests/xfs/384 |    2 +-
 tests/xfs/386 |    2 +-
 tests/xfs/388 |    2 +-
 tests/xfs/390 |    2 +-
 tests/xfs/392 |    2 +-
 tests/xfs/394 |    2 +-
 tests/xfs/396 |    2 +-
 tests/xfs/398 |    2 +-
 tests/xfs/400 |    2 +-
 tests/xfs/402 |    2 +-
 tests/xfs/404 |    2 +-
 tests/xfs/406 |    2 +-
 tests/xfs/408 |    2 +-
 tests/xfs/410 |    2 +-
 tests/xfs/412 |    2 +-
 tests/xfs/414 |    2 +-
 tests/xfs/416 |    2 +-
 tests/xfs/418 |    2 +-
 tests/xfs/425 |    2 +-
 tests/xfs/427 |    2 +-
 tests/xfs/429 |    2 +-
 tests/xfs/496 |    2 +-
 tests/xfs/734 |    2 +-
 tests/xfs/737 |    2 +-
 tests/xfs/741 |    2 +-
 tests/xfs/742 |    2 +-
 tests/xfs/785 |    2 +-
 44 files changed, 44 insertions(+), 44 deletions(-)


diff --git a/tests/xfs/350 b/tests/xfs/350
index 99596dc81c2160..ec49cc8d149094 100755
--- a/tests/xfs/350
+++ b/tests/xfs/350
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/352 b/tests/xfs/352
index 9da8db57b83250..d672a5c0d0bece 100755
--- a/tests/xfs/352
+++ b/tests/xfs/352
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/354 b/tests/xfs/354
index 645b8152223ef3..bed0c5d70bf170 100755
--- a/tests/xfs/354
+++ b/tests/xfs/354
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/356 b/tests/xfs/356
index 5d6497a1867918..bc8a7cc90e621a 100755
--- a/tests/xfs/356
+++ b/tests/xfs/356
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/358 b/tests/xfs/358
index 4fab6e72c4226f..f2345928ce7d74 100755
--- a/tests/xfs/358
+++ b/tests/xfs/358
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/360 b/tests/xfs/360
index 7385506824d7d1..0b423a934af16e 100755
--- a/tests/xfs/360
+++ b/tests/xfs/360
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/362 b/tests/xfs/362
index f1678aee1ea0ce..a95ecfb6165c08 100755
--- a/tests/xfs/362
+++ b/tests/xfs/362
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/364 b/tests/xfs/364
index aa5acbe2a07b3f..63e344240ff6d9 100755
--- a/tests/xfs/364
+++ b/tests/xfs/364
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/366 b/tests/xfs/366
index 2f28810cc3da03..9f32361306b927 100755
--- a/tests/xfs/366
+++ b/tests/xfs/366
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/368 b/tests/xfs/368
index 75046e4a9cad47..f30fcd2f3263f0 100755
--- a/tests/xfs/368
+++ b/tests/xfs/368
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/370 b/tests/xfs/370
index 16e444f8da9d3c..6f59757174bc41 100755
--- a/tests/xfs/370
+++ b/tests/xfs/370
@@ -9,7 +9,7 @@
 # Use xfs_repair to repair the problems.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/372 b/tests/xfs/372
index 0599c9b830a27b..2f2010b36a9e53 100755
--- a/tests/xfs/372
+++ b/tests/xfs/372
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/374 b/tests/xfs/374
index 0d69129f1652c7..8237bc1665b3a5 100755
--- a/tests/xfs/374
+++ b/tests/xfs/374
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/376 b/tests/xfs/376
index fe47b00bcc33d5..80e19f56d2b911 100755
--- a/tests/xfs/376
+++ b/tests/xfs/376
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/378 b/tests/xfs/378
index c2d37e7125c307..3eeb0e99429213 100755
--- a/tests/xfs/378
+++ b/tests/xfs/378
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/380 b/tests/xfs/380
index bd3c2cdc136495..45cbea8f391a9a 100755
--- a/tests/xfs/380
+++ b/tests/xfs/380
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/382 b/tests/xfs/382
index 85a612c18c3d6f..9ee2ca0a987855 100755
--- a/tests/xfs/382
+++ b/tests/xfs/382
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/384 b/tests/xfs/384
index 45d235a8347c85..a22768c800f9c0 100755
--- a/tests/xfs/384
+++ b/tests/xfs/384
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/386 b/tests/xfs/386
index 9b3023ad2b3af6..1e73a5978093cb 100755
--- a/tests/xfs/386
+++ b/tests/xfs/386
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/388 b/tests/xfs/388
index 2e1eb7f13de44a..de8ce74bb92edd 100755
--- a/tests/xfs/388
+++ b/tests/xfs/388
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/390 b/tests/xfs/390
index 4969bf66105513..d6449d291cb971 100755
--- a/tests/xfs/390
+++ b/tests/xfs/390
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/392 b/tests/xfs/392
index 619665f8e3aa38..a2e749d24323b2 100755
--- a/tests/xfs/392
+++ b/tests/xfs/392
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/394 b/tests/xfs/394
index fd6a3330c31b60..aa2dee3644d5d2 100755
--- a/tests/xfs/394
+++ b/tests/xfs/394
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/396 b/tests/xfs/396
index a7bcaa4a86ea2b..a49ef5b95ccfb6 100755
--- a/tests/xfs/396
+++ b/tests/xfs/396
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/398 b/tests/xfs/398
index 1b91347c4edb1e..1d6d6ba9e9adc8 100755
--- a/tests/xfs/398
+++ b/tests/xfs/398
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/400 b/tests/xfs/400
index 01f59b1b471f68..5465baea2939d4 100755
--- a/tests/xfs/400
+++ b/tests/xfs/400
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/402 b/tests/xfs/402
index 2bb4fc9c23bb1e..981fb5f5e4aa73 100755
--- a/tests/xfs/402
+++ b/tests/xfs/402
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/404 b/tests/xfs/404
index 075a788a66e638..074803ed8023e7 100755
--- a/tests/xfs/404
+++ b/tests/xfs/404
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/406 b/tests/xfs/406
index 9815090c9db335..7a6e8bdb535237 100755
--- a/tests/xfs/406
+++ b/tests/xfs/406
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/408 b/tests/xfs/408
index 1e1a7a7336c093..3c7d16f0e6c6b7 100755
--- a/tests/xfs/408
+++ b/tests/xfs/408
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/410 b/tests/xfs/410
index 78da6cb4f2fec5..257ed295f330a4 100755
--- a/tests/xfs/410
+++ b/tests/xfs/410
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/412 b/tests/xfs/412
index ba1eb482276782..98a28001780646 100755
--- a/tests/xfs/412
+++ b/tests/xfs/412
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/414 b/tests/xfs/414
index 18ed8343eb4e4f..80f83be4dba192 100755
--- a/tests/xfs/414
+++ b/tests/xfs/414
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/416 b/tests/xfs/416
index 68094b841fcace..0d87c4116c05ea 100755
--- a/tests/xfs/416
+++ b/tests/xfs/416
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/418 b/tests/xfs/418
index 41ec77041f0d4d..0f5cb7a93c6fef 100755
--- a/tests/xfs/418
+++ b/tests/xfs/418
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/425 b/tests/xfs/425
index 6108e19c0b5650..7ad53f97a6940c 100755
--- a/tests/xfs/425
+++ b/tests/xfs/425
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/427 b/tests/xfs/427
index c19c02f4ee3374..38de1360af6262 100755
--- a/tests/xfs/427
+++ b/tests/xfs/427
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/429 b/tests/xfs/429
index eeb35945ec20d1..ded8c3944a2648 100755
--- a/tests/xfs/429
+++ b/tests/xfs/429
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/496 b/tests/xfs/496
index af1a636faa6049..63205b7b31d97f 100755
--- a/tests/xfs/496
+++ b/tests/xfs/496
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/734 b/tests/xfs/734
index 3fe41ac2fe80ea..232ac4264bc33d 100755
--- a/tests/xfs/734
+++ b/tests/xfs/734
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/737 b/tests/xfs/737
index 0e35bbe340ea73..edfcf7e336ba44 100755
--- a/tests/xfs/737
+++ b/tests/xfs/737
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/741 b/tests/xfs/741
index da0805273bd255..ea1c2d98516fdb 100755
--- a/tests/xfs/741
+++ b/tests/xfs/741
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/742 b/tests/xfs/742
index d699aa10c68f6a..bbc186f8472b64 100755
--- a/tests/xfs/742
+++ b/tests/xfs/742
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair realtime
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/785 b/tests/xfs/785
index f3707c730f31ac..5610a5df5b9e1f 100755
--- a/tests/xfs/785
+++ b/tests/xfs/785
@@ -8,7 +8,7 @@
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_repair
+_begin_fstest dangerous_fuzzers repair fuzzers_repair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 07/12] misc: fix misclassification of xfs_scrub + xfs_repair fuzz tests
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (5 preceding siblings ...)
  2025-02-19  0:51   ` [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests Darrick J. Wong
@ 2025-02-19  0:52   ` Darrick J. Wong
  2025-02-19  5:59     ` Christoph Hellwig
  2025-02-19  0:52   ` [PATCH 08/12] misc: fix misclassification of verifier " Darrick J. Wong
                     ` (4 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:52 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

All the tests in the "fuzzers_bothrepair" group actually test xfs_scrub
and xfs_repair.  Therefore, we should put them in the 'repair' group.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/743 |    2 +-
 tests/xfs/744 |    2 +-
 tests/xfs/783 |    2 +-
 tests/xfs/784 |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/tests/xfs/743 b/tests/xfs/743
index 90b3872440cb07..1dcb79bc46fe48 100755
--- a/tests/xfs/743
+++ b/tests/xfs/743
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/744 b/tests/xfs/744
index e7778417b53ff4..7b554e977b20d2 100755
--- a/tests/xfs/744
+++ b/tests/xfs/744
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair realtime
+_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/783 b/tests/xfs/783
index dcb1292217d37d..79bf34c1b2bd12 100755
--- a/tests/xfs/783
+++ b/tests/xfs/783
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/784 b/tests/xfs/784
index 286797257e025e..99d84545c90e79 100755
--- a/tests/xfs/784
+++ b/tests/xfs/784
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 08/12] misc: fix misclassification of verifier fuzz tests
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (6 preceding siblings ...)
  2025-02-19  0:52   ` [PATCH 07/12] misc: fix misclassification of xfs_scrub + " Darrick J. Wong
@ 2025-02-19  0:52   ` Darrick J. Wong
  2025-02-19  5:59     ` Christoph Hellwig
  2025-02-19  0:52   ` [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups Darrick J. Wong
                     ` (3 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:52 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

All the tests in the "fuzzers_norepair" group do not test xfs_scrub.
Therefore, we should remove them all from 'dangerous_scrub' group.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/735 |    2 +-
 tests/xfs/738 |    2 +-
 tests/xfs/745 |    2 +-
 tests/xfs/746 |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/tests/xfs/735 b/tests/xfs/735
index 861763b3db8bd8..8e927572b6ecd8 100755
--- a/tests/xfs/735
+++ b/tests/xfs/735
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/738 b/tests/xfs/738
index f432607075ca91..e8d2cd2a815f8b 100755
--- a/tests/xfs/738
+++ b/tests/xfs/738
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair
+_begin_fstest dangerous_fuzzers fuzzers_norepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/745 b/tests/xfs/745
index 38a858e8cffd0a..3549ad08772c2c 100755
--- a/tests/xfs/745
+++ b/tests/xfs/745
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair realtime
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/746 b/tests/xfs/746
index e81d4f93a9059f..5afc71ad19c6e6 100755
--- a/tests/xfs/746
+++ b/tests/xfs/746
@@ -8,7 +8,7 @@
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_norepair realtime
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (7 preceding siblings ...)
  2025-02-19  0:52   ` [PATCH 08/12] misc: fix misclassification of verifier " Darrick J. Wong
@ 2025-02-19  0:52   ` Darrick J. Wong
  2025-02-19  5:59     ` Christoph Hellwig
  2025-02-19  0:52   ` [PATCH 10/12] misc: remove the dangerous_scrub group Darrick J. Wong
                     ` (2 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:52 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

All the tests in the "fuzzers_bothrepair" group test xfs_scrub +
xfs_repair, so they all should be in the 'scrub' and 'repair' groups.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/747 |    2 +-
 tests/xfs/748 |    2 +-
 tests/xfs/749 |    2 +-
 tests/xfs/750 |    2 +-
 tests/xfs/751 |    2 +-
 tests/xfs/752 |    2 +-
 tests/xfs/753 |    2 +-
 tests/xfs/754 |    2 +-
 tests/xfs/755 |    2 +-
 tests/xfs/756 |    2 +-
 tests/xfs/757 |    2 +-
 tests/xfs/758 |    2 +-
 tests/xfs/759 |    2 +-
 tests/xfs/760 |    2 +-
 tests/xfs/761 |    2 +-
 tests/xfs/762 |    2 +-
 tests/xfs/763 |    2 +-
 tests/xfs/764 |    2 +-
 tests/xfs/765 |    2 +-
 tests/xfs/766 |    2 +-
 tests/xfs/767 |    2 +-
 tests/xfs/768 |    2 +-
 tests/xfs/769 |    2 +-
 tests/xfs/770 |    2 +-
 tests/xfs/771 |    2 +-
 tests/xfs/772 |    2 +-
 tests/xfs/773 |    2 +-
 tests/xfs/774 |    2 +-
 tests/xfs/775 |    2 +-
 tests/xfs/776 |    2 +-
 tests/xfs/777 |    2 +-
 tests/xfs/778 |    2 +-
 tests/xfs/779 |    2 +-
 tests/xfs/780 |    2 +-
 tests/xfs/781 |    2 +-
 tests/xfs/782 |    2 +-
 tests/xfs/787 |    2 +-
 37 files changed, 37 insertions(+), 37 deletions(-)


diff --git a/tests/xfs/747 b/tests/xfs/747
index 37682e3c11e8be..ba78563257dbcf 100755
--- a/tests/xfs/747
+++ b/tests/xfs/747
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/748 b/tests/xfs/748
index c7a89a1c9d5355..3a137a2fc0c6bb 100755
--- a/tests/xfs/748
+++ b/tests/xfs/748
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/749 b/tests/xfs/749
index 37f96e6f7c250e..cfd2e449926bca 100755
--- a/tests/xfs/749
+++ b/tests/xfs/749
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/750 b/tests/xfs/750
index 1bc6d5d4042535..8e9b569af624e3 100755
--- a/tests/xfs/750
+++ b/tests/xfs/750
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/751 b/tests/xfs/751
index 542ca4261430c8..ae4f550e19b717 100755
--- a/tests/xfs/751
+++ b/tests/xfs/751
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/752 b/tests/xfs/752
index f985e52fbdfeb6..45d822b5b52a3e 100755
--- a/tests/xfs/752
+++ b/tests/xfs/752
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/753 b/tests/xfs/753
index d4d30c165784f7..d20870b7a00a7a 100755
--- a/tests/xfs/753
+++ b/tests/xfs/753
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/754 b/tests/xfs/754
index 6464e52b88d3dd..43e9dea2126c12 100755
--- a/tests/xfs/754
+++ b/tests/xfs/754
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/755 b/tests/xfs/755
index f287880d84b72b..942b78522518ab 100755
--- a/tests/xfs/755
+++ b/tests/xfs/755
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/756 b/tests/xfs/756
index 0f6ffc5527a07e..218ea32c917e32 100755
--- a/tests/xfs/756
+++ b/tests/xfs/756
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/757 b/tests/xfs/757
index 21357b83657945..4b747e670ee787 100755
--- a/tests/xfs/757
+++ b/tests/xfs/757
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/758 b/tests/xfs/758
index 4652e1c3b88d2f..1204cb7480495d 100755
--- a/tests/xfs/758
+++ b/tests/xfs/758
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/759 b/tests/xfs/759
index 0c0f323fd3a8b0..b7a86fe36ff27a 100755
--- a/tests/xfs/759
+++ b/tests/xfs/759
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/760 b/tests/xfs/760
index 46aed18dc611a4..5f46b132ef1021 100755
--- a/tests/xfs/760
+++ b/tests/xfs/760
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/761 b/tests/xfs/761
index 10030e42ed3e8f..e3ee60877cdc21 100755
--- a/tests/xfs/761
+++ b/tests/xfs/761
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/762 b/tests/xfs/762
index cf094ac43b408f..356e0e28e65fbb 100755
--- a/tests/xfs/762
+++ b/tests/xfs/762
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/763 b/tests/xfs/763
index 745684bd4bdd01..b9de1cb0ae4644 100755
--- a/tests/xfs/763
+++ b/tests/xfs/763
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/764 b/tests/xfs/764
index f970e1fe5830bf..19f8a89977645b 100755
--- a/tests/xfs/764
+++ b/tests/xfs/764
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/765 b/tests/xfs/765
index ff0227ee0b9f32..297e4eef15f2d6 100755
--- a/tests/xfs/765
+++ b/tests/xfs/765
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/766 b/tests/xfs/766
index bc09949278a374..81fecbc26a6801 100755
--- a/tests/xfs/766
+++ b/tests/xfs/766
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/767 b/tests/xfs/767
index bdc2d559e0dc72..29eb138d54d35c 100755
--- a/tests/xfs/767
+++ b/tests/xfs/767
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/768 b/tests/xfs/768
index 0f25cb4338247b..60856c5f9491f9 100755
--- a/tests/xfs/768
+++ b/tests/xfs/768
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/769 b/tests/xfs/769
index 5eee69e498ba21..2c07bb9748916e 100755
--- a/tests/xfs/769
+++ b/tests/xfs/769
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/770 b/tests/xfs/770
index baadda2b282a92..d7175de019cde2 100755
--- a/tests/xfs/770
+++ b/tests/xfs/770
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/771 b/tests/xfs/771
index 1eaeaf82ea99e2..3b3ef433b8bc9b 100755
--- a/tests/xfs/771
+++ b/tests/xfs/771
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/772 b/tests/xfs/772
index a4f0fbac3715bb..aaa7bedb7a533f 100755
--- a/tests/xfs/772
+++ b/tests/xfs/772
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/773 b/tests/xfs/773
index 93e1d36c21daea..0c200bbc5b943a 100755
--- a/tests/xfs/773
+++ b/tests/xfs/773
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/774 b/tests/xfs/774
index b4dad7d9933e73..26e85135496406 100755
--- a/tests/xfs/774
+++ b/tests/xfs/774
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/775 b/tests/xfs/775
index 736dfde68cd1a9..4475fe09ced4b6 100755
--- a/tests/xfs/775
+++ b/tests/xfs/775
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/776 b/tests/xfs/776
index 6f86e43c465a76..5abd2d434a08da 100755
--- a/tests/xfs/776
+++ b/tests/xfs/776
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/777 b/tests/xfs/777
index f3fa114e020b67..f8e156f6ede16f 100755
--- a/tests/xfs/777
+++ b/tests/xfs/777
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/778 b/tests/xfs/778
index 20d91fb3e1f254..dc082719a1f8cf 100755
--- a/tests/xfs/778
+++ b/tests/xfs/778
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/779 b/tests/xfs/779
index 60b10511c8a7cd..acce522995c693 100755
--- a/tests/xfs/779
+++ b/tests/xfs/779
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/780 b/tests/xfs/780
index 1789c0468e2009..efcbeb8e147353 100755
--- a/tests/xfs/780
+++ b/tests/xfs/780
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/781 b/tests/xfs/781
index edbf195738b3b2..09d63bfeceb6e7 100755
--- a/tests/xfs/781
+++ b/tests/xfs/781
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/782 b/tests/xfs/782
index 1e86dc2d68d600..a92e933c87787d 100755
--- a/tests/xfs/782
+++ b/tests/xfs/782
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/787 b/tests/xfs/787
index d610ff5a47dfdb..6367f6a72d0913 100755
--- a/tests/xfs/787
+++ b/tests/xfs/787
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 10/12] misc: remove the dangerous_scrub group
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (8 preceding siblings ...)
  2025-02-19  0:52   ` [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups Darrick J. Wong
@ 2025-02-19  0:52   ` Darrick J. Wong
  2025-02-19  6:00     ` Christoph Hellwig
  2025-02-19  0:53   ` [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group Darrick J. Wong
  2025-02-19  0:53   ` [PATCH 12/12] xfs/349: reclassify this test as not dangerous Darrick J. Wong
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:52 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that online fsck has been in the upstream kernel for 8 months, I
think it's stabilized enough that the scrub functionality tests don't
need to hide behind the "dangerous" label anymore.  Move them all to the
scrub group and delete the dangerous_scrub group.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 doc/group-names.txt |    1 -
 tests/xfs/351       |    2 +-
 tests/xfs/353       |    2 +-
 tests/xfs/355       |    2 +-
 tests/xfs/357       |    2 +-
 tests/xfs/359       |    2 +-
 tests/xfs/361       |    2 +-
 tests/xfs/363       |    2 +-
 tests/xfs/365       |    2 +-
 tests/xfs/367       |    2 +-
 tests/xfs/369       |    2 +-
 tests/xfs/371       |    2 +-
 tests/xfs/373       |    2 +-
 tests/xfs/375       |    2 +-
 tests/xfs/377       |    2 +-
 tests/xfs/379       |    2 +-
 tests/xfs/381       |    2 +-
 tests/xfs/383       |    2 +-
 tests/xfs/385       |    2 +-
 tests/xfs/387       |    2 +-
 tests/xfs/389       |    2 +-
 tests/xfs/391       |    2 +-
 tests/xfs/393       |    2 +-
 tests/xfs/395       |    2 +-
 tests/xfs/397       |    2 +-
 tests/xfs/399       |    2 +-
 tests/xfs/401       |    2 +-
 tests/xfs/403       |    2 +-
 tests/xfs/405       |    2 +-
 tests/xfs/407       |    2 +-
 tests/xfs/409       |    2 +-
 tests/xfs/411       |    2 +-
 tests/xfs/413       |    2 +-
 tests/xfs/415       |    2 +-
 tests/xfs/417       |    2 +-
 tests/xfs/423       |    2 +-
 tests/xfs/426       |    2 +-
 tests/xfs/428       |    2 +-
 tests/xfs/430       |    2 +-
 tests/xfs/497       |    2 +-
 tests/xfs/730       |    2 +-
 tests/xfs/733       |    2 +-
 tests/xfs/736       |    2 +-
 tests/xfs/739       |    2 +-
 tests/xfs/740       |    2 +-
 tests/xfs/743       |    2 +-
 tests/xfs/744       |    2 +-
 tests/xfs/783       |    2 +-
 tests/xfs/784       |    2 +-
 tests/xfs/786       |    2 +-
 50 files changed, 49 insertions(+), 50 deletions(-)


diff --git a/doc/group-names.txt b/doc/group-names.txt
index 9fb72e65f2a63e..f510bb827062f0 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -31,7 +31,6 @@ copy_range		copy_file_range syscall
 copyup			overlayfs copyup
 dangerous		dangerous test that can crash the system
 dangerous_fuzzers	fuzzers that can crash your computer
-dangerous_scrub		fuzzers to evaluate xfs_scrub checking
 dangerous_selftest	selftests that crash/hang
 data			data loss checkers
 dax			direct access mode for persistent memory files
diff --git a/tests/xfs/351 b/tests/xfs/351
index 38f3690406f7ff..f52ba613f06841 100755
--- a/tests/xfs/351
+++ b/tests/xfs/351
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/353 b/tests/xfs/353
index 326adc4c7e4b60..12af64c678a115 100755
--- a/tests/xfs/353
+++ b/tests/xfs/353
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/355 b/tests/xfs/355
index 309a83038b80fe..4724d5137739cd 100755
--- a/tests/xfs/355
+++ b/tests/xfs/355
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/357 b/tests/xfs/357
index 1a1c9d8aebbe33..abd1d2b91fa83c 100755
--- a/tests/xfs/357
+++ b/tests/xfs/357
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/359 b/tests/xfs/359
index 517b34b0810747..e457383066f6d6 100755
--- a/tests/xfs/359
+++ b/tests/xfs/359
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/361 b/tests/xfs/361
index 9b9f58d33a5f6b..f5729b5a019580 100755
--- a/tests/xfs/361
+++ b/tests/xfs/361
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/363 b/tests/xfs/363
index 56e0773c8a4783..2568da5925aeb8 100755
--- a/tests/xfs/363
+++ b/tests/xfs/363
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/365 b/tests/xfs/365
index 31def0682a1cb0..79de2b95fd38c8 100755
--- a/tests/xfs/365
+++ b/tests/xfs/365
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/367 b/tests/xfs/367
index 99f73345c78691..af7faf08a58d50 100755
--- a/tests/xfs/367
+++ b/tests/xfs/367
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/369 b/tests/xfs/369
index cb741b3df932a8..ff0db2e6382ccf 100755
--- a/tests/xfs/369
+++ b/tests/xfs/369
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/371 b/tests/xfs/371
index 453612d63cd06d..df0586082d3653 100755
--- a/tests/xfs/371
+++ b/tests/xfs/371
@@ -9,7 +9,7 @@
 # Use xfs_scrub to repair the problems.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/373 b/tests/xfs/373
index 6f33d4ba526504..ccdf4a5e37935a 100755
--- a/tests/xfs/373
+++ b/tests/xfs/373
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/375 b/tests/xfs/375
index bfd0a255521f12..81cd9d72d086cf 100755
--- a/tests/xfs/375
+++ b/tests/xfs/375
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/377 b/tests/xfs/377
index e10d01159e4899..b01a7c6511d720 100755
--- a/tests/xfs/377
+++ b/tests/xfs/377
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/379 b/tests/xfs/379
index 5d1592990dd24e..fc1ac6fa56a643 100755
--- a/tests/xfs/379
+++ b/tests/xfs/379
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/381 b/tests/xfs/381
index 0f371f7e025823..d3c0d5fc18cd08 100755
--- a/tests/xfs/381
+++ b/tests/xfs/381
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/383 b/tests/xfs/383
index 6abb49009d77b3..3e280e5dd1a382 100755
--- a/tests/xfs/383
+++ b/tests/xfs/383
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/385 b/tests/xfs/385
index 7fc4a614a43b1c..8b10c0bce08e97 100755
--- a/tests/xfs/385
+++ b/tests/xfs/385
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/387 b/tests/xfs/387
index 32df964413456e..6d8c3040685ce9 100755
--- a/tests/xfs/387
+++ b/tests/xfs/387
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/389 b/tests/xfs/389
index cdea039119c250..be27dbc92f39ad 100755
--- a/tests/xfs/389
+++ b/tests/xfs/389
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/391 b/tests/xfs/391
index c77d1d2c0478f1..d43ab5c025960c 100755
--- a/tests/xfs/391
+++ b/tests/xfs/391
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/393 b/tests/xfs/393
index 3032430023f0b5..8b70b6c2277ff5 100755
--- a/tests/xfs/393
+++ b/tests/xfs/393
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/395 b/tests/xfs/395
index ada20cf1ed901e..a119f12dc9fb5d 100755
--- a/tests/xfs/395
+++ b/tests/xfs/395
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/397 b/tests/xfs/397
index 10a62c6c850515..6d939139ea705b 100755
--- a/tests/xfs/397
+++ b/tests/xfs/397
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/399 b/tests/xfs/399
index 95d30351db60a4..7ac7059ffcbb2a 100755
--- a/tests/xfs/399
+++ b/tests/xfs/399
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/401 b/tests/xfs/401
index 3574190d9f1089..ab9320c6a1bedf 100755
--- a/tests/xfs/401
+++ b/tests/xfs/401
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/403 b/tests/xfs/403
index 1decf1805f8ee8..000083616495b9 100755
--- a/tests/xfs/403
+++ b/tests/xfs/403
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/405 b/tests/xfs/405
index 413c3b709cec3f..c5cfde01e1141a 100755
--- a/tests/xfs/405
+++ b/tests/xfs/405
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/407 b/tests/xfs/407
index 39c5f9833aaf88..035578b97b4793 100755
--- a/tests/xfs/407
+++ b/tests/xfs/407
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/409 b/tests/xfs/409
index 580c261d71acad..f3885e56010daa 100755
--- a/tests/xfs/409
+++ b/tests/xfs/409
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/411 b/tests/xfs/411
index 6cef828eb56600..b644f7045e2668 100755
--- a/tests/xfs/411
+++ b/tests/xfs/411
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/413 b/tests/xfs/413
index 89740083a51508..1123d305879917 100755
--- a/tests/xfs/413
+++ b/tests/xfs/413
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/415 b/tests/xfs/415
index 94dd0380f9ddd1..6c5758b9de7173 100755
--- a/tests/xfs/415
+++ b/tests/xfs/415
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/417 b/tests/xfs/417
index bf6ef478d83733..8f7e60f625954e 100755
--- a/tests/xfs/417
+++ b/tests/xfs/417
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/423 b/tests/xfs/423
index 78fd913017ccf7..7c6aeab82e7eb1 100755
--- a/tests/xfs/423
+++ b/tests/xfs/423
@@ -10,7 +10,7 @@
 # count them if the fork is in btree format.
 #
 . ./common/preamble
-_begin_fstest dangerous_scrub prealloc
+_begin_fstest scrub prealloc
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/426 b/tests/xfs/426
index 4e44431edc3c15..53bfd0d637fcb5 100755
--- a/tests/xfs/426
+++ b/tests/xfs/426
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/428 b/tests/xfs/428
index 57100a8a79c6b3..e112ccf84646c1 100755
--- a/tests/xfs/428
+++ b/tests/xfs/428
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/430 b/tests/xfs/430
index 8af00ce37a4f27..3e6527851069a9 100755
--- a/tests/xfs/430
+++ b/tests/xfs/430
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/497 b/tests/xfs/497
index 3e276d0dccf8fe..3f31607d704e2f 100755
--- a/tests/xfs/497
+++ b/tests/xfs/497
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/730 b/tests/xfs/730
index 8320bd97d73efb..79ea93ee72fce1 100755
--- a/tests/xfs/730
+++ b/tests/xfs/730
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/733 b/tests/xfs/733
index 65b19d9158fe09..a875c2ac906625 100755
--- a/tests/xfs/733
+++ b/tests/xfs/733
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/736 b/tests/xfs/736
index b76bb7d7802d19..f60edb0007ad21 100755
--- a/tests/xfs/736
+++ b/tests/xfs/736
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/739 b/tests/xfs/739
index 6cd1c1c289b96e..52c90b91b218df 100755
--- a/tests/xfs/739
+++ b/tests/xfs/739
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/740 b/tests/xfs/740
index d6819476e904fc..fb616a16362a6c 100755
--- a/tests/xfs/740
+++ b/tests/xfs/740
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair realtime
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/743 b/tests/xfs/743
index 1dcb79bc46fe48..8021d7ecdc9009 100755
--- a/tests/xfs/743
+++ b/tests/xfs/743
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair realtime
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/744 b/tests/xfs/744
index 7b554e977b20d2..0e719dcebf03d2 100755
--- a/tests/xfs/744
+++ b/tests/xfs/744
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair realtime
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/783 b/tests/xfs/783
index 79bf34c1b2bd12..52fe6e798b1164 100755
--- a/tests/xfs/783
+++ b/tests/xfs/783
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/784 b/tests/xfs/784
index 99d84545c90e79..9028c1d0d91106 100755
--- a/tests/xfs/784
+++ b/tests/xfs/784
@@ -9,7 +9,7 @@
 # to test the most likely usage pattern.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub repair fuzzers_bothrepair
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair
 
 _register_cleanup "_cleanup" BUS
 
diff --git a/tests/xfs/786 b/tests/xfs/786
index bbc64f50ef926c..205f84ea2a8be0 100755
--- a/tests/xfs/786
+++ b/tests/xfs/786
@@ -8,7 +8,7 @@
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers dangerous_scrub fuzzers_online_repair
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (9 preceding siblings ...)
  2025-02-19  0:52   ` [PATCH 10/12] misc: remove the dangerous_scrub group Darrick J. Wong
@ 2025-02-19  0:53   ` Darrick J. Wong
  2025-02-19  6:00     ` Christoph Hellwig
  2025-02-19  0:53   ` [PATCH 12/12] xfs/349: reclassify this test as not dangerous Darrick J. Wong
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:53 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Enable /some/ testing of online fsck for everybody by adding these two
fsstress tests and two fsx tests to the auto group.  At this time I
don't have any plans to do the same for the other scrub stress tests.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/285 |    2 +-
 tests/xfs/286 |    2 +-
 tests/xfs/565 |    2 +-
 tests/xfs/566 |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/tests/xfs/285 b/tests/xfs/285
index f08cb449b61ad4..205f8cdf943e47 100755
--- a/tests/xfs/285
+++ b/tests/xfs/285
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub fsstress_scrub
+_begin_fstest auto scrub fsstress_scrub
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/286 b/tests/xfs/286
index 046638296e04c6..abc4cafdb0992f 100755
--- a/tests/xfs/286
+++ b/tests/xfs/286
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair fsstress_online_repair
+_begin_fstest auto online_repair fsstress_online_repair
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/565 b/tests/xfs/565
index 43185a253d4d71..d07706b3815b21 100755
--- a/tests/xfs/565
+++ b/tests/xfs/565
@@ -8,7 +8,7 @@
 # or livelock.
 #
 . ./common/preamble
-_begin_fstest scrub fsstress_scrub
+_begin_fstest auto scrub fsstress_scrub
 
 _cleanup() {
 	cd /
diff --git a/tests/xfs/566 b/tests/xfs/566
index 5398d1d0827ca2..2667e25f239559 100755
--- a/tests/xfs/566
+++ b/tests/xfs/566
@@ -8,7 +8,7 @@
 # crash or livelock.
 #
 . ./common/preamble
-_begin_fstest online_repair fsstress_online_repair
+_begin_fstest auto online_repair fsstress_online_repair
 
 _cleanup() {
 	cd /


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

* [PATCH 12/12] xfs/349: reclassify this test as not dangerous
  2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
                     ` (10 preceding siblings ...)
  2025-02-19  0:53   ` [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group Darrick J. Wong
@ 2025-02-19  0:53   ` Darrick J. Wong
  2025-02-19  6:01     ` Christoph Hellwig
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:53 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

This test creates a filesystem with all known types of metadata.  It
doesn't fuzz anything, nor does it actually repair anything.  Hence we
can put it in the auto group and drop the dangerous tags.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/349 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


diff --git a/tests/xfs/349 b/tests/xfs/349
index 3937b4fdbffe93..a68bfee579ac41 100755
--- a/tests/xfs/349
+++ b/tests/xfs/349
@@ -5,10 +5,9 @@
 # FS QA Test No. 349
 #
 # Populate a XFS filesystem and ensure that scrub and repair are happy.
-# Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
-_begin_fstest dangerous_fuzzers scrub
+_begin_fstest auto scrub
 
 _register_cleanup "_cleanup" BUS
 


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

* [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
@ 2025-02-19  0:53   ` Darrick J. Wong
  2025-02-19  6:02     ` Christoph Hellwig
  2025-02-19  0:53   ` [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees Darrick J. Wong
                     ` (10 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:53 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

There are a number of tests that use xfs_db to examine the contents of
metadata inodes to check correct functioning.  The logic is scattered
everywhere and won't work with metadata directory trees, so make a
shared helper to find these inodes.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs    |   21 +++++++++++++++++++--
 tests/xfs/007 |   16 +++++++++-------
 tests/xfs/529 |    5 ++---
 tests/xfs/530 |    6 ++----
 tests/xfs/739 |    9 ++-------
 tests/xfs/740 |    9 ++-------
 tests/xfs/741 |    9 ++-------
 tests/xfs/742 |    9 ++-------
 tests/xfs/743 |    9 ++-------
 tests/xfs/744 |    9 ++-------
 tests/xfs/745 |    9 ++-------
 tests/xfs/746 |    9 ++-------
 12 files changed, 48 insertions(+), 72 deletions(-)


diff --git a/common/xfs b/common/xfs
index 0417a40adba3e2..02f569c971a194 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1400,7 +1400,7 @@ _scratch_get_bmx_prefix() {
 
 _scratch_get_iext_count()
 {
-	local ino=$1
+	local selector=$1
 	local whichfork=$2
 	local field=""
 
@@ -1415,7 +1415,7 @@ _scratch_get_iext_count()
 			return 1
 	esac
 
-	_scratch_xfs_get_metadata_field $field "inode $ino"
+	_scratch_xfs_get_metadata_field $field "$selector"
 }
 
 #
@@ -1885,3 +1885,20 @@ _wipe_xfs_properties()
 		setfattr --remove="$name" "$1"
 	done
 }
+
+# Return the xfs_db selector for a superblock-rooted metadata file on the
+# scratch filesystem.  The sole argument is the name of the field within the
+# superblock.  This helper cannot be used to find files under the metadata
+# directory tree.
+_scratch_xfs_find_metafile()
+{
+	local metafile="$1"
+	local sb_field
+
+	sb_field="$(_scratch_xfs_get_sb_field "$metafile")"
+	if echo "$sb_field" | grep -q -w 'not found'; then
+		return 1
+	fi
+	echo "inode $sb_field"
+	return 0
+}
diff --git a/tests/xfs/007 b/tests/xfs/007
index 2535f04cac36a5..e35a069f9bd5c5 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -21,6 +21,11 @@ _require_xfs_quota
 _scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs
 
+get_qfile_nblocks() {
+	local selector="$(_scratch_xfs_find_metafile "$1")"
+	_scratch_xfs_db -c "$selector" -c "p core.nblocks"
+}
+
 do_test()
 {
 	qino_1=$1
@@ -30,12 +35,9 @@ do_test()
 	echo "*** umount"
 	_scratch_unmount
 
-	QINO_1=`_scratch_xfs_get_sb_field $qino_1`
-	QINO_2=`_scratch_xfs_get_sb_field $qino_2`
-
 	echo "*** Usage before quotarm ***"
-	_scratch_xfs_db -c "inode $QINO_1" -c "p core.nblocks"
-	_scratch_xfs_db -c "inode $QINO_2" -c "p core.nblocks"
+	get_qfile_nblocks $qino_1
+	get_qfile_nblocks $qino_2
 
 	_qmount
 	echo "*** turn off $off_opts quotas"
@@ -65,8 +67,8 @@ do_test()
 	_scratch_unmount
 
 	echo "*** Usage after quotarm ***"
-	_scratch_xfs_db -c "inode $QINO_1" -c "p core.nblocks"
-	_scratch_xfs_db -c "inode $QINO_2" -c "p core.nblocks"
+	get_qfile_nblocks $qino_1
+	get_qfile_nblocks $qino_2
 }
 
 # Test user and group first
diff --git a/tests/xfs/529 b/tests/xfs/529
index 14bdd2eebf7047..aab8668c76f46c 100755
--- a/tests/xfs/529
+++ b/tests/xfs/529
@@ -161,9 +161,8 @@ done
 _scratch_unmount >> $seqres.full
 
 echo "Verify uquota inode's extent count"
-uquotino=$(_scratch_xfs_get_metadata_field 'uquotino' 'sb 0')
-
-nextents=$(_scratch_get_iext_count $uquotino data || \
+selector="$(_scratch_xfs_find_metafile uquotino)"
+nextents=$(_scratch_get_iext_count "$selector" data || \
 		   _fail "Unable to obtain inode fork's extent count")
 if (( $nextents > 10 )); then
 	echo "Extent count overflow check failed: nextents = $nextents"
diff --git a/tests/xfs/530 b/tests/xfs/530
index 95ab32f1e1f828..4a41127e3b820f 100755
--- a/tests/xfs/530
+++ b/tests/xfs/530
@@ -102,10 +102,8 @@ _scratch_unmount >> $seqres.full
 
 echo "Verify rbmino's and rsumino's extent count"
 for rtino in rbmino rsumino; do
-	ino=$(_scratch_xfs_get_metadata_field $rtino "sb 0")
-	echo "$rtino = $ino" >> $seqres.full
-
-	nextents=$(_scratch_get_iext_count $ino data || \
+	selector="$(_scratch_xfs_find_metafile "$rtino")"
+	nextents=$(_scratch_get_iext_count "$selector" data || \
 			_fail "Unable to obtain inode fork's extent count")
 	if (( $nextents > 10 )); then
 		echo "Extent count overflow check failed: nextents = $nextents"
diff --git a/tests/xfs/739 b/tests/xfs/739
index 52c90b91b218df..5fd6caa5bce2f8 100755
--- a/tests/xfs/739
+++ b/tests/xfs/739
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.bitmap')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.bitmap')
-else
-	path=('sb' 'addr rbmino')
-fi
-_scratch_xfs_fuzz_metadata '' 'online' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rbmino)"
+_scratch_xfs_fuzz_metadata '' 'online' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
 # success, all done
diff --git a/tests/xfs/740 b/tests/xfs/740
index fb616a16362a6c..c8990034773b32 100755
--- a/tests/xfs/740
+++ b/tests/xfs/740
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.summary')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.summary')
-else
-	path=('sb' 'addr rsumino')
-fi
-_scratch_xfs_fuzz_metadata '' 'online' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rsumino)"
+_scratch_xfs_fuzz_metadata '' 'online' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
 # success, all done
diff --git a/tests/xfs/741 b/tests/xfs/741
index ea1c2d98516fdb..96c2315c524311 100755
--- a/tests/xfs/741
+++ b/tests/xfs/741
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.bitmap')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.bitmap')
-else
-	path=('sb' 'addr rbmino')
-fi
-_scratch_xfs_fuzz_metadata '' 'offline' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rbmino)"
+_scratch_xfs_fuzz_metadata '' 'offline' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
 # success, all done
diff --git a/tests/xfs/742 b/tests/xfs/742
index bbc186f8472b64..301ae7b9574320 100755
--- a/tests/xfs/742
+++ b/tests/xfs/742
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.summary')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.summary')
-else
-	path=('sb' 'addr rsumino')
-fi
-_scratch_xfs_fuzz_metadata '' 'offline' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rsumino)"
+_scratch_xfs_fuzz_metadata '' 'offline' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
 # success, all done
diff --git a/tests/xfs/743 b/tests/xfs/743
index 8021d7ecdc9009..039624f711c0a6 100755
--- a/tests/xfs/743
+++ b/tests/xfs/743
@@ -26,13 +26,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.bitmap')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.bitmap')
-else
-	path=('sb' 'addr rbmino')
-fi
-_scratch_xfs_fuzz_metadata '' 'both' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rbmino)"
+_scratch_xfs_fuzz_metadata '' 'both' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
 # success, all done
diff --git a/tests/xfs/744 b/tests/xfs/744
index 0e719dcebf03d2..13f63b9ceb1756 100755
--- a/tests/xfs/744
+++ b/tests/xfs/744
@@ -26,13 +26,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.summary')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.summary')
-else
-	path=('sb' 'addr rsumino')
-fi
-_scratch_xfs_fuzz_metadata '' 'both' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rsumino)"
+_scratch_xfs_fuzz_metadata '' 'both' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
 # success, all done
diff --git a/tests/xfs/745 b/tests/xfs/745
index 3549ad08772c2c..56a6d58ef9f4ca 100755
--- a/tests/xfs/745
+++ b/tests/xfs/745
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.bitmap')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.bitmap')
-else
-	path=('sb' 'addr rbmino')
-fi
-_scratch_xfs_fuzz_metadata '' 'none' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rbmino)"
+_scratch_xfs_fuzz_metadata '' 'none' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
 # success, all done
diff --git a/tests/xfs/746 b/tests/xfs/746
index 5afc71ad19c6e6..935b2e5acba5d4 100755
--- a/tests/xfs/746
+++ b/tests/xfs/746
@@ -25,13 +25,8 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-is_metadir=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /realtime/0.summary')
-if [ -n "$is_metadir" ]; then
-	path=('path -m /realtime/0.summary')
-else
-	path=('sb' 'addr rsumino')
-fi
-_scratch_xfs_fuzz_metadata '' 'none' "${path[@]}" 'dblock 0' >> $seqres.full
+path="$(_scratch_xfs_find_metafile rsumino)"
+_scratch_xfs_fuzz_metadata '' 'none' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
 # success, all done


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

* [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
  2025-02-19  0:53   ` [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled Darrick J. Wong
@ 2025-02-19  0:53   ` Darrick J. Wong
  2025-02-19  6:03     ` Christoph Hellwig
  2025-02-19  0:54   ` [PATCH 03/12] common/repair: patch up repair sb inode value complaints Darrick J. Wong
                     ` (9 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:53 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The golden output for thests tests encode the xfs_repair output when we
fuzz various parts of the filesystem.  With metadata directory trees
enabled, however, the golden output changes dramatically to reflect
reconstruction of the metadata directory tree.

To avoid regressions, add a helper to force metadata directories off via
MKFS_OPTIONS.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs    |   25 +++++++++++++++++++++++++
 tests/xfs/030 |    1 +
 tests/xfs/033 |    1 +
 tests/xfs/178 |    1 +
 4 files changed, 28 insertions(+)


diff --git a/common/xfs b/common/xfs
index 02f569c971a194..85cd9a1348e385 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1902,3 +1902,28 @@ _scratch_xfs_find_metafile()
 	echo "inode $sb_field"
 	return 0
 }
+
+# Force metadata directories off.
+_scratch_xfs_force_no_metadir()
+{
+	# Remove any mkfs-time quota options because those are only supported
+	# with metadir=1
+	for opt in uquota gquota pquota; do
+		echo "$MKFS_OPTIONS" | grep -q -w "$opt" || continue
+
+		MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | sed -e "s/,$opt//g" -e "s/ $opt/ /g")"
+		MOUNT_OPTIONS="$MOUNT_OPTIONS -o $opt"
+	done
+
+	# Replace any explicit metadir option with metadir=0
+	if echo "$MKFS_OPTIONS" | grep -q 'metadir='; then
+		MKFS_OPTIONS="$(echo "$MKFS_OPTIONS" | sed -e 's/metadir=[0-9]*/metadir=0/g' -e 's/metadir\([, ]\)/metadir=0\1/g')"
+		return
+	fi
+
+	# Inject metadir=0 if there isn't one in MKFS_OPTIONS and mkfs supports
+	# that option.
+	if grep -q 'metadir=' $MKFS_XFS_PROG; then
+		MKFS_OPTIONS="-m metadir=0 $MKFS_OPTIONS"
+	fi
+}
diff --git a/tests/xfs/030 b/tests/xfs/030
index 7ce5ffce38693c..22fbdb2fdbc999 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -48,6 +48,7 @@ _check_ag()
 
 _require_scratch
 _require_no_large_scratch_dev
+_scratch_xfs_force_no_metadir
 
 DSIZE="-dsize=100m,agcount=6"
 
diff --git a/tests/xfs/033 b/tests/xfs/033
index d7b02a9c51b3f0..e0b0dd58212d61 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -51,6 +51,7 @@ _filter_bad_ids()
 
 _require_scratch
 _require_no_large_scratch_dev
+_scratch_xfs_force_no_metadir
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
diff --git a/tests/xfs/178 b/tests/xfs/178
index a22e626706ec49..0cc0e3f5bb88b4 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -50,6 +50,7 @@ _dd_repair_check()
 #             fix filesystem, new mkfs.xfs will be fine.
 
 _require_scratch
+_scratch_xfs_force_no_metadir
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 
 # By executing the followint tmp file, will get on the mkfs options stored in


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

* [PATCH 03/12] common/repair: patch up repair sb inode value complaints
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
  2025-02-19  0:53   ` [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled Darrick J. Wong
  2025-02-19  0:53   ` [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees Darrick J. Wong
@ 2025-02-19  0:54   ` Darrick J. Wong
  2025-02-19  6:03     ` Christoph Hellwig
  2025-02-19  0:54   ` [PATCH 04/12] xfs/206: update for metadata directory support Darrick J. Wong
                     ` (8 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:54 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that we've refactored xfs_repair to be more consistent in how it
reports unexpected superblock inode pointer values, we have to fix up
the fstests repair filters to emulate the old golden output.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/repair |    4 ++++
 1 file changed, 4 insertions(+)


diff --git a/common/repair b/common/repair
index 0dae830520f1e9..a79f9b2b3571ce 100644
--- a/common/repair
+++ b/common/repair
@@ -28,6 +28,10 @@ _filter_repair()
 	perl -ne '
 # for sb
 /- agno = / && next;	# remove each AG line (variable number)
+s/realtime bitmap inode pointer/realtime bitmap ino pointer/;
+s/sb realtime bitmap inode value/sb realtime bitmap inode/;
+s/realtime summary inode pointer/realtime summary ino pointer/;
+s/sb realtime summary inode value/sb realtime summary inode/;
 s/(pointer to) (\d+)/\1 INO/;
 # Changed inode output in 5.5.0
 s/sb root inode value /sb root inode /;


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

* [PATCH 04/12] xfs/206: update for metadata directory support
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  0:54   ` [PATCH 03/12] common/repair: patch up repair sb inode value complaints Darrick J. Wong
@ 2025-02-19  0:54   ` Darrick J. Wong
  2025-02-19  6:04     ` Christoph Hellwig
  2025-02-19  0:54   ` [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees Darrick J. Wong
                     ` (7 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:54 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Filter 'metadir=' out of the golden output so that metadata directories
don't cause this test to regress.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/206 |    1 +
 1 file changed, 1 insertion(+)


diff --git a/tests/xfs/206 b/tests/xfs/206
index 1297433188e868..ef5f4868e9bdca 100755
--- a/tests/xfs/206
+++ b/tests/xfs/206
@@ -63,6 +63,7 @@ mkfs_filter()
 	    -e "s/, lazy-count=[0-9]//" \
 	    -e "/.*crc=/d" \
 	    -e "/exchange=/d" \
+	    -e '/metadir=.*/d' \
 	    -e 's/, parent=[01]//' \
 	    -e "/^Default configuration/d"
 }


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

* [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  0:54   ` [PATCH 04/12] xfs/206: update for metadata directory support Darrick J. Wong
@ 2025-02-19  0:54   ` Darrick J. Wong
  2025-02-19  6:04     ` Christoph Hellwig
  2025-02-19  0:55   ` [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories Darrick J. Wong
                     ` (6 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:54 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Prior to the new metadir feature in XFS, the rtbitmap and rtsummary
files were included in icount, though their bcount contribution is zero
due to rt and quota not being supported together.  With the new metadir
feature in XFS, no files in the metadata directory tree are counted in
quota.

Hence we must adjust the icount of any quota report down by two to avoid
breaking golden outputs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/filter |    7 +++++--
 common/xfs    |   29 +++++++++++++++++++++++++++++
 tests/xfs/050 |    5 +++++
 tests/xfs/153 |    5 +++++
 tests/xfs/299 |    1 +
 tests/xfs/330 |    6 +++++-
 6 files changed, 50 insertions(+), 3 deletions(-)


diff --git a/common/filter b/common/filter
index 7e02ded377cc9b..1ebfd27e898e01 100644
--- a/common/filter
+++ b/common/filter
@@ -624,11 +624,14 @@ _filter_getcap()
 
 # Filter user/group/project id numbers out of quota reports, and standardize
 # the block counts to use filesystem block size.  Callers must set the id and
-# bsize variables before calling this function.
+# bsize variables before calling this function.  The HIDDEN_QUOTA_FILES variable
+# (by default zero) is the number of root files to filter out of the inode
+# count part of the quota report.
 _filter_quota_report()
 {
 	test -n "$id" || echo "id must be set"
 	test -n "$bsize" || echo "block size must be set"
+	test -n "$HIDDEN_QUOTA_FILES" || HIDDEN_QUOTA_FILES=0
 
 	tr -s '[:space:]' | \
 	perl -npe '
@@ -636,7 +639,7 @@ _filter_quota_report()
 		s/^\#0 \d+ /[ROOT] 0 /g;
 		s/6 days/7 days/g' |
 	perl -npe '
-		$val = 0;
+		$val = '"$HIDDEN_QUOTA_FILES"';
 		if ($ENV{'LARGE_SCRATCH_DEV'}) {
 			$val = $ENV{'NUM_SPACE_FILES'};
 		}
diff --git a/common/xfs b/common/xfs
index 85cd9a1348e385..eb4d99c91a8019 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1927,3 +1927,32 @@ _scratch_xfs_force_no_metadir()
 		MKFS_OPTIONS="-m metadir=0 $MKFS_OPTIONS"
 	fi
 }
+
+# Decide if a mount filesystem has metadata directory trees.
+_xfs_mount_has_metadir() {
+	local mount="$1"
+
+	# spaceman (and its info command) predate metadir
+	test ! -e "$XFS_SPACEMAN_PROG" && return 1
+	$XFS_SPACEMAN_PROG -c "info" "$mount" | grep -q 'metadir=1'
+}
+
+# Compute the number of files that are not counted in quotas.
+_xfs_calc_hidden_quota_files() {
+	local mount="$1"
+
+	if _xfs_mount_has_metadir "$mount"; then
+		# Prior to the metadir feature, the realtime bitmap and summary
+		# file were "owned" by root and hence accounted to the root
+		# dquots.  The metadata directory feature stopped accounting
+		# metadata files to quotas, so we must subtract 2 inodes from
+		# the repquota golden outputs to keep the tests going.
+		#
+		# We needn't adjust the block counts because the kernel doesn't
+		# support rt quota and hence the rt metadata files will always
+		# be zero length.
+		echo -2
+	else
+		echo 0
+	fi
+}
diff --git a/tests/xfs/050 b/tests/xfs/050
index 78303bf784d05e..1e40ab90a843e8 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -30,9 +30,14 @@ _require_scratch
 _require_xfs_quota
 
 _scratch_mkfs >/dev/null 2>&1
+orig_mntopts="$MOUNT_OPTIONS"
+_qmount_option "uquota"
 _scratch_mount
 bsize=$(_get_file_block_size $SCRATCH_MNT)
+# needs quota enabled to compute the number of metadata dir files
+HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
 _scratch_unmount
+MOUNT_OPTIONS="$orig_mntopts"
 
 bsoft=$(( 200 * $bsize ))
 bhard=$(( 1000 * $bsize ))
diff --git a/tests/xfs/153 b/tests/xfs/153
index d5e43082c1cd35..2ce22b8c44b298 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -35,9 +35,14 @@ _require_idmapped_mounts
 _require_test_program "vfs/mount-idmapped"
 
 _scratch_mkfs >/dev/null 2>&1
+orig_mntopts="$MOUNT_OPTIONS"
+_qmount_option "uquota"
 _scratch_mount
 bsize=$(_get_file_block_size $SCRATCH_MNT)
+# needs quota enabled to compute the number of metadata dir files
+HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
 _scratch_unmount
+MOUNT_OPTIONS="$orig_mntopts"
 
 bsoft=$(( 200 * $bsize ))
 bhard=$(( 1000 * $bsize ))
diff --git a/tests/xfs/299 b/tests/xfs/299
index 710eb89c2ac0e7..3986f8fb904e5d 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -155,6 +155,7 @@ _qmount_option "uquota,gquota,pquota"
 _qmount
 
 bsize=$(_get_file_block_size $SCRATCH_MNT)
+HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
 
 bsoft=$(( 100 * $bsize ))
 bhard=$(( 500 * $bsize ))
diff --git a/tests/xfs/330 b/tests/xfs/330
index d239a64085c76c..30c09ff5906e12 100755
--- a/tests/xfs/330
+++ b/tests/xfs/330
@@ -24,7 +24,10 @@ _require_nobody
 
 do_repquota()
 {
-	repquota $SCRATCH_MNT | grep -E '^(fsgqa|root|nobody)' | sort -r
+	repquota $SCRATCH_MNT | grep -E '^(fsgqa|root|nobody)' | sort -r | \
+	perl -npe '
+		$val = '"$HIDDEN_QUOTA_FILES"';
+		s/(^root\s+--\s+\S+\s+\S+\s+\S+\s+)(\S+)/$1@{[$2 - $val]}/g'
 }
 
 rm -f "$seqres.full"
@@ -33,6 +36,7 @@ echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> "$seqres.full" 2>&1
+HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 


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

* [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (4 preceding siblings ...)
  2025-02-19  0:54   ` [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees Darrick J. Wong
@ 2025-02-19  0:55   ` Darrick J. Wong
  2025-02-19  6:05     ` Christoph Hellwig
  2025-02-19  0:55   ` [PATCH 07/12] xfs: create fuzz tests " Darrick J. Wong
                     ` (5 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:55 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The INUMBERS ioctl exports data from the inode btree directly -- the
number of inodes it reports is taken from ir_freemask and includes all
the files in the metadata directory tree.  BULKSTAT, on the other hand,
only reports non-metadata files.  When metadir is enabled, this will
(eventually) cause a discrepancy in the inode counts that is large
enough to exceed the tolerances, thereby causing a test failure.

Correct this by counting the files in the metadata directory and
subtracting that from the INUMBERS totals.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/509 |   23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)


diff --git a/tests/xfs/509 b/tests/xfs/509
index 53c6bd9c0772a1..9b07fecc5d1a10 100755
--- a/tests/xfs/509
+++ b/tests/xfs/509
@@ -91,13 +91,13 @@ inumbers_count()
 	bstat_versions | while read v_tag v_flag; do
 		echo -n "inumbers all($v_tag): "
 		nr=$(inumbers_fs $SCRATCH_MNT $v_flag)
-		_within_tolerance "inumbers" $nr $expect $tolerance -v
+		_within_tolerance "inumbers" $((nr - METADATA_FILES)) $expect $tolerance -v
 
 		local agcount=$(_xfs_mount_agcount $SCRATCH_MNT)
 		for batchsize in 71 2 1; do
 			echo -n "inumbers $batchsize($v_tag): "
 			nr=$(inumbers_ag $agcount $batchsize $SCRATCH_MNT $v_flag)
-			_within_tolerance "inumbers" $nr $expect $tolerance -v
+			_within_tolerance "inumbers" $((nr - METADATA_FILES)) $expect $tolerance -v
 		done
 	done
 }
@@ -142,9 +142,28 @@ _require_xfs_io_command inumbers
 DIRCOUNT=8
 INOCOUNT=$((2048 / DIRCOUNT))
 
+# Count everything in the metadata directory tree.
+count_metadir_files() {
+	# Each possible path in the metadata directory tree must be listed
+	# here.
+	local metadirs=('/rtgroups')
+	local db_args=('-f')
+
+	for m in "${metadirs[@]}"; do
+		db_args+=('-c' "ls -m $m")
+	done
+
+	local ret=$(_scratch_xfs_db "${db_args[@]}" 2>/dev/null | grep regular | wc -l)
+	test -z "$ret" && ret=0
+	echo $ret
+}
+
 _scratch_mkfs "-d agcount=$DIRCOUNT" >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount
 
+METADATA_FILES=$(count_metadir_files)
+echo "found $METADATA_FILES metadata files" >> $seqres.full
+
 # Figure out if we have v5 bulkstat/inumbers ioctls.
 has_v5=
 bs_root_out="$($XFS_IO_PROG -c 'bulkstat_single root' $SCRATCH_MNT 2>>$seqres.full)"


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

* [PATCH 07/12] xfs: create fuzz tests for metadata directories
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (5 preceding siblings ...)
  2025-02-19  0:55   ` [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories Darrick J. Wong
@ 2025-02-19  0:55   ` Darrick J. Wong
  2025-02-19  6:05     ` Christoph Hellwig
  2025-02-19  0:55   ` [PATCH 08/12] xfs/163: bigger fs for metadir Darrick J. Wong
                     ` (4 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:55 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Create fuzz tests to make sure that all the validation works for
metadata directories and subdirectories.  The metadir fuzzer tests are
tagged 'realtime' to force creation of an interesting metadata directory
tree full of rtgroups inodes.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs         |   22 ++++++++++++++++++++++
 tests/xfs/1546     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1546.out |    4 ++++
 tests/xfs/1547     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1547.out |    4 ++++
 tests/xfs/1548     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1548.out |    4 ++++
 tests/xfs/1549     |   35 +++++++++++++++++++++++++++++++++++
 tests/xfs/1549.out |    4 ++++
 tests/xfs/1550     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1550.out |    4 ++++
 tests/xfs/1551     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1551.out |    4 ++++
 tests/xfs/1552     |   34 ++++++++++++++++++++++++++++++++++
 tests/xfs/1552.out |    4 ++++
 tests/xfs/1553     |   35 +++++++++++++++++++++++++++++++++++
 tests/xfs/1553.out |    4 ++++
 17 files changed, 328 insertions(+)
 create mode 100755 tests/xfs/1546
 create mode 100644 tests/xfs/1546.out
 create mode 100755 tests/xfs/1547
 create mode 100644 tests/xfs/1547.out
 create mode 100755 tests/xfs/1548
 create mode 100644 tests/xfs/1548.out
 create mode 100755 tests/xfs/1549
 create mode 100644 tests/xfs/1549.out
 create mode 100755 tests/xfs/1550
 create mode 100644 tests/xfs/1550.out
 create mode 100755 tests/xfs/1551
 create mode 100644 tests/xfs/1551.out
 create mode 100755 tests/xfs/1552
 create mode 100644 tests/xfs/1552.out
 create mode 100755 tests/xfs/1553
 create mode 100644 tests/xfs/1553.out


diff --git a/common/xfs b/common/xfs
index eb4d99c91a8019..771ef90633c6de 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1956,3 +1956,25 @@ _xfs_calc_hidden_quota_files() {
 		echo 0
 	fi
 }
+
+_require_xfs_mkfs_metadir()
+{
+	_scratch_mkfs_xfs_supported -m metadir=1 >/dev/null 2>&1 || \
+		_notrun "mkfs.xfs doesn't have metadir features"
+}
+
+_require_xfs_scratch_metadir()
+{
+	_require_xfs_mkfs_metadir
+	_require_scratch
+
+	_scratch_mkfs -m metadir=1 &> /dev/null
+	_require_scratch_xfs_features METADIR
+	_try_scratch_mount
+	res=$?
+	if [ $res -ne 0 ]; then
+		_notrun "mounting with metadir not supported by filesystem type: $FSTYP"
+	else
+		_scratch_unmount
+	fi
+}
diff --git a/tests/xfs/1546 b/tests/xfs/1546
new file mode 100755
index 00000000000000..482ea0ef6ea6be
--- /dev/null
+++ b/tests/xfs/1546
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1546
+#
+# Populate a XFS filesystem and fuzz every metadir root field.
+# Use xfs_scrub to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /')
+
+echo "Fuzz metadir root"
+_scratch_xfs_fuzz_metadata '' 'online' 'path -m /' >> $seqres.full
+echo "Done fuzzing metadir root"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1546.out b/tests/xfs/1546.out
new file mode 100644
index 00000000000000..b72891a7583c04
--- /dev/null
+++ b/tests/xfs/1546.out
@@ -0,0 +1,4 @@
+QA output created by 1546
+Format and populate
+Fuzz metadir root
+Done fuzzing metadir root
diff --git a/tests/xfs/1547 b/tests/xfs/1547
new file mode 100755
index 00000000000000..799c9f355c48a3
--- /dev/null
+++ b/tests/xfs/1547
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1547
+#
+# Populate a XFS filesystem and fuzz every metadir root field.
+# Use xfs_repair to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /')
+
+echo "Fuzz metadir root"
+_scratch_xfs_fuzz_metadata '' 'offline' 'path -m /' >> $seqres.full
+echo "Done fuzzing metadir root"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1547.out b/tests/xfs/1547.out
new file mode 100644
index 00000000000000..983cc01343e5f4
--- /dev/null
+++ b/tests/xfs/1547.out
@@ -0,0 +1,4 @@
+QA output created by 1547
+Format and populate
+Fuzz metadir root
+Done fuzzing metadir root
diff --git a/tests/xfs/1548 b/tests/xfs/1548
new file mode 100755
index 00000000000000..9175ff1e95e224
--- /dev/null
+++ b/tests/xfs/1548
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1548
+#
+# Populate a XFS filesystem and fuzz every metadir root field.
+# Do not fix the filesystem, to test metadata verifiers.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /')
+
+echo "Fuzz metadir root"
+_scratch_xfs_fuzz_metadata '' 'none' 'path -m /' >> $seqres.full
+echo "Done fuzzing metadir root"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1548.out b/tests/xfs/1548.out
new file mode 100644
index 00000000000000..9e395bb059436d
--- /dev/null
+++ b/tests/xfs/1548.out
@@ -0,0 +1,4 @@
+QA output created by 1548
+Format and populate
+Fuzz metadir root
+Done fuzzing metadir root
diff --git a/tests/xfs/1549 b/tests/xfs/1549
new file mode 100755
index 00000000000000..da0312d788cc3f
--- /dev/null
+++ b/tests/xfs/1549
@@ -0,0 +1,35 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1549
+#
+# Populate a XFS filesystem and fuzz every metadir root field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /')
+
+echo "Fuzz metadir root"
+_scratch_xfs_fuzz_metadata '' 'both' 'path -m /' >> $seqres.full
+echo "Done fuzzing metadir root"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1549.out b/tests/xfs/1549.out
new file mode 100644
index 00000000000000..22b3d215e32e7b
--- /dev/null
+++ b/tests/xfs/1549.out
@@ -0,0 +1,4 @@
+QA output created by 1549
+Format and populate
+Fuzz metadir root
+Done fuzzing metadir root
diff --git a/tests/xfs/1550 b/tests/xfs/1550
new file mode 100755
index 00000000000000..cbd6c7207a36f4
--- /dev/null
+++ b/tests/xfs/1550
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1550
+#
+# Populate a XFS filesystem and fuzz every metadir subdir field.
+# Use xfs_scrub to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /rtgroups')
+
+echo "Fuzz metadir subdir"
+_scratch_xfs_fuzz_metadata '' 'online' 'path -m /rtgroups' >> $seqres.full
+echo "Done fuzzing metadir subdir"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1550.out b/tests/xfs/1550.out
new file mode 100644
index 00000000000000..7694cd670bd25b
--- /dev/null
+++ b/tests/xfs/1550.out
@@ -0,0 +1,4 @@
+QA output created by 1550
+Format and populate
+Fuzz metadir subdir
+Done fuzzing metadir subdir
diff --git a/tests/xfs/1551 b/tests/xfs/1551
new file mode 100755
index 00000000000000..ec5fd010fc7cc7
--- /dev/null
+++ b/tests/xfs/1551
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1551
+#
+# Populate a XFS filesystem and fuzz every metadir subdir field.
+# Use xfs_repair to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /rtgroups')
+
+echo "Fuzz metadir subdir"
+_scratch_xfs_fuzz_metadata '' 'offline' 'path -m /rtgroups' >> $seqres.full
+echo "Done fuzzing metadir subdir"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1551.out b/tests/xfs/1551.out
new file mode 100644
index 00000000000000..4c3360d08b34f8
--- /dev/null
+++ b/tests/xfs/1551.out
@@ -0,0 +1,4 @@
+QA output created by 1551
+Format and populate
+Fuzz metadir subdir
+Done fuzzing metadir subdir
diff --git a/tests/xfs/1552 b/tests/xfs/1552
new file mode 100755
index 00000000000000..4350f69200541e
--- /dev/null
+++ b/tests/xfs/1552
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1552
+#
+# Populate a XFS filesystem and fuzz every metadir subdir field.
+# Do not fix the filesystem, to test metadata verifiers.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /rtgroups')
+
+echo "Fuzz metadir subdir"
+_scratch_xfs_fuzz_metadata '' 'none' 'path -m /rtgroups' >> $seqres.full
+echo "Done fuzzing metadir subdir"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1552.out b/tests/xfs/1552.out
new file mode 100644
index 00000000000000..6636b1b656c926
--- /dev/null
+++ b/tests/xfs/1552.out
@@ -0,0 +1,4 @@
+QA output created by 1552
+Format and populate
+Fuzz metadir subdir
+Done fuzzing metadir subdir
diff --git a/tests/xfs/1553 b/tests/xfs/1553
new file mode 100755
index 00000000000000..7591411d4b638a
--- /dev/null
+++ b/tests/xfs/1553
@@ -0,0 +1,35 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1553
+#
+# Populate a XFS filesystem and fuzz every metadir subdir field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_scratch_metadir
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'path -m /rtgroups')
+
+echo "Fuzz metadir subdir"
+_scratch_xfs_fuzz_metadata '' 'both' 'path -m /rtgroups' >> $seqres.full
+echo "Done fuzzing metadir subdir"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1553.out b/tests/xfs/1553.out
new file mode 100644
index 00000000000000..0298fcfddbf15a
--- /dev/null
+++ b/tests/xfs/1553.out
@@ -0,0 +1,4 @@
+QA output created by 1553
+Format and populate
+Fuzz metadir subdir
+Done fuzzing metadir subdir


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

* [PATCH 08/12] xfs/163: bigger fs for metadir
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (6 preceding siblings ...)
  2025-02-19  0:55   ` [PATCH 07/12] xfs: create fuzz tests " Darrick J. Wong
@ 2025-02-19  0:55   ` Darrick J. Wong
  2025-02-19  6:06     ` Christoph Hellwig
  2025-02-19  0:55   ` [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir Darrick J. Wong
                     ` (3 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:55 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Adjust filesystem size up so we can pass this test even with metadir
and rtgroups enabled.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/163 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/tests/xfs/163 b/tests/xfs/163
index 75c3113dc2fd03..015a82cdffaa68 100755
--- a/tests/xfs/163
+++ b/tests/xfs/163
@@ -42,7 +42,7 @@ echo "Format and mount"
 
 # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
 # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
-_scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
+_scratch_mkfs -dsize="$((900 * 1024 * 1024))" -dagcount=3 2>&1 | \
 	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 t_dblocks=$dblocks


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

* [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (7 preceding siblings ...)
  2025-02-19  0:55   ` [PATCH 08/12] xfs/163: bigger fs for metadir Darrick J. Wong
@ 2025-02-19  0:55   ` Darrick J. Wong
  2025-02-19  6:06     ` Christoph Hellwig
  2025-02-19  0:56   ` [PATCH 10/12] common/populate: label newly created xfs filesystems Darrick J. Wong
                     ` (2 subsequent siblings)
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:55 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

All of the ondisk structure size checks from this test were copied to
the build time checks in xfs_ondisk.h.  This means that the kernel and
xfsprogs build processes check the structure sizes, which means that
fstests no longer needs to do that.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/122 |    6 ++++++
 1 file changed, 6 insertions(+)


diff --git a/tests/xfs/122 b/tests/xfs/122
index a968948841de14..e96ef2fe93042b 100755
--- a/tests/xfs/122
+++ b/tests/xfs/122
@@ -15,6 +15,12 @@ _begin_fstest other auto quick clone realtime
 
 _require_command "$INDENT_PROG" indent
 
+# We ported all the ondisk size checks to xfs_ondisk.h in both the kernel and
+# xfsprogs libxfs when we added the metadir feature.  If mkfs supports metadir
+# then we don't have to run this test anymore.
+$MKFS_XFS_PROG --help 2>&1 | grep -q metadir && \
+	_notrun "struct size checks moved to libxfs/xfs_ondisk.h"
+
 # Starting in Linux 6.1, the EFI log formats were adjusted away from using
 # single-element arrays as flex arrays.
 _wants_kernel_commit 03a7485cd701 \


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

* [PATCH 10/12] common/populate: label newly created xfs filesystems
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (8 preceding siblings ...)
  2025-02-19  0:55   ` [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir Darrick J. Wong
@ 2025-02-19  0:56   ` Darrick J. Wong
  2025-02-19  6:06     ` Christoph Hellwig
  2025-02-19  0:56   ` [PATCH 11/12] scrub: race metapath online fsck with fsstress Darrick J. Wong
  2025-02-19  0:56   ` [PATCH 12/12] xfs: test metapath repairs Darrick J. Wong
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:56 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

When we're creating fully populated filesystems, add an obviously weird
label to the filesystem images so that it's obvious that it's a test
filesystem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |    8 ++++++++
 1 file changed, 8 insertions(+)


diff --git a/common/populate b/common/populate
index c907e04efd0ea9..7690f269df8e79 100644
--- a/common/populate
+++ b/common/populate
@@ -280,6 +280,10 @@ _scratch_xfs_populate() {
 		esac
 	done
 
+	# fill the fs label with obvious emoji because nobody uses them in prod
+	# and blkid throws a fit
+	_scratch_xfs_admin -L 'I❤🐸s'
+
 	_populate_xfs_qmount_option
 	_scratch_mount
 
@@ -537,6 +541,10 @@ _scratch_ext4_populate() {
 		esac
 	done
 
+	# fill the fs label with obvious emoji because nobody uses them in prod
+	# and blkid throws a fit
+	$TUNE2FS_PROG -L 'I❤🐸s' $SCRATCH_DEV
+
 	_scratch_mount
 	blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 	dblksz="${blksz}"


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

* [PATCH 11/12] scrub: race metapath online fsck with fsstress
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (9 preceding siblings ...)
  2025-02-19  0:56   ` [PATCH 10/12] common/populate: label newly created xfs filesystems Darrick J. Wong
@ 2025-02-19  0:56   ` Darrick J. Wong
  2025-02-19  6:07     ` Christoph Hellwig
  2025-02-19  0:56   ` [PATCH 12/12] xfs: test metapath repairs Darrick J. Wong
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:56 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Add a pair of new tests to exercise fsstress vs. metapath repairs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs         |    3 ++
 tests/xfs/1892     |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1892.out |    2 ++
 tests/xfs/1893     |   67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1893.out |    2 ++
 5 files changed, 140 insertions(+)
 create mode 100755 tests/xfs/1892
 create mode 100644 tests/xfs/1892.out
 create mode 100755 tests/xfs/1893
 create mode 100644 tests/xfs/1893.out


diff --git a/common/xfs b/common/xfs
index 771ef90633c6de..c8f2ea241a2a41 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1658,6 +1658,9 @@ _xfs_filter_mkfs()
 	if (/^realtime\s+=([\w|\/.-]+)\s+extsz=(\d+)\s+blocks=(\d+), rtextents=(\d+)/) {
 		print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n";
 		print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n";
+	}
+	if (/^\s+=\s+rgcount=(\d+)\s+rgsize=(\d+) extents/) {
+		print STDERR "rgcount=$1\nrgextents=$2\n";
 	}'
 }
 
diff --git a/tests/xfs/1892 b/tests/xfs/1892
new file mode 100755
index 00000000000000..13310353564554
--- /dev/null
+++ b/tests/xfs/1892
@@ -0,0 +1,66 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1892
+#
+# Race fsstress and metadata directory tree path corruption detector for a
+# while to see if we crash or livelock.
+#
+. ./common/preamble
+_begin_fstest scrub fsstress_scrub
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+_scratch_mount
+
+verbs=()
+
+try_verb()
+{
+	$XFS_IO_PROG -x -c "scrub metapath $*" "$SCRATCH_MNT" 2>&1
+}
+
+# Metapath verbs that don't require arguments
+for v in quotadir usrquota grpquota prjquota rtdir; do
+	testio=$(try_verb "$v")
+	test -z "$testio" && verbs+=("$v")
+done
+
+# Metapath verbs that take a rt group number
+for ((rgno = 0; rgno < rgcount; rgno++)); do
+	for v in rtbitmap rtsummary rtrmapbt rtrefcbt; do
+		testio=$(try_verb "$v" "$rgno")
+		test -z "$testio" && verbs+=("$v $rgno")
+	done
+done
+test "${#verbs[@]}" -gt 0 || _notrun "no metapath verbs detected"
+
+args=()
+for v in "${verbs[@]}"; do
+	args+=("scrub metapath $v")
+done
+
+echo "${verbs[@]}" >> $seqres.full
+_scratch_xfs_stress_scrub "${args[@]}"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1892.out b/tests/xfs/1892.out
new file mode 100644
index 00000000000000..afc84c43ed2dcc
--- /dev/null
+++ b/tests/xfs/1892.out
@@ -0,0 +1,2 @@
+QA output created by 1892
+Silence is golden
diff --git a/tests/xfs/1893 b/tests/xfs/1893
new file mode 100755
index 00000000000000..d06687fa2a1087
--- /dev/null
+++ b/tests/xfs/1893
@@ -0,0 +1,67 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1893
+#
+# Race fsstress and metadata directory tree path repair for a while to see if
+# we crash or livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+_scratch_mount
+
+verbs=()
+
+try_verb()
+{
+	$XFS_IO_PROG -x -c "repair metapath $*" "$SCRATCH_MNT" 2>&1 | \
+		sed -e '/did not need repair/d'
+}
+
+# Metapath verbs that don't require arguments
+for v in quotadir usrquota grpquota prjquota rtdir; do
+	testio=$(try_verb "$v")
+	test -z "$testio" && verbs+=("$v")
+done
+
+# Metapath verbs that take a rt group number
+for ((rgno = 0; rgno < rgcount; rgno++)); do
+	for v in rtbitmap rtsummary; do
+		testio=$(try_verb "$v" "$rgno")
+		test -z "$testio" && verbs+=("$v $rgno")
+	done
+done
+test "${#verbs[@]}" -gt 0 || _notrun "no metapath verbs detected"
+
+args=()
+for v in "${verbs[@]}"; do
+	args+=("repair metapath $v")
+done
+
+echo "${verbs[@]}" >> $seqres.full
+_scratch_xfs_stress_online_repair "${args[@]}"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1893.out b/tests/xfs/1893.out
new file mode 100644
index 00000000000000..64d6b1b2bcd09e
--- /dev/null
+++ b/tests/xfs/1893.out
@@ -0,0 +1,2 @@
+QA output created by 1893
+Silence is golden


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

* [PATCH 12/12] xfs: test metapath repairs
  2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
                     ` (10 preceding siblings ...)
  2025-02-19  0:56   ` [PATCH 11/12] scrub: race metapath online fsck with fsstress Darrick J. Wong
@ 2025-02-19  0:56   ` Darrick J. Wong
  2025-02-19  6:07     ` Christoph Hellwig
  11 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:56 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Functional testing for metadir path checking and repairs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1874     |  119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1874.out |   19 ++++++++
 2 files changed, 138 insertions(+)
 create mode 100755 tests/xfs/1874
 create mode 100644 tests/xfs/1874.out


diff --git a/tests/xfs/1874 b/tests/xfs/1874
new file mode 100755
index 00000000000000..2e1af9222fa0bf
--- /dev/null
+++ b/tests/xfs/1874
@@ -0,0 +1,119 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2023-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test 1874
+#
+# Functional test of using online repair to fix metadir paths.
+#
+. ./common/preamble
+_begin_fstest auto online_repair
+
+. ./common/filter
+. ./common/inject
+. ./common/fuzzy
+. ./common/quota
+
+_require_xfs_db_command "link"
+_require_xfs_db_command "unlink"
+_require_scratch
+_require_xfs_stress_online_repair
+
+prepare_fs() {
+	# Format filesystem
+	_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
+	_scratch_mount
+
+	_require_xfs_has_feature "$SCRATCH_MNT" rmapbt
+	_require_xfs_has_feature "$SCRATCH_MNT" realtime
+	_require_xfs_has_feature "$SCRATCH_MNT" metadir
+	_require_xfs_has_feature "$SCRATCH_MNT" parent
+
+	root_inum="$(stat -c '%i' $SCRATCH_MNT)"
+	__stress_scrub_check_commands "%dir%" '' '' 'scrub metapath'
+	_scratch_unmount
+
+	# Stash the /rtgroups inode number and gen
+	rt_metadir_inum=$(_scratch_xfs_get_metadata_field v3.inumber 'path -m /rtgroups')
+	rt_metadir_gen=$(_scratch_xfs_get_metadata_field core.gen 'path -m /rtgroups')
+
+	# Stash the /rtgroups/0.rmap inode number and gen
+	rbm_inum=$(_scratch_xfs_get_metadata_field v3.inumber 'path -m /rtgroups/0.rmap')
+	rbm_gen=$(_scratch_xfs_get_metadata_field core.gen 'path -m /rtgroups/0.rmap')
+
+	# Fuzz parent pointer in rtgroup 0 rmap file
+	_scratch_xfs_db -x \
+		-c 'path -m /rtgroups/0.rmap' \
+		-c "write -d a.sfattr.list[0].parent_dir.inumber $root_inum" >> $seqres.full
+}
+
+simple_online_repair() {
+	echo "check /rtgroups dir" | _tee_kernlog
+	$XFS_IO_PROG -c "scrub directory $rt_metadir_inum $rt_metadir_gen" $SCRATCH_MNT
+
+	echo "check /rtgroups/0.rmap pptr" | _tee_kernlog
+	$XFS_IO_PROG -c "scrub parent $rbm_inum $rbm_gen" $SCRATCH_MNT
+
+	echo "check /rtgroups/0.rmap metapath" | _tee_kernlog
+	$XFS_IO_PROG -c "scrub metapath rtrmapbt 0" $SCRATCH_MNT
+
+	echo "check nlinks" | _tee_kernlog
+	$XFS_IO_PROG -c "scrub nlinks" $SCRATCH_MNT
+
+	# Destroying a metadir path (e.g. /rtgroups/0.rmap) cannot be done
+	# offline because then the mount will fail.  Hence we must use a
+	# specific sequence of online repairs to remove the metadir path link.
+	# Only then can we use the metapath scrubber to restore the link.
+
+	# Force repair the parent directory.  Since /rtgroups/0.rmap has a bad
+	# parent pointer, the "0.rmap" entry in /rtgroups will not be created.
+	echo "fix /rtgroups dir" | _tee_kernlog
+	$XFS_IO_PROG -x -c "repair -R directory $rt_metadir_inum $rt_metadir_gen" $SCRATCH_MNT
+
+	# Force repair the parent pointer.  Since the "0.rmap" entry in
+	# /rtgroups no longer exists and no other directories count the
+	# rtgroup 0 rmap as a parent, this will fail cross-referencing after
+	# the repair.
+	echo "fix /rtgroups/0.rmap pptr" | _tee_kernlog
+	$XFS_IO_PROG -x -c "repair -R parent $rbm_inum $rbm_gen" $SCRATCH_MNT
+
+	# Now that we've completely erased the /rtgroups/0.rmap path, check
+	# that the link is indeed lost, and restore the link.
+	echo "fix /rtgroups/0.rmap metapath" | _tee_kernlog
+	$XFS_IO_PROG -x -c "repair metapath rtrmapbt 0" $SCRATCH_MNT
+
+	# Make sure we're not missing any link count
+	echo "fix nlinks" | _tee_kernlog
+	$XFS_IO_PROG -x -c "repair nlinks" $SCRATCH_MNT
+}
+
+echo Part 1: Use raw ioctls to detect the error and fix it.
+prepare_fs
+_scratch_mount
+simple_online_repair
+_check_scratch_fs
+_scratch_unmount
+
+echo Part 2: Use xfs_scrub to detect the error and fix it.
+prepare_fs
+_scratch_mount
+echo "fix with xfs_scrub" | _tee_kernlog
+_scratch_scrub &>> $seqres.full
+echo "xfs_scrub returned $?" >> $seqres.full
+_check_scratch_fs
+_scratch_unmount
+
+echo Part 3: Use xfs_repair to detect the error and fix it.
+prepare_fs
+echo "fix with xfs_repair" | _tee_kernlog
+echo repair?? >> $seqres.full
+_scratch_xfs_repair &>> $seqres.full
+echo "xfs_repair returned $?" >> $seqres.full
+_scratch_mount
+_check_scratch_fs
+_scratch_unmount
+
+echo "done with test" | _tee_kernlog
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1874.out b/tests/xfs/1874.out
new file mode 100644
index 00000000000000..ff4497363d8063
--- /dev/null
+++ b/tests/xfs/1874.out
@@ -0,0 +1,19 @@
+QA output created by 1874
+Part 1: Use raw ioctls to detect the error and fix it.
+check /rtgroups dir
+Corruption detected during cross-referencing.
+check /rtgroups/0.rmap pptr
+Corruption detected during cross-referencing.
+check /rtgroups/0.rmap metapath
+check nlinks
+fix /rtgroups dir
+fix /rtgroups/0.rmap pptr
+Corruption remains.
+Corruption still detected during cross-referencing.
+fix /rtgroups/0.rmap metapath
+fix nlinks
+Part 2: Use xfs_scrub to detect the error and fix it.
+fix with xfs_scrub
+Part 3: Use xfs_repair to detect the error and fix it.
+fix with xfs_repair
+done with test


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

* [PATCH 1/4] xfs/019: reduce _fail calls in test
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
@ 2025-02-19  0:56   ` Darrick J. Wong
  2025-02-19  6:08     ` Christoph Hellwig
  2025-02-19  0:57   ` [PATCH 2/4] xfs/019: test reserved file support Darrick J. Wong
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:56 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Replace some _fail calls in this test with softer variants: First,
_scratch_mount does _try_scratch_mount || _fail so it can go away.

Replace the rest of them with echoes because that's sufficient to fail
the test without omitting further check.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/019 |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)


diff --git a/tests/xfs/019 b/tests/xfs/019
index fdd965aa908f2b..b30116560c7c40 100755
--- a/tests/xfs/019
+++ b/tests/xfs/019
@@ -106,22 +106,21 @@ _verify_fs()
 
 	echo "*** mount FS"
 	_full " mount"
-	_try_scratch_mount >>$seqfull 2>&1 \
-		|| _fail "mount failed"
+	_scratch_mount >>$seqfull 2>&1
 
 	echo "*** verify FS"
 	(cd $SCRATCH_MNT ; find . | LC_COLLATE=POSIX sort \
 		| grep -v ".use_space" \
 		| xargs $here/src/lstat64 | _filter_stat)
 	diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
-		|| _fail "bigfile corrupted"
+		|| echo "bigfile corrupted"
 	diff -q $SCRATCH_MNT/symlink $tempfile.2 \
-		|| _fail "symlink broken"
+		|| echo "symlink broken"
 
 	echo "*** unmount FS"
 	_full "umount"
 	_scratch_unmount >>$seqfull 2>&1 \
-		|| _fail "umount failed"
+		|| echo "umount failed"
 }
 
 #_verify_fs 1


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

* [PATCH 2/4] xfs/019: test reserved file support
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
  2025-02-19  0:56   ` [PATCH 1/4] xfs/019: reduce _fail calls in test Darrick J. Wong
@ 2025-02-19  0:57   ` Darrick J. Wong
  2025-02-19  6:09     ` Christoph Hellwig
  2025-02-19  0:57   ` [PATCH 3/4] xfs: test filesystem creation with xfs_protofile Darrick J. Wong
  2025-02-19  0:57   ` [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support Darrick J. Wong
  3 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:57 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Test creating files with preallocated blocks but a file size of zero,
since mkfs' protofile parser supports creating such things.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/019     |    5 +++++
 tests/xfs/019.out |    5 +++++
 2 files changed, 10 insertions(+)


diff --git a/tests/xfs/019 b/tests/xfs/019
index b30116560c7c40..5804ef228bd9d2 100755
--- a/tests/xfs/019
+++ b/tests/xfs/019
@@ -82,6 +82,7 @@ pipe p--670 0 0
 symlink l--123 0 0 bigfile
 : a file we actually read
 bigfile ---666 3 0 $tempfile.2
+rsvfile r--666 3 0 1234567
 : done
 $
 EOF
@@ -117,6 +118,10 @@ _verify_fs()
 	diff -q $SCRATCH_MNT/symlink $tempfile.2 \
 		|| echo "symlink broken"
 
+	rsvblocks=$(stat -c '%b' $SCRATCH_MNT/rsvfile)
+	test $rsvblocks -gt 0 \
+		|| echo "rsvfile broken"
+
 	echo "*** unmount FS"
 	_full "umount"
 	_scratch_unmount >>$seqfull 2>&1 \
diff --git a/tests/xfs/019.out b/tests/xfs/019.out
index 9db157f9b413b9..9fd3b577e1ab94 100644
--- a/tests/xfs/019.out
+++ b/tests/xfs/019.out
@@ -69,6 +69,11 @@ Device: <DEVICE> Inode: <INODE> Links: 1
  Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)
 Device: <DEVICE> Inode: <INODE> Links: 1 
 
+ File: "./rsvfile"
+ Size: 0 Filetype: Regular File
+ Mode: (0666/-rw-rw-rw-) Uid: (3) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
  File: "./setgid"
  Size: 5 Filetype: Regular File
  Mode: (2666/-rw-rwsrw-) Uid: (0) Gid: (0)


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

* [PATCH 3/4] xfs: test filesystem creation with xfs_protofile
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
  2025-02-19  0:56   ` [PATCH 1/4] xfs/019: reduce _fail calls in test Darrick J. Wong
  2025-02-19  0:57   ` [PATCH 2/4] xfs/019: test reserved file support Darrick J. Wong
@ 2025-02-19  0:57   ` Darrick J. Wong
  2025-02-19  6:09     ` Christoph Hellwig
  2025-02-19  0:57   ` [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support Darrick J. Wong
  3 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:57 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Test how well we can format a fully populated filesystem with a
protofile that was generated with xfs_protofile.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/config      |    1 
 tests/xfs/1894     |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1894.out |    4 ++
 3 files changed, 114 insertions(+)
 create mode 100755 tests/xfs/1894
 create mode 100644 tests/xfs/1894.out


diff --git a/common/config b/common/config
index 193b7af432dc2b..da12399da421c7 100644
--- a/common/config
+++ b/common/config
@@ -161,6 +161,7 @@ export MKSWAP_PROG="$(type -P mkswap)"
 MKSWAP_PROG="$MKSWAP_PROG -f"
 
 export XFS_LOGPRINT_PROG="$(type -P xfs_logprint)"
+export XFS_PROTOFILE_PROG="$(type -P xfs_protofile)"
 export XFS_REPAIR_PROG="$(type -P xfs_repair)"
 export XFS_DB_PROG="$(type -P xfs_db)"
 export XFS_METADUMP_PROG="$(type -P xfs_metadump)"
diff --git a/tests/xfs/1894 b/tests/xfs/1894
new file mode 100755
index 00000000000000..2f6beea2c433bf
--- /dev/null
+++ b/tests/xfs/1894
@@ -0,0 +1,109 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Oracle, Inc.  All Rights Reserved.
+#
+# FS QA Test No. 1894
+#
+# Populate a XFS filesystem, use xfs_protofile to recreate the filesystem, and
+# compare the contents.
+#
+. ./common/preamble
+_begin_fstest auto scrub
+
+_cleanup()
+{
+	command -v _kill_fsstress &>/dev/null && _kill_fsstress
+	cd /
+	test -e "$testfiles" && _unmount $testfiles/mount &>/dev/null
+	test -e "$testfiles" && rm -r -f $testfiles
+}
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_command "$XFS_PROTOFILE_PROG" xfs_protofile
+_require_test
+_require_scratch
+_require_scrub
+_require_populate_commands
+
+make_md5()
+{
+	(cd $1 ; find . -type f -print0 | xargs -0 md5sum) > $tmp.md5.$2
+}
+
+cmp_md5()
+{
+	(cd $1 ; md5sum --quiet -c $tmp.md5.$2)
+}
+
+make_stat()
+{
+	# columns:	raw mode in hex,
+	# 		major rdev for special
+	# 		minor rdev for special
+	# 		uid of owner
+	# 		gid of owner
+	# 		file type
+	# 		total size
+	# 		name
+	# We can't directly control directory sizes so filter them.
+	(cd $1 ; find . -print0 |
+		xargs -0 stat -c '%f %t:%T %u %g %F %s %n' |
+		sed -e 's/ directory [1-9][0-9]* / directory SIZE /g' |
+		sort) > $tmp.stat.$2
+}
+
+cmp_stat()
+{
+	diff -u $tmp.stat.$1 $tmp.stat.$2
+}
+
+testfiles=$TEST_DIR/$seq
+mkdir -p $testfiles/mount
+
+echo "Format and populate"
+_scratch_populate_cached nofill >> $seqres.full 2>&1
+_scratch_mount
+
+_run_fsstress -n 1000 -d $SCRATCH_MNT/newfiles
+
+make_stat $SCRATCH_MNT before
+make_md5 $SCRATCH_MNT before
+
+kb_needed=$(du -k -s $SCRATCH_MNT | awk '{print $1}')
+img_size=$((kb_needed * 2))
+test "$img_size" -lt $((300 * 1024)) && img_size=$((300 * 1024))
+
+echo "Clone image with protofile"
+$XFS_PROTOFILE_PROG $SCRATCH_MNT > $testfiles/protofile
+
+truncate -s "${img_size}k" $testfiles/image
+if ! _try_mkfs_dev -p $testfiles/protofile $testfiles/image &> $tmp.mkfs; then
+	cat $tmp.mkfs >> $seqres.full
+
+	# mkfs.xfs' protofile parser has some limitations in what it can copy
+	# in from the prototype files.  If a source file has more than 64k
+	# worth of xattr names then formatting will fail because listxattr
+	# cannot return that much information.
+	if grep -q 'Argument list too long' $tmp.mkfs; then
+		_notrun "source filesystem was too large"
+	fi
+	cat $tmp.mkfs
+fi
+
+_mount $testfiles/image $testfiles/mount
+
+echo "Check file contents"
+make_stat $testfiles/mount after
+cmp_stat before after
+cmp_md5 $testfiles/mount before
+_unmount $testfiles/mount
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1894.out b/tests/xfs/1894.out
new file mode 100644
index 00000000000000..5dd46993549187
--- /dev/null
+++ b/tests/xfs/1894.out
@@ -0,0 +1,4 @@
+QA output created by 1894
+Format and populate
+Clone image with protofile
+Check file contents


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

* [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support
  2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  0:57   ` [PATCH 3/4] xfs: test filesystem creation with xfs_protofile Darrick J. Wong
@ 2025-02-19  0:57   ` Darrick J. Wong
  2025-02-19  6:09     ` Christoph Hellwig
  3 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:57 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Make sure we can do protofiles with xattr support.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1937     |  144 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1937.out |  102 +++++++++++++++++++++++++++++++++++++
 2 files changed, 246 insertions(+)
 create mode 100755 tests/xfs/1937
 create mode 100644 tests/xfs/1937.out


diff --git a/tests/xfs/1937 b/tests/xfs/1937
new file mode 100755
index 00000000000000..aa4143a75ef643
--- /dev/null
+++ b/tests/xfs/1937
@@ -0,0 +1,144 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2025 Oracle.  All Rights Reserved.
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
+#
+# FS QA Test No. 1937
+#
+# mkfs protofile with xattrs test
+#
+. ./common/preamble
+_begin_fstest mkfs auto quick
+
+seqfull="$seqres.full"
+rm -f $seqfull
+
+. ./common/filter
+
+_cleanup()
+{
+	echo "*** unmount"
+	_scratch_unmount 2>/dev/null
+	rm -f $tmp.*
+	rm -f $TEST_DIR/$seq.file
+}
+
+_full()
+{
+	echo ""            >>$seqfull
+	echo "*** $* ***"  >>$seqfull
+	echo ""            >>$seqfull
+}
+
+_filter_stat()
+{
+	sed '
+		/^Access:/d;
+		/^Modify:/d;
+		/^Change:/d;
+		s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
+		s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
+		s/Size: *[0-9][0-9]* *Filetype: Dir/Size: <DSIZE> Filetype: Dir/;
+	' | tr -s ' '
+}
+
+_require_command $ATTR_PROG "attr"
+_require_scratch
+
+# mkfs cannot create a filesystem with protofiles if realtime is enabled, so
+# don't run this test if the rtinherit is anywhere in the mkfs options.
+echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
+	_notrun "Cannot mkfs with a protofile and -d rtinherit."
+
+protofile=$tmp.proto
+tempfile=$TEST_DIR/$seq.file
+
+$XFS_IO_PROG -f -c 'pwrite 64k 28k' -c 'pwrite 1280k 37960' $tempfile >> $seqres.full
+$here/src/devzero -b 2048 -n 2 -c -v 44 $tempfile.2 
+
+$ATTR_PROG -R -s rootdata -V 0test $tempfile &>> $seqres.full
+$ATTR_PROG -S -s acldata -V 1test $tempfile &>> $seqres.full
+$ATTR_PROG -s userdata -V 2test $tempfile &>> $seqres.full
+perl -e 'print "x" x 37960;' | $ATTR_PROG -s bigdata $tempfile &>> $seqres.full
+
+cat >$protofile <<EOF
+DUMMY1
+0 0
+: root directory
+d--777 3 1
+: a directory
+directory d--755 3 1 
+test ---755 3 1 $tempfile
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0 ---755 3 1 $tempfile
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 ---755 3 1 $tempfile
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2 ---755 3 1 $tempfile
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3 ---755 3 1 $tempfile
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4 ---755 3 1 $tempfile
+$
+: back in the root
+setuid -u-666 0 0 $tempfile
+setgid --g666 0 0 $tempfile
+setugid -ug666 0 0 $tempfile
+directory_setgid d-g755 3 2
+file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile
+$
+: back in the root
+block_device b--012 3 1 161 162 
+char_device c--345 3 1 177 178
+pipe p--670 0 0
+symlink l--123 0 0 bigfile
+: a file we actually read
+bigfile ---666 3 0 $tempfile.2
+: done
+$
+EOF
+
+if [ $? -ne 0 ]
+then
+	_fail "failed to create test protofile"
+fi
+
+_verify_fs()
+{
+	echo "*** create FS version $1"
+	VERSION="-n version=$1"
+
+	_scratch_unmount >/dev/null 2>&1
+
+	_full "mkfs"
+	_scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1
+
+	echo "*** check FS"
+	_check_scratch_fs
+
+	echo "*** mount FS"
+	_full " mount"
+	_try_scratch_mount >>$seqfull 2>&1 \
+		|| _fail "mount failed"
+
+	$ATTR_PROG -l $SCRATCH_MNT/directory/test | \
+		grep -q 'Attribute.*has a ' || \
+		_notrun "mkfs.xfs protofile does not support xattrs"
+
+	echo "*** verify FS"
+	(cd $SCRATCH_MNT ; find . | LC_COLLATE=POSIX sort \
+		| grep -v ".use_space" \
+		| xargs $here/src/lstat64 | _filter_stat)
+	diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
+		|| _fail "bigfile corrupted"
+	diff -q $SCRATCH_MNT/symlink $tempfile.2 \
+		|| _fail "symlink broken"
+
+	$ATTR_PROG -l $SCRATCH_MNT/directory/test | _filter_scratch
+
+	echo "*** unmount FS"
+	_full "umount"
+	_scratch_unmount >>$seqfull 2>&1 \
+		|| _fail "umount failed"
+}
+
+_verify_fs 2
+
+echo "*** done"
+status=0
+exit
diff --git a/tests/xfs/1937.out b/tests/xfs/1937.out
new file mode 100644
index 00000000000000..050c8318b1abca
--- /dev/null
+++ b/tests/xfs/1937.out
@@ -0,0 +1,102 @@
+QA output created by 1937
+Wrote 2048.00Kb (value 0x2c)
+*** create FS version 2
+*** check FS
+*** mount FS
+*** verify FS
+ File: "."
+ Size: <DSIZE> Filetype: Directory
+ Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 4 
+
+ File: "./bigfile"
+ Size: 2097152 Filetype: Regular File
+ Mode: (0666/-rw-rw-rw-) Uid: (3) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./block_device"
+ Size: 0 Filetype: Block Device
+ Mode: (0012/b-----x-w-) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 161,162
+
+ File: "./char_device"
+ Size: 0 Filetype: Character Device
+ Mode: (0345/c-wxr--r-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 177,178
+
+ File: "./directory"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (0755/drwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 2 
+
+ File: "./directory/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory/test"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)
+Device: <DEVICE> Inode: <INODE> Links: 2 
+
+ File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5"
+ Size: 1348680 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./pipe"
+ Size: 0 Filetype: Fifo File
+ Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./setgid"
+ Size: 1348680 Filetype: Regular File
+ Mode: (2666/-rw-rwsrw-) Uid: (0) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./setugid"
+ Size: 1348680 Filetype: Regular File
+ Mode: (6666/-rwsrwsrw-) Uid: (0) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./setuid"
+ Size: 1348680 Filetype: Regular File
+ Mode: (4666/-rwsrw-rw-) Uid: (0) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+
+ File: "./symlink"
+ Size: 7 Filetype: Symbolic Link
+ Mode: (0123/l--x-w--wx) Uid: (0) Gid: (0)
+Device: <DEVICE> Inode: <INODE> Links: 1 
+Attribute "userdata" has a 5 byte value for SCRATCH_MNT/directory/test
+Attribute "rootdata" has a 5 byte value for SCRATCH_MNT/directory/test
+Attribute "bigdata" has a 37960 byte value for SCRATCH_MNT/directory/test
+Attribute "acldata" has a 5 byte value for SCRATCH_MNT/directory/test
+*** unmount FS
+*** done
+*** unmount


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

* [PATCH 01/15] common/populate: refactor caching of metadumps to a helper
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
@ 2025-02-19  0:57   ` Darrick J. Wong
  2025-02-19  7:12     ` Christoph Hellwig
  2025-02-19  0:58   ` [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore Darrick J. Wong
                     ` (13 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:57 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Hoist out of _scratch_populate_cached all the code that we use to save a
metadump of the populated filesystem.  We're going to make this more
involved for XFS in the next few patches so that we can take advantage
of the new support for external devices in metadump/mdrestore.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |   37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)


diff --git a/common/populate b/common/populate
index 7690f269df8e79..627e8ca49694e7 100644
--- a/common/populate
+++ b/common/populate
@@ -1064,6 +1064,31 @@ _scratch_populate_restore_cached() {
 	return 1
 }
 
+# Take a metadump of the scratch filesystem and cache it for later.
+_scratch_populate_save_metadump()
+{
+	local metadump_file="$1"
+
+	case "${FSTYP}" in
+	"xfs")
+		local logdev=none
+		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+			logdev=$SCRATCH_LOGDEV
+
+		_xfs_metadump "$metadump_file" "$SCRATCH_DEV" "$logdev" \
+				compress -a -o
+		res=$?
+		;;
+	"ext2"|"ext3"|"ext4")
+		_ext4_metadump "${SCRATCH_DEV}" "${metadump_file}" compress
+		res=$?
+		;;
+	*)
+		_fail "Don't know how to save a ${FSTYP} filesystem."
+	esac
+	return $res
+}
+
 # Populate a scratch FS from scratch or from a cached image.
 _scratch_populate_cached() {
 	local meta_descr="$(_scratch_populate_cache_tag "$@")"
@@ -1087,26 +1112,20 @@ _scratch_populate_cached() {
 
 	# Oh well, just create one from scratch
 	_scratch_mkfs
-	echo "${meta_descr}" > "${populate_metadump_descr}"
 	case "${FSTYP}" in
 	"xfs")
 		_scratch_xfs_populate $@
 		_scratch_xfs_populate_check
-
-		local logdev=none
-		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-			logdev=$SCRATCH_LOGDEV
-
-		_xfs_metadump "$POPULATE_METADUMP" "$SCRATCH_DEV" "$logdev" \
-			compress -a -o
 		;;
 	"ext2"|"ext3"|"ext4")
 		_scratch_ext4_populate $@
 		_scratch_ext4_populate_check
-		_ext4_metadump "${SCRATCH_DEV}" "${POPULATE_METADUMP}" compress
 		;;
 	*)
 		_fail "Don't know how to populate a ${FSTYP} filesystem."
 		;;
 	esac
+
+	_scratch_populate_save_metadump "${POPULATE_METADUMP}" && \
+			echo "${meta_descr}" > "${populate_metadump_descr}"
 }


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

* [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
  2025-02-19  0:57   ` [PATCH 01/15] common/populate: refactor caching of metadumps to a helper Darrick J. Wong
@ 2025-02-19  0:58   ` Darrick J. Wong
  2025-02-19  7:12     ` Christoph Hellwig
  2025-02-19  0:58   ` [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally Darrick J. Wong
                     ` (12 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:58 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Port the fuzzing and populated filesystem cache code to use this helper
to pick up external log devices for the scratch filesystem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/fuzzy    |    2 +-
 common/populate |   15 ++-------------
 2 files changed, 3 insertions(+), 14 deletions(-)


diff --git a/common/fuzzy b/common/fuzzy
index 702ebc4b9aed84..ee9fe75609e603 100644
--- a/common/fuzzy
+++ b/common/fuzzy
@@ -306,7 +306,7 @@ __scratch_xfs_fuzz_unmount()
 __scratch_xfs_fuzz_mdrestore()
 {
 	__scratch_xfs_fuzz_unmount
-	_xfs_mdrestore "${POPULATE_METADUMP}" "${SCRATCH_DEV}" || \
+	_scratch_xfs_mdrestore "${POPULATE_METADUMP}" || \
 		_fail "${POPULATE_METADUMP}: Could not find metadump to restore?"
 }
 
diff --git a/common/populate b/common/populate
index 627e8ca49694e7..e6804cbc6114ba 100644
--- a/common/populate
+++ b/common/populate
@@ -1030,19 +1030,8 @@ _scratch_populate_restore_cached() {
 
 	case "${FSTYP}" in
 	"xfs")
-		_xfs_mdrestore "${metadump}" "${SCRATCH_DEV}"
-		res=$?
-		test $res -ne 0 && return $res
-
-		# Cached images should have been unmounted cleanly, so if
-		# there's an external log we need to wipe it and run repair to
-		# format it to match this filesystem.
-		if [ -n "${SCRATCH_LOGDEV}" ]; then
-			$WIPEFS_PROG -a "${SCRATCH_LOGDEV}"
-			_scratch_xfs_repair
-			res=$?
-		fi
-		return $res
+		_scratch_xfs_mdrestore "${metadump}"
+		return $?
 		;;
 	"ext2"|"ext3"|"ext4")
 		_ext4_mdrestore "${metadump}" "${SCRATCH_DEV}"


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

* [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
  2025-02-19  0:57   ` [PATCH 01/15] common/populate: refactor caching of metadumps to a helper Darrick J. Wong
  2025-02-19  0:58   ` [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore Darrick J. Wong
@ 2025-02-19  0:58   ` Darrick J. Wong
  2025-02-19  7:13     ` Christoph Hellwig
  2025-02-19  0:58   ` [PATCH 04/15] fuzzy: run fsx on " Darrick J. Wong
                     ` (11 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:58 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

If we're stress-testing scrub on a realtime filesystem, make sure that
we run fsstress on separate directory trees for data and realtime
workouts.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/fuzzy |   56 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 42 insertions(+), 14 deletions(-)


diff --git a/common/fuzzy b/common/fuzzy
index ee9fe75609e603..39efdb22c71627 100644
--- a/common/fuzzy
+++ b/common/fuzzy
@@ -1015,15 +1015,28 @@ __stress_scrub_fsx_loop() {
 	rm -f "$runningfile"
 }
 
+# Run fsstress and record outcome
+___scrub_run_fsstress() {
+	_run_fsstress "$@"
+	local res=$?
+	echo "fsstress $* exits with $res at $(date)" >> $seqres.full
+	test "$res" -ne 0 && touch "$tmp.killstress"
+}
+
 # Run fsstress while we're testing online fsck.
 __stress_scrub_fsstress_loop() {
 	local end="$1"
 	local runningfile="$2"
 	local remount_period="$3"
 	local stress_tgt="$4"
-	local focus=()
-	local res
+	local focus=(-p 4)
+	local res res2
 	local duration
+	local has_rt
+	local d_args r_args
+
+	test $FSTYP = "xfs" && _xfs_has_feature "$SCRATCH_MNT" realtime && \
+		has_rt=1
 
 	case "$stress_tgt" in
 	"parent")
@@ -1113,9 +1126,24 @@ __stress_scrub_fsstress_loop() {
 		;;
 	esac
 
-	local args=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT "${focus[@]}")
-	echo "Running $FSSTRESS_PROG $args" >> $seqres.full
+	if [ -n "$has_rt" ]; then
+		local rdir="$SCRATCH_MNT/rt"
+		local ddir="$SCRATCH_MNT/data"
 
+		mkdir -p "$rdir" "$ddir"
+		$XFS_IO_PROG -c 'chattr +rt' "$rdir"
+		$XFS_IO_PROG -c 'chattr -rt' "$ddir"
+
+		r_args=$(_scale_fsstress_args -d "$rdir" "${focus[@]}")
+		d_args=$(_scale_fsstress_args -d "$ddir" "${focus[@]}")
+		echo "Running $FSSTRESS_PROG $d_args" >> $seqres.full
+		echo "Running $FSSTRESS_PROG $r_args" >> $seqres.full
+	else
+		d_args=$(_scale_fsstress_args -d $SCRATCH_MNT "${focus[@]}")
+		echo "Running $FSSTRESS_PROG $d_args" >> $seqres.full
+	fi
+
+	rm -f "$tmp.killstress"
 	if [ -n "$remount_period" ]; then
 		local mode="rw"
 		local rw_arg=""
@@ -1125,10 +1153,10 @@ __stress_scrub_fsstress_loop() {
 			test "$mode" = "rw" && __stress_scrub_clean_scratch && continue
 
 			duration=$(___stress_scrub_duration "$end" "$remount_period")
-			_run_fsstress $duration $args $rw_arg >> $seqres.full
-			res=$?
-			echo "$mode fsstress exits with $res at $(date)" >> $seqres.full
-			[ "$res" -ne 0 ] && break;
+			___scrub_run_fsstress $duration $d_args $rw_arg &
+			test -n "$has_rt" && ___scrub_run_fsstress $duration $r_args $rw_arg &
+			wait
+			test -e "$tmp.killstress" && break
 
 			if [ "$mode" = "rw" ]; then
 				mode="ro"
@@ -1144,7 +1172,7 @@ __stress_scrub_fsstress_loop() {
 				sleep 0.2
 			done
 		done
-		rm -f "$runningfile"
+		rm -f "$runningfile" "$tmp.killstress"
 		return 0
 	fi
 
@@ -1152,12 +1180,12 @@ __stress_scrub_fsstress_loop() {
 		# Need to recheck running conditions if we cleared anything
 		__stress_scrub_clean_scratch && continue
 		duration=$(___stress_scrub_duration "$end" "$remount_period")
-		_run_fsstress $duration $args >> $seqres.full
-		res=$?
-		echo "$mode fsstress exits with $res at $(date)" >> $seqres.full
-		[ "$res" -ne 0 ] && break;
+		___scrub_run_fsstress $duration $d_args &
+		test -n "$has_rt" && ___scrub_run_fsstress $duration $r_args &
+		wait
+		test -e "$tmp.killstress" && break
 	done
-	rm -f "$runningfile"
+	rm -f "$runningfile" "$tmp.killstress"
 }
 
 # Make sure we have everything we need to run stress and scrub


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

* [PATCH 04/15] fuzzy: run fsx on data and rt sections of xfs filesystems equally
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  0:58   ` [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally Darrick J. Wong
@ 2025-02-19  0:58   ` Darrick J. Wong
  2025-02-19  7:13     ` Christoph Hellwig
  2025-02-19  0:58   ` [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations Darrick J. Wong
                     ` (10 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:58 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

If we're stress-testing scrub on a realtime filesystem, make sure that
we run fsx on separate files for data and realtime workouts.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/fuzzy |   53 ++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 13 deletions(-)


diff --git a/common/fuzzy b/common/fuzzy
index 39efdb22c71627..1548f372fac58a 100644
--- a/common/fuzzy
+++ b/common/fuzzy
@@ -955,6 +955,14 @@ ___stress_scrub_duration()
 	echo "--duration=$delta"
 }
 
+# Run fsx and record outcome
+___scrub_run_fsx() {
+	$FSX_PROG "$@" >> $seqres.full
+	local res=$?
+	echo "fsx $* exits with $res at $(date)" >> $seqres.full
+	test "$res" -ne 0 && touch "$tmp.killfsx"
+}
+
 # Run fsx while we're testing online fsck.
 __stress_scrub_fsx_loop() {
 	local end="$1"
@@ -963,14 +971,33 @@ __stress_scrub_fsx_loop() {
 	local stress_tgt="$4"	# ignored
 	local focus=(-q -X)	# quiet, validate file contents
 	local duration
-	local res
+	local has_rt
+	local d_args r_args
+
+	test $FSTYP = "xfs" && _xfs_has_feature "$SCRATCH_MNT" realtime && \
+		has_rt=1
 
 	focus+=(-o $((128000 * LOAD_FACTOR)) )
 	focus+=(-l $((600000 * LOAD_FACTOR)) )
 
-	local args="$FSX_AVOID ${focus[@]} ${SCRATCH_MNT}/fsx.$seq"
-	echo "Running $FSX_PROG $args" >> $seqres.full
+	if [ -n "$has_rt" ]; then
+		local rdir="$SCRATCH_MNT/rt"
+		local ddir="$SCRATCH_MNT/data"
 
+		mkdir -p "$rdir" "$ddir"
+		$XFS_IO_PROG -c 'chattr +rt' "$rdir"
+		$XFS_IO_PROG -c 'chattr -rt' "$ddir"
+
+		r_args="$FSX_AVOID ${focus[*]} $rdir/fsx"
+		d_args="$FSX_AVOID ${focus[*]} $ddir/fsx"
+		echo "Running $FSX_PROG $d_args" >> $seqres.full
+		echo "Running $FSX_PROG $r_args" >> $seqres.full
+	else
+		d_args="$FSX_AVOID ${focus[*]} $SCRATCH_MNT/fsx"
+		echo "Running $FSX_PROG $d_args" >> $seqres.full
+	fi
+
+	rm -f "$tmp.killfsx"
 	if [ -n "$remount_period" ]; then
 		local mode="rw"
 		local rw_arg=""
@@ -980,10 +1007,10 @@ __stress_scrub_fsx_loop() {
 			test "$mode" = "rw" && __stress_scrub_clean_scratch && continue
 
 			duration=$(___stress_scrub_duration "$end" "$remount_period")
-			$FSX_PROG $duration $args $rw_arg >> $seqres.full
-			res=$?
-			echo "$mode fsx exits with $res at $(date)" >> $seqres.full
-			test "$res" -ne 0 && break
+			___scrub_run_fsx $duration $d_args $rw_arg &
+			test -n "$has_rt" && ___scrub_run_fsx $duration $r_args $rw_arg &
+			wait
+			test -e "$tmp.killfsx" && break
 
 			if [ "$mode" = "rw" ]; then
 				mode="ro"
@@ -999,7 +1026,7 @@ __stress_scrub_fsx_loop() {
 				sleep 0.2
 			done
 		done
-		rm -f "$runningfile"
+		rm -f "$runningfile" "$tmp.killfsx"
 		return 0
 	fi
 
@@ -1007,12 +1034,12 @@ __stress_scrub_fsx_loop() {
 		# Need to recheck running conditions if we cleared anything
 		__stress_scrub_clean_scratch && continue
 		duration=$(___stress_scrub_duration "$end" "$remount_period")
-		$FSX_PROG $duration $args >> $seqres.full
-		res=$?
-		echo "fsx exits with $res at $(date)" >> $seqres.full
-		test "$res" -ne 0 && break
+		___scrub_run_fsx $duration $d_args &
+		test -n "$has_rt" && ___scrub_run_fsx $duration $r_args &
+		wait
+		test -e "$tmp.killfsx" && break
 	done
-	rm -f "$runningfile"
+	rm -f "$runningfile" "$tmp.killfsx"
 }
 
 # Run fsstress and record outcome


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

* [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  0:58   ` [PATCH 04/15] fuzzy: run fsx on " Darrick J. Wong
@ 2025-02-19  0:58   ` Darrick J. Wong
  2025-02-19  7:14     ` Christoph Hellwig
  2025-02-19  0:59   ` [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots Darrick J. Wong
                     ` (9 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:58 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The e2image file format doesn't support the capture of external log
devices, which means that mdrestore ought to reformat the external log
to get the restored filesystem to work again.  The common/populate code
could already do this, so push it to the common ext4 helper.

While we're at it, fix the uncareful usage of SCRATCH_LOGDEV in the
populate code.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/ext4     |   17 ++++++++++++++++-
 common/populate |   18 +++++-------------
 2 files changed, 21 insertions(+), 14 deletions(-)


diff --git a/common/ext4 b/common/ext4
index 13921bb8165a4d..e1b336d3d20cba 100644
--- a/common/ext4
+++ b/common/ext4
@@ -134,7 +134,8 @@ _ext4_mdrestore()
 {
 	local metadump="$1"
 	local device="$2"
-	shift; shift
+	local logdev="$3"
+	shift; shift; shift
 	local options="$@"
 
 	# If we're configured for compressed dumps and there isn't already an
@@ -148,6 +149,20 @@ _ext4_mdrestore()
 	test -r "$metadump" || return 1
 
 	$E2IMAGE_PROG $options -r "${metadump}" "${SCRATCH_DEV}"
+	res=$?
+	test $res -ne 0 && return $res
+
+	# ext4 cannot e2image external logs, so we have to reformat the log
+	# device to match the restored fs
+	if [ "${logdev}" != "none" ]; then
+		local fsuuid="$($DUMPE2FS_PROG -h "${SCRATCH_DEV}" 2>/dev/null | \
+				grep 'Journal UUID:' | \
+				sed -e 's/Journal UUID:[[:space:]]*//g')"
+		$MKFS_EXT4_PROG -O journal_dev "${logdev}" \
+				-F -U "${fsuuid}"
+		res=$?
+	fi
+	return $res
 }
 
 # this test requires the ext4 kernel support crc feature on scratch device
diff --git a/common/populate b/common/populate
index e6804cbc6114ba..32dc5275e2debd 100644
--- a/common/populate
+++ b/common/populate
@@ -1034,20 +1034,12 @@ _scratch_populate_restore_cached() {
 		return $?
 		;;
 	"ext2"|"ext3"|"ext4")
-		_ext4_mdrestore "${metadump}" "${SCRATCH_DEV}"
-		ret=$?
-		test $ret -ne 0 && return $ret
+		local logdev=none
+		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+			logdev=$SCRATCH_LOGDEV
 
-		# ext4 cannot e2image external logs, so we have to reformat
-		# the scratch device to match the restored fs
-		if [ -n "${SCRATCH_LOGDEV}" ]; then
-			local fsuuid="$($DUMPE2FS_PROG -h "${SCRATCH_DEV}" 2>/dev/null | \
-					grep 'Journal UUID:' | \
-					sed -e 's/Journal UUID:[[:space:]]*//g')"
-			$MKFS_EXT4_PROG -O journal_dev "${SCRATCH_LOGDEV}" \
-					-F -U "${fsuuid}"
-		fi
-		return 0
+		_ext4_mdrestore "${metadump}" "${SCRATCH_DEV}" "${logdev}"
+		return $?
 		;;
 	esac
 	return 1


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

* [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (4 preceding siblings ...)
  2025-02-19  0:58   ` [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations Darrick J. Wong
@ 2025-02-19  0:59   ` Darrick J. Wong
  2025-02-19  7:14     ` Christoph Hellwig
  2025-02-19  0:59   ` [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units Darrick J. Wong
                     ` (8 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:59 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

When we're snapshotting filesystem metadata after creating a populated
filesystem, force the creation of metadump v2 files by default to
exercise the new format, since xfs_metadump continues to use the v1
format unless told otherwise.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)


diff --git a/common/populate b/common/populate
index 32dc5275e2debd..9fc1ee32bd490d 100644
--- a/common/populate
+++ b/common/populate
@@ -55,7 +55,12 @@ __populate_fail() {
 	case "$FSTYP" in
 	xfs)
 		_scratch_unmount
-		_scratch_xfs_metadump "$metadump" -a -o
+
+		mdargs=('-a' '-o')
+		test "$(_xfs_metadump_max_version)" -gt 1 && \
+			mdargs+=('-v' '2')
+
+		_scratch_xfs_metadump "$metadump" "${mdargs[@]}"
 		;;
 	ext4)
 		_scratch_unmount
@@ -1056,8 +1061,12 @@ _scratch_populate_save_metadump()
 		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
 			logdev=$SCRATCH_LOGDEV
 
+		mdargs=('-a' '-o')
+		test "$(_xfs_metadump_max_version)" -gt 1 && \
+			mdargs+=('-v' '2')
+
 		_xfs_metadump "$metadump_file" "$SCRATCH_DEV" "$logdev" \
-				compress -a -o
+				compress "${mdargs[@]}"
 		res=$?
 		;;
 	"ext2"|"ext3"|"ext4")


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

* [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (5 preceding siblings ...)
  2025-02-19  0:59   ` [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots Darrick J. Wong
@ 2025-02-19  0:59   ` Darrick J. Wong
  2025-02-19  7:14     ` Christoph Hellwig
  2025-02-19  0:59   ` [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature Darrick J. Wong
                     ` (7 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:59 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

For files on the XFS realtime volume, it's possible that the file
allocation unit (aka the minimum size we have to punch to deallocate
file blocks) could be greater than a single fs block.  This utility
assumed that it's always possible to punch a single fs block, but for
these types of files, all that does is zeroes the page cache.  While
that's what most *user applications* want, fstests uses punching to
fragment file mapping metadata and/or fragment free space, so adapt this
test for that purpose by detecting realtime files.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 src/punch-alternating.c |   28 +++++++++++++++++++++++++++-
 tests/xfs/114           |    4 ++++
 tests/xfs/146           |    2 +-
 tests/xfs/187           |    3 ++-
 tests/xfs/341           |    4 ++--
 5 files changed, 36 insertions(+), 5 deletions(-)


diff --git a/src/punch-alternating.c b/src/punch-alternating.c
index 18dd215197db2b..d2bb4b6a2276c9 100644
--- a/src/punch-alternating.c
+++ b/src/punch-alternating.c
@@ -20,6 +20,28 @@ void usage(char *cmd)
 	exit(1);
 }
 
+/* Compute the file allocation unit size for an XFS file. */
+static int detect_xfs_alloc_unit(int fd)
+{
+	struct fsxattr fsx;
+	struct xfs_fsop_geom fsgeom;
+	int ret;
+
+	ret = ioctl(fd, XFS_IOC_FSGEOMETRY, &fsgeom);
+	if (ret)
+		return -1;
+
+	ret = ioctl(fd, XFS_IOC_FSGETXATTR, &fsx);
+	if (ret)
+		return -1;
+
+	ret = fsgeom.blocksize;
+	if (fsx.fsx_xflags & XFS_XFLAG_REALTIME)
+		ret *= fsgeom.rtextsize;
+
+	return ret;
+}
+
 int main(int argc, char *argv[])
 {
 	struct stat	s;
@@ -82,7 +104,11 @@ int main(int argc, char *argv[])
 		goto err;
 
 	sz = s.st_size;
-	blksz = sf.f_bsize;
+	c = detect_xfs_alloc_unit(fd);
+	if (c > 0)
+		blksz = c;
+	else
+		blksz = sf.f_bsize;
 
 	mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE;
 	for (offset = start_offset * blksz;
diff --git a/tests/xfs/114 b/tests/xfs/114
index 510d31a4028598..f764cad73babb7 100755
--- a/tests/xfs/114
+++ b/tests/xfs/114
@@ -47,6 +47,10 @@ $XFS_IO_PROG -f \
 	-c "pwrite -S 0x68 -b 1048576 0 $len2" \
 	$SCRATCH_MNT/f2 >> $seqres.full
 
+# The arguments to punch-alternating must be specified in units of file
+# allocation units, so we divide the argument by $file_blksz.  We already
+# verified that $blksz is congruent with $file_blksz, so the fpunch parameters
+# will always align with the file allocation unit.
 $here/src/punch-alternating -o $((16 * blksz / file_blksz)) \
 	-s $((blksz / file_blksz)) \
 	-i $((blksz * 2 / file_blksz)) \
diff --git a/tests/xfs/146 b/tests/xfs/146
index b6f4c2bd093d45..1cd7076d2426ee 100755
--- a/tests/xfs/146
+++ b/tests/xfs/146
@@ -67,7 +67,7 @@ _xfs_force_bdev realtime $SCRATCH_MNT
 # Allocate some stuff at the start, to force the first falloc of the ouch file
 # to happen somewhere in the middle of the rt volume
 $XFS_IO_PROG -f -c 'falloc 0 64m' "$SCRATCH_MNT/b"
-$here/src/punch-alternating -i $((rextblks * 2)) -s $((rextblks)) "$SCRATCH_MNT/b"
+$here/src/punch-alternating "$SCRATCH_MNT/b"
 
 avail="$(df -P "$SCRATCH_MNT" | awk 'END {print $4}')"1
 toobig="$((avail * 2))"
diff --git a/tests/xfs/187 b/tests/xfs/187
index 56a9adc164eab2..1d32d702f629c9 100755
--- a/tests/xfs/187
+++ b/tests/xfs/187
@@ -130,7 +130,8 @@ $XFS_IO_PROG -f -c "truncate $required_sz" -c "falloc 0 $remap_sz" $SCRATCH_MNT/
 # Punch out every other extent of the last two sections, to fragment free space.
 frag_sz=$((remap_sz * 3))
 punch_off=$((bigfile_sz - frag_sz))
-$here/src/punch-alternating $SCRATCH_MNT/bigfile -o $((punch_off / fsbsize)) -i $((rtextsize_blks * 2)) -s $rtextsize_blks
+rtextsize_bytes=$((fsbsize * rtextsize_blks))
+$here/src/punch-alternating $SCRATCH_MNT/bigfile -o $((punch_off / rtextsize_bytes))
 
 # Make sure we have some free rtextents.
 free_rtx=$(_xfs_statfs_field "$SCRATCH_MNT" statfs.f_bavail)
diff --git a/tests/xfs/341 b/tests/xfs/341
index 6e25549b2b3d08..9b12febf8d5c49 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -41,8 +41,8 @@ len=$((blocks * rtextsz))
 echo "Create some files"
 $XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
 $XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-$here/src/punch-alternating -i $((2 * rtextsz_blks)) -s $rtextsz_blks $SCRATCH_MNT/f1 >> "$seqres.full"
-$here/src/punch-alternating -i $((2 * rtextsz_blks)) -s $rtextsz_blks $SCRATCH_MNT/f2 >> "$seqres.full"
+$here/src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+$here/src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
 echo garbage > $SCRATCH_MNT/f3
 ino=$(stat -c '%i' $SCRATCH_MNT/f3)
 _scratch_unmount


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

* [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (6 preceding siblings ...)
  2025-02-19  0:59   ` [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units Darrick J. Wong
@ 2025-02-19  0:59   ` Darrick J. Wong
  2025-02-19  7:15     ` Christoph Hellwig
  2025-02-19  0:59   ` [PATCH 09/15] common: pass the realtime device to xfs_db when possible Darrick J. Wong
                     ` (6 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:59 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Filter out the new mkfs lines that show the rtgroup information, since
this test is heavily dependent on old mkfs output.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/206 |    1 +
 1 file changed, 1 insertion(+)


diff --git a/tests/xfs/206 b/tests/xfs/206
index ef5f4868e9bdca..01531e1f08c37e 100755
--- a/tests/xfs/206
+++ b/tests/xfs/206
@@ -65,6 +65,7 @@ mkfs_filter()
 	    -e "/exchange=/d" \
 	    -e '/metadir=.*/d' \
 	    -e 's/, parent=[01]//' \
+	    -e '/rgcount=/d' \
 	    -e "/^Default configuration/d"
 }
 


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

* [PATCH 09/15] common: pass the realtime device to xfs_db when possible
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (7 preceding siblings ...)
  2025-02-19  0:59   ` [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature Darrick J. Wong
@ 2025-02-19  0:59   ` Darrick J. Wong
  2025-02-19  7:15     ` Christoph Hellwig
  2025-02-19  1:00   ` [PATCH 10/15] xfs/185: update for rtgroups Darrick J. Wong
                     ` (5 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  0:59 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Teach xfstests to pass the realtime device to xfs_db when it supports
that option.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs |    4 ++++
 1 file changed, 4 insertions(+)


diff --git a/common/xfs b/common/xfs
index c8f2ea241a2a41..547e91167718e9 100644
--- a/common/xfs
+++ b/common/xfs
@@ -308,6 +308,10 @@ _scratch_xfs_db_options()
 	SCRATCH_OPTIONS=""
 	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
 		SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+	if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_RTDEV" ]; then
+		$XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev' && \
+			SCRATCH_OPTIONS="$SCRATCH_OPTIONS -R$SCRATCH_RTDEV"
+	fi
 	echo $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 


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

* [PATCH 10/15] xfs/185: update for rtgroups
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (8 preceding siblings ...)
  2025-02-19  0:59   ` [PATCH 09/15] common: pass the realtime device to xfs_db when possible Darrick J. Wong
@ 2025-02-19  1:00   ` Darrick J. Wong
  2025-02-19  7:16     ` Christoph Hellwig
  2025-02-19  1:00   ` [PATCH 11/15] xfs/449: update test to know about xfs_db -R Darrick J. Wong
                     ` (4 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:00 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

This old test is a bit too fixated on exact rt allocator behavior.  With
rtgroups enabled, we can end up with one large contiguous region that's
split into multiple bmbt mappings to avoid crossing rtgroup boundaries.
The realtime superblock throws another twist into the mix because the
first rtx will always be in use, which can shift the start of the
physical space mappings by up to 1 rtx.

Also fix a bug where we'd try to fallocate the total number of rtx,
whereas we should be asking for the number of free rtx to avoid ENOSPC
errors.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/185 |   65 ++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 50 insertions(+), 15 deletions(-)


diff --git a/tests/xfs/185 b/tests/xfs/185
index f3601a5292ef0b..7aceb383ce4609 100755
--- a/tests/xfs/185
+++ b/tests/xfs/185
@@ -97,10 +97,17 @@ test "$ddbytes" -lt "$((rtbytes + (10 * rtextsize) ))" || \
 # higher than the size of the data device.  For realtime files this is really
 # easy because fallocate for the first rt file always starts allocating at
 # physical offset zero.
-alloc_rtx="$((rtbytes / rtextsize))"
+rtfreebytes="$(stat -f -c '%S * %a' $rtfile | bc)"
+alloc_rtx="$((rtfreebytes / rtextsize))"
 $XFS_IO_PROG -c "falloc 0 $((alloc_rtx * rtextsize))" $rtfile
 
-expected_end="$(( (alloc_rtx * rtextsize - 1) / 512 ))"
+# log a bunch of geometry data to the full file for debugging
+echo "rtbytes $rtbytes rtfreebytes $rtfreebytes rtextsize $rtextsize" >> $seqres.full
+echo "allocrtx $alloc_rtx falloc $((alloc_rtx * rtextsize))" >> $seqres.full
+$XFS_IO_PROG -c statfs $SCRATCH_MNT >> $seqres.full
+
+total_rtx=$(_xfs_statfs_field $SCRATCH_MNT geom.rtextents)
+expected_end="$(( (total_rtx * rtextsize - 1) / 512 ))"
 
 # Print extent mapping of rtfile in format:
 # file_offset file_end physical_offset physical_end
@@ -113,13 +120,28 @@ rtfile_exts() {
 		done
 }
 
-# Make sure that we actually got the entire device.
-rtfile_exts | $AWK_PROG -v end=$expected_end '
+# Make sure that fallocate actually managed to map the entire rt device.  The
+# realtime superblock may consume the first rtx, so we allow for that here.
+# Allow for multiple contiguous mappings if the rtgroups are very small.
+allowed_start=$((rtextsize / 512))
+rtfile_exts | $AWK_PROG -v exp_start=$allowed_start -v exp_end=$expected_end '
+BEGIN {
+	start = -1;
+	end = -1;
+}
 {
-	if ($3 != 0)
-		printf("%s: unexpected physical offset %s, wanted 0\n", $0, $3);
-	if ($4 != end)
-		printf("%s: unexpected physical end %s, wanted %d\n", $0, $4, end);
+	if (end >= 0 && ($3 != end + 1))
+		printf("%s: non-contiguous allocation should have started at %s\n", $0, end + 1);
+	if (start < 0 || $3 < start)
+		start = $3;
+	if (end < 0 || $4 > end)
+		end = $4;
+}
+END {
+	if (start > exp_start)
+		printf("%s: unexpected physical offset %d, wanted <= %d\n", $0, start, exp_start);
+	if (end != exp_end)
+		printf("%s: unexpected physical end %d, wanted %d\n", $0, end, exp_end);
 }'
 
 # Now punch out a range that is slightly larger than the size of the data
@@ -132,14 +154,27 @@ expected_offset="$((punch_rtx * rtextsize / 512))"
 
 echo "rtfile should have physical extent from $expected_offset to $expected_end sectors" >> $seqres.full
 
-# Make sure that the realtime file now has only one extent at the end of the
-# realtime device
-rtfile_exts | $AWK_PROG -v offset=$expected_offset -v end=$expected_end '
+# Make sure that the realtime file now maps one large extent at the end of the
+# realtime device.  Due to rtgroups boundary rules, there may be multiple
+# contiguous mappings.
+rtfile_exts | $AWK_PROG -v exp_start=$expected_offset -v exp_end=$expected_end '
+BEGIN {
+	start = -1;
+	end = -1;
+}
 {
-	if ($3 != offset)
-		printf("%s: unexpected physical offset %s, wanted %d\n", $0, $3, offset);
-	if ($4 != end)
-		printf("%s: unexpected physical end %s, wanted %d\n", $0, $4, end);
+	if (end >= 0 && ($3 != end + 1))
+		printf("%s: non-contiguous allocation should have started at %s\n", $0, end + 1);
+	if (start < 0 || $3 < start)
+		start = $3;
+	if (end < 0 || $4 > end)
+		end = $4;
+}
+END {
+	if (start < exp_start)
+		printf("%s: unexpected physical offset %d, wanted >= %d\n", $0, start, exp_start);
+	if (end != exp_end)
+		printf("%s: unexpected physical end %d, wanted %d\n", $0, end, exp_end);
 }'
 
 $XFS_IO_PROG -c 'bmap -elpv' $rtfile >> $seqres.full


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

* [PATCH 11/15] xfs/449: update test to know about xfs_db -R
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (9 preceding siblings ...)
  2025-02-19  1:00   ` [PATCH 10/15] xfs/185: update for rtgroups Darrick J. Wong
@ 2025-02-19  1:00   ` Darrick J. Wong
  2025-02-19  7:16     ` Christoph Hellwig
  2025-02-19  1:00   ` [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands Darrick J. Wong
                     ` (3 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:00 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The realtime groups feature added a -R flag to xfs_db so that users can
pass in the realtime device.  Since we've now modified the
_scratch_xfs_db to use this facility, we can update the test to do exact
comparisons of the xfs_db info command against the mkfs output.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/449 |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


diff --git a/tests/xfs/449 b/tests/xfs/449
index 3d528e03a483fb..a739df50e319c5 100755
--- a/tests/xfs/449
+++ b/tests/xfs/449
@@ -30,7 +30,11 @@ echo DB >> $seqres.full
 cat $tmp.dbinfo >> $seqres.full
 # xfs_db doesn't take a rtdev argument, so it reports "realtime=external".
 # mkfs does, so make a quick substitution
-diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external               extsz=/g') $tmp.dbinfo
+if $XFS_DB_PROG --help 2>&1 | grep -q -- '-R rtdev'; then
+	diff -u $tmp.mkfs $tmp.dbinfo
+else
+	diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external               extsz=/g') $tmp.dbinfo
+fi
 
 _scratch_mount
 


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

* [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (10 preceding siblings ...)
  2025-02-19  1:00   ` [PATCH 11/15] xfs/449: update test to know about xfs_db -R Darrick J. Wong
@ 2025-02-19  1:00   ` Darrick J. Wong
  2025-02-19  7:17     ` Christoph Hellwig
  2025-02-19  1:01   ` [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore Darrick J. Wong
                     ` (2 subsequent siblings)
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:00 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Fix these tests to deal with the xfs_io bmap and fsmap commands printing
out realtime group numbers if the feature is enabled.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs    |    7 +++++++
 tests/xfs/271 |    4 +++-
 tests/xfs/556 |   16 ++++++++++------
 3 files changed, 20 insertions(+), 7 deletions(-)


diff --git a/common/xfs b/common/xfs
index 547e91167718e9..5a829637dc1cfb 100644
--- a/common/xfs
+++ b/common/xfs
@@ -419,6 +419,13 @@ _xfs_has_feature()
 		feat="rtextents"
 		feat_regex="[1-9][0-9]*"
 		;;
+	"rtgroups")
+		# any fs with rtgroups enabled will have a nonzero rt group
+		# size, even if there is no rt device (and hence zero actual
+		# groups)
+		feat="rgsize"
+		feat_regex="[1-9][0-9]*"
+		;;
 	esac
 
 	local answer="$($XFS_INFO_PROG "$fs" 2>&1 | grep -E -w -c "$feat=$feat_regex")"
diff --git a/tests/xfs/271 b/tests/xfs/271
index 420f4e7479220a..8a71746d6eaede 100755
--- a/tests/xfs/271
+++ b/tests/xfs/271
@@ -29,6 +29,8 @@ _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 
 agcount=$(_xfs_mount_agcount $SCRATCH_MNT)
+agcount_wiggle=0
+_xfs_has_feature $SCRATCH_MNT rtgroups && agcount_wiggle=1
 
 # mkfs lays out btree root blocks in the order bnobt, cntbt, inobt, finobt,
 # rmapbt, refcountbt, and then allocates AGFL blocks.  Since GETFSMAP has the
@@ -46,7 +48,7 @@ cat $TEST_DIR/fsmap >> $seqres.full
 
 echo "Check AG header" | tee -a $seqres.full
 grep 'static fs metadata[[:space:]]*[0-9]*[[:space:]]*(0\.\.' $TEST_DIR/fsmap | tee -a $seqres.full > $TEST_DIR/testout
-_within_tolerance "AG header count" $(wc -l < $TEST_DIR/testout) $agcount 0 -v
+_within_tolerance "AG header count" $(wc -l < $TEST_DIR/testout) $agcount $agcount_wiggle -v
 
 echo "Check freesp/rmap btrees" | tee -a $seqres.full
 grep 'per-AG metadata[[:space:]]*[0-9]*[[:space:]]*([0-9]*\.\.' $TEST_DIR/fsmap | tee -a $seqres.full > $TEST_DIR/testout
diff --git a/tests/xfs/556 b/tests/xfs/556
index 79e03caf40a0a5..83d5022e700c8b 100755
--- a/tests/xfs/556
+++ b/tests/xfs/556
@@ -45,16 +45,20 @@ victim=$SCRATCH_MNT/a
 file_blksz=$(_get_file_block_size $SCRATCH_MNT)
 $XFS_IO_PROG -f -c "pwrite -S 0x58 0 $((4 * file_blksz))" -c "fsync" $victim >> $seqres.full
 unset errordev
-_xfs_is_realtime_file $victim && errordev="RT"
+
+awk_len_prog='{print $6}'
+if _xfs_is_realtime_file $victim; then
+	if ! _xfs_has_feature $SCRATCH_MNT rtgroups; then
+		awk_len_prog='{print $4}'
+	fi
+	errordev="RT"
+fi
 bmap_str="$($XFS_IO_PROG -c "bmap -elpv" $victim | grep "^[[:space:]]*0:")"
 echo "$errordev:$bmap_str" >> $seqres.full
 
 phys="$(echo "$bmap_str" | $AWK_PROG '{print $3}')"
-if [ "$errordev" = "RT" ]; then
-	len="$(echo "$bmap_str" | $AWK_PROG '{print $4}')"
-else
-	len="$(echo "$bmap_str" | $AWK_PROG '{print $6}')"
-fi
+len="$(echo "$bmap_str" | $AWK_PROG "$awk_len_prog")"
+
 fs_blksz=$(_get_block_size $SCRATCH_MNT)
 echo "file_blksz:$file_blksz:fs_blksz:$fs_blksz" >> $seqres.full
 kernel_sectors_per_fs_block=$((fs_blksz / 512))


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

* [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (11 preceding siblings ...)
  2025-02-19  1:00   ` [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands Darrick J. Wong
@ 2025-02-19  1:01   ` Darrick J. Wong
  2025-02-19  7:17     ` Christoph Hellwig
  2025-02-19  1:01   ` [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups Darrick J. Wong
  2025-02-19  1:01   ` [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files Darrick J. Wong
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:01 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

If xfs_metadump supports the -r switch to capture the contents of
realtime devices and there is a realtime device, add the option to the
command line to enable preservation.

Similarly, if the dump file could restore to an external scratch rtdev,
pass the -r option to mdrestore so that we can restore rtdev contents.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/metadump |   22 ++++++++++++++++++----
 common/populate |    6 +++++-
 common/xfs      |   48 ++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 63 insertions(+), 13 deletions(-)


diff --git a/common/metadump b/common/metadump
index a4ec9a7f921acf..61ba3cbb91647c 100644
--- a/common/metadump
+++ b/common/metadump
@@ -27,6 +27,7 @@ _xfs_cleanup_verify_metadump()
 	if [ -n "$XFS_METADUMP_IMG" ]; then
 		[ -b "$METADUMP_DATA_LOOP_DEV" ] && _destroy_loop_device $METADUMP_DATA_LOOP_DEV
 		[ -b "$METADUMP_LOG_LOOP_DEV" ] && _destroy_loop_device $METADUMP_LOG_LOOP_DEV
+		[ -b "$METADUMP_RT_LOOP_DEV" ] && _destroy_loop_device $METADUMP_RT_LOOP_DEV
 		for img in "$XFS_METADUMP_IMG"*; do
 			test -e "$img" && rm -f "$img"
 		done
@@ -101,6 +102,7 @@ _xfs_verify_metadump_v2()
 	local version="-v 2"
 	local data_img="$XFS_METADUMP_IMG.data"
 	local log_img=""
+	local rt_img=""
 
 	# Capture metadump, which creates metadump_file
 	_scratch_xfs_metadump $metadump_file $metadump_args $version
@@ -111,8 +113,12 @@ _xfs_verify_metadump_v2()
 	# from such a metadump file.
 	test -n "$SCRATCH_LOGDEV" && log_img="$XFS_METADUMP_IMG.log"
 
+	# Use a temporary file to hold restored rt device contents
+	test -n "$SCRATCH_RTDEV" && _xfs_metadump_supports_rt && \
+		rt_img="$XFS_METADUMP_IMG.rt"
+
 	# Restore metadump, which creates data_img and log_img
-	SCRATCH_DEV=$data_img SCRATCH_LOGDEV=$log_img \
+	SCRATCH_DEV=$data_img SCRATCH_LOGDEV=$log_img SCRATCH_RTDEV=$rt_img \
 		_scratch_xfs_mdrestore $metadump_file
 
 	# Create loopdev for data device so we can mount the fs
@@ -121,12 +127,15 @@ _xfs_verify_metadump_v2()
 	# Create loopdev for log device if we recovered anything
 	test -s "$log_img" && METADUMP_LOG_LOOP_DEV=$(_create_loop_device $log_img)
 
+	# Create loopdev for rt device if we recovered anything
+	test -s "$rt_img" && METADUMP_RT_LOOP_DEV=$(_create_loop_device $rt_img)
+
 	# Mount fs, run an extra test, fsck, and unmount
-	SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV _scratch_mount
+	SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV SCRATCH_RTDEV=$METADUMP_RT_LOOP_DEV _scratch_mount
 	if [ -n "$extra_test" ]; then
-		SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV $extra_test
+		SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV SCRATCH_RTDEV=$METADUMP_RT_LOOP_DEV $extra_test
 	fi
-	SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV _check_xfs_scratch_fs
+	SCRATCH_DEV=$METADUMP_DATA_LOOP_DEV SCRATCH_LOGDEV=$METADUMP_LOG_LOOP_DEV SCRATCH_RTDEV=$METADUMP_RT_LOOP_DEV _check_xfs_scratch_fs
 	_unmount $METADUMP_DATA_LOOP_DEV
 
 	# Tear down what we created
@@ -135,6 +144,11 @@ _xfs_verify_metadump_v2()
 		unset METADUMP_LOG_LOOP_DEV
 		rm -f $log_img
 	fi
+	if [ -b "$METADUMP_RT_LOOP_DEV" ]; then
+		_destroy_loop_device $METADUMP_RT_LOOP_DEV
+		unset METADUMP_RT_LOOP_DEV
+		rm -f $rt_img
+	fi
 	_destroy_loop_device $METADUMP_DATA_LOOP_DEV
 	unset METADUMP_DATA_LOOP_DEV
 	rm -f $data_img
diff --git a/common/populate b/common/populate
index 9fc1ee32bd490d..a77d1b0f5f3873 100644
--- a/common/populate
+++ b/common/populate
@@ -1061,12 +1061,16 @@ _scratch_populate_save_metadump()
 		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
 			logdev=$SCRATCH_LOGDEV
 
+		local rtdev=none
+		[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+			rtdev=$SCRATCH_RTDEV
+
 		mdargs=('-a' '-o')
 		test "$(_xfs_metadump_max_version)" -gt 1 && \
 			mdargs+=('-v' '2')
 
 		_xfs_metadump "$metadump_file" "$SCRATCH_DEV" "$logdev" \
-				compress "${mdargs[@]}"
+				"$rtdev" compress "${mdargs[@]}"
 		res=$?
 		;;
 	"ext2"|"ext3"|"ext4")
diff --git a/common/xfs b/common/xfs
index 5a829637dc1cfb..a94b9de032f932 100644
--- a/common/xfs
+++ b/common/xfs
@@ -625,14 +625,19 @@ _xfs_metadump() {
 	local metadump="$1"
 	local device="$2"
 	local logdev="$3"
-	local compressopt="$4"
-	shift; shift; shift; shift
+	local rtdev="$4"
+	local compressopt="$5"
+	shift; shift; shift; shift; shift
 	local options="$@"
 
 	if [ "$logdev" != "none" ]; then
 		options="$options -l $logdev"
 	fi
 
+	if [ "$rtdev" != "none" ] && _xfs_metadump_supports_rt; then
+		options="$options -r $rtdev"
+	fi
+
 	$XFS_METADUMP_PROG $options "$device" "$metadump"
 	res=$?
 	[ "$compressopt" = "compress" ] && [ -n "$DUMP_COMPRESSOR" ] &&
@@ -656,7 +661,8 @@ _xfs_mdrestore() {
 	local metadump="$1"
 	local device="$2"
 	local logdev="$3"
-	shift; shift; shift
+	local rtdev="$4"
+	shift; shift; shift; shift
 	local options="$@"
 	local dumpfile_ver
 
@@ -684,6 +690,18 @@ _xfs_mdrestore() {
 		options="$options -l $logdev"
 	fi
 
+	if [ "$rtdev" != "none" ] && [[ $dumpfile_ver > 1 ]] && _xfs_metadump_supports_rt; then
+		# metadump and mdrestore capture and restore metadata on the
+		# realtime volume by turning on metadump v2 format.  This is
+		# only done if the realtime volume contains metadata such as
+		# rtgroup superblocks.  The -r option to mdrestore wasn't added
+		# until the creation of rtgroups.
+		#
+		# Hence it only makes sense to specify -r here if the dump file
+		# itself is in v2 format.
+		options="$options -r $rtdev"
+	fi
+
 	$XFS_MDRESTORE_PROG $options "${metadump}" "${device}"
 }
 
@@ -697,17 +715,27 @@ _xfs_metadump_max_version()
 	fi
 }
 
+# Do xfs_metadump/mdrestore support the -r switch for realtime devices?
+_xfs_metadump_supports_rt()
+{
+	$XFS_METADUMP_PROG --help 2>&1 | grep -q -- '-r rtdev'
+}
+
 # Snapshot the metadata on the scratch device
 _scratch_xfs_metadump()
 {
 	local metadump=$1
 	shift
 	local logdev=none
+	local rtdev=none
 
 	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
 		logdev=$SCRATCH_LOGDEV
 
-	_xfs_metadump "$metadump" "$SCRATCH_DEV" "$logdev" nocompress "$@"
+	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+		rtdev=$SCRATCH_RTDEV
+
+	_xfs_metadump "$metadump" "$SCRATCH_DEV" "$logdev" "$rtdev" nocompress "$@"
 }
 
 # Restore snapshotted metadata on the scratch device
@@ -716,6 +744,7 @@ _scratch_xfs_mdrestore()
 	local metadump=$1
 	shift
 	local logdev=none
+	local rtdev=none
 	local options="$@"
 
 	# $SCRATCH_LOGDEV should have a non-zero length value only when all of
@@ -726,7 +755,10 @@ _scratch_xfs_mdrestore()
 		logdev=$SCRATCH_LOGDEV
 	fi
 
-	_xfs_mdrestore "$metadump" "$SCRATCH_DEV" "$logdev" "$@"
+	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+		rtdev=$SCRATCH_RTDEV
+
+	_xfs_mdrestore "$metadump" "$SCRATCH_DEV" "$logdev" "$rtdev" "$@"
 }
 
 # Do not use xfs_repair (offline fsck) to rebuild the filesystem
@@ -847,7 +879,7 @@ _check_xfs_filesystem()
 	if [ "$ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
 		local flatdev="$(basename "$device")"
 		_xfs_metadump "$seqres.$flatdev.check.md" "$device" "$logdev" \
-			compress -a -o >> $seqres.full
+			"$rtdev" compress -a -o >> $seqres.full
 	fi
 
 	# Optionally test the index rebuilding behavior.
@@ -880,7 +912,7 @@ _check_xfs_filesystem()
 		if [ "$rebuild_ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
 			local flatdev="$(basename "$device")"
 			_xfs_metadump "$seqres.$flatdev.rebuild.md" "$device" \
-				"$logdev" compress -a -o >> $seqres.full
+				"$logdev" "$rtdev" compress -a -o >> $seqres.full
 		fi
 	fi
 
@@ -964,7 +996,7 @@ _check_xfs_filesystem()
 		if [ "$orebuild_ok" -ne 1 ] && [ "$DUMP_CORRUPT_FS" = "1" ]; then
 			local flatdev="$(basename "$device")"
 			_xfs_metadump "$seqres.$flatdev.orebuild.md" "$device" \
-				"$logdev" compress -a -o >> $seqres.full
+				"$logdev" "$rtdev" compress -a -o >> $seqres.full
 		fi
 	fi
 


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

* [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (12 preceding siblings ...)
  2025-02-19  1:01   ` [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore Darrick J. Wong
@ 2025-02-19  1:01   ` Darrick J. Wong
  2025-02-19  7:17     ` Christoph Hellwig
  2025-02-19  1:01   ` [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files Darrick J. Wong
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:01 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Adapt the scrub stress testing framework to support checking realtime
group metadata.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/fuzzy  |   27 ++++++++++++++++++++++-----
 common/xfs    |    9 +++++++++
 tests/xfs/581 |    2 +-
 tests/xfs/720 |    2 +-
 tests/xfs/795 |    2 +-
 5 files changed, 34 insertions(+), 8 deletions(-)


diff --git a/common/fuzzy b/common/fuzzy
index 1548f372fac58a..a57b076ef9670a 100644
--- a/common/fuzzy
+++ b/common/fuzzy
@@ -829,8 +829,10 @@ __stress_one_scrub_loop() {
 	local scrub_tgt="$3"
 	local scrub_startat="$4"
 	local start_agno="$5"
-	shift; shift; shift; shift; shift
+	local start_rgno="$6"
+	shift; shift; shift; shift; shift; shift
 	local agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
+	local rgcount="$(_xfs_mount_rgcount $SCRATCH_MNT)"
 
 	local xfs_io_args=()
 	for arg in "$@"; do
@@ -843,6 +845,12 @@ __stress_one_scrub_loop() {
 				local ag_arg="$(echo "$arg" | sed -e "s|%agno%|$agno|g")"
 				xfs_io_args+=('-c' "$ag_arg")
 			done
+		elif echo "$arg" | grep -q -w '%rgno%'; then
+			# Substitute the rtgroup number
+			for ((rgno = start_rgno; rgno < rgcount; rgno++)); do
+				local rg_arg="$(echo "$arg" | sed -e "s|%rgno%|$rgno|g")"
+				xfs_io_args+=('-c' "$rg_arg")
+			done
 		else
 			xfs_io_args+=('-c' "$arg")
 		fi
@@ -1298,7 +1306,9 @@ _scratch_xfs_stress_scrub_cleanup() {
 __stress_scrub_check_commands() {
 	local scrub_tgt="$1"
 	local start_agno="$2"
-	shift; shift
+	local start_rgno="$3"
+	shift; shift; shift
+	local rgcount="$(_xfs_mount_rgcount $SCRATCH_MNT)"
 
 	local cooked_tgt="$scrub_tgt"
 	case "$scrub_tgt" in
@@ -1328,6 +1338,10 @@ __stress_scrub_check_commands() {
 			cooked_arg="$(echo "$cooked_arg" | sed -e 's/^repair/repair -R/g')"
 		fi
 		cooked_arg="$(echo "$cooked_arg" | sed -e "s/%agno%/$start_agno/g")"
+		if echo "$cooked_arg" | grep -q -w '%rgno%'; then
+			test "$rgcount" -eq 0 && continue
+			cooked_arg="$(echo "$cooked_arg" | sed -e "s/%rgno%/$start_rgno/g")"
+		fi
 		testio=`$XFS_IO_PROG -x -c "$cooked_arg" "$cooked_tgt" 2>&1`
 		echo $testio | grep -q "Unknown type" && \
 			_notrun "xfs_io scrub subcommand support is missing"
@@ -1353,6 +1367,7 @@ __stress_scrub_check_commands() {
 #	in a separate loop.  If zero -i options are specified, do not run.
 #	Callers must check each of these commands (via _require_xfs_io_command)
 #	before calling here.
+# -R	For %rgno% substitution, start with this rtgroup instead of rtgroup 0.
 # -r	Run fsstress for this amount of time, then remount the fs ro or rw.
 #	The default is to run fsstress continuously with no remount, unless
 #	XFS_SCRUB_STRESS_REMOUNT_PERIOD is set.
@@ -1399,6 +1414,7 @@ _scratch_xfs_stress_scrub() {
 	local remount_period="${XFS_SCRUB_STRESS_REMOUNT_PERIOD}"
 	local stress_tgt="${XFS_SCRUB_STRESS_TARGET:-default}"
 	local start_agno=0
+	local start_rgno=0
 
 	__SCRUB_STRESS_FREEZE_PID=""
 	__SCRUB_STRESS_REMOUNT_LOOP=""
@@ -1406,12 +1422,13 @@ _scratch_xfs_stress_scrub() {
 	touch "$runningfile"
 
 	OPTIND=1
-	while getopts "a:fi:r:s:S:t:w:x:X:" c; do
+	while getopts "a:fi:r:R:s:S:t:w:x:X:" c; do
 		case "$c" in
 			a) start_agno="$OPTARG";;
 			f) freeze=yes;;
 			i) io_args+=("$OPTARG");;
 			r) remount_period="$OPTARG";;
+			R) start_rgno="$OPTARG";;
 			s) one_scrub_args+=("$OPTARG");;
 			S) xfs_scrub_args+=("$OPTARG");;
 			t) scrub_tgt="$OPTARG";;
@@ -1422,7 +1439,7 @@ _scratch_xfs_stress_scrub() {
 		esac
 	done
 
-	__stress_scrub_check_commands "$scrub_tgt" "$start_agno" \
+	__stress_scrub_check_commands "$scrub_tgt" "$start_agno" "$start_rgno" \
 			"${one_scrub_args[@]}"
 
 	if ! command -v "__stress_scrub_${exerciser}_loop" &>/dev/null; then
@@ -1483,7 +1500,7 @@ _scratch_xfs_stress_scrub() {
 
 	if [ "${#one_scrub_args[@]}" -gt 0 ]; then
 		__stress_one_scrub_loop "$end" "$runningfile" "$scrub_tgt" \
-				"$scrub_startat" "$start_agno" \
+				"$scrub_startat" "$start_agno" "$start_rgno" \
 				"${one_scrub_args[@]}" &
 	fi
 
diff --git a/common/xfs b/common/xfs
index a94b9de032f932..1e415a4eb3ed68 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1490,6 +1490,15 @@ _xfs_mount_agcount()
 	$XFS_INFO_PROG "$1" | sed -n "s/^.*agcount=\([[:digit:]]*\).*/\1/p"
 }
 
+# Find rtgroup count of mounted filesystem
+_xfs_mount_rgcount()
+{
+	local rtgroups="$($XFS_INFO_PROG "$1" | grep rgcount= | sed -e 's/^.*rgcount=\([0-9]*\).*$/\1/g')"
+
+	test -z "$rtgroups" && rtgroups=0
+	echo "$rtgroups"
+}
+
 # Wipe the superblock of each XFS AGs
 _try_wipe_scratch_xfs()
 {
diff --git a/tests/xfs/581 b/tests/xfs/581
index 39eb42da4b10c5..6aa360b37b90c5 100755
--- a/tests/xfs/581
+++ b/tests/xfs/581
@@ -30,7 +30,7 @@ _require_xfs_stress_scrub
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 _require_xfs_has_feature "$SCRATCH_MNT" realtime
-_scratch_xfs_stress_scrub -s "scrub rtbitmap"
+_scratch_xfs_stress_scrub -s "scrub rtbitmap"  -s "scrub rgbitmap %rgno%"
 
 # success, all done
 echo Silence is golden
diff --git a/tests/xfs/720 b/tests/xfs/720
index 68a6c7f6e2d584..97b3d2579cbd7f 100755
--- a/tests/xfs/720
+++ b/tests/xfs/720
@@ -37,7 +37,7 @@ alloc_unit=$(_get_file_block_size $SCRATCH_MNT)
 scratchfile=$SCRATCH_MNT/file
 touch $scratchfile
 $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT
-__stress_scrub_check_commands "$scratchfile" "" 'repair bmapbtd'
+__stress_scrub_check_commands "$scratchfile" "" "" 'repair bmapbtd'
 
 # Compute the number of extent records needed to guarantee btree format,
 # assuming 16 bytes for each ondisk extent record
diff --git a/tests/xfs/795 b/tests/xfs/795
index 217f96092a4c42..e7004705b526a5 100755
--- a/tests/xfs/795
+++ b/tests/xfs/795
@@ -37,7 +37,7 @@ scratchfile=$SCRATCH_MNT/file
 mkdir $scratchdir
 touch $scratchfile
 $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT
-__stress_scrub_check_commands "$scratchdir" "" 'repair directory'
+__stress_scrub_check_commands "$scratchdir" "" "" 'repair directory'
 
 # Create a 2-dirblock directory
 total_size=$((alloc_unit * 2))


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

* [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files
  2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
                     ` (13 preceding siblings ...)
  2025-02-19  1:01   ` [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups Darrick J. Wong
@ 2025-02-19  1:01   ` Darrick J. Wong
  2025-02-19  7:18     ` Christoph Hellwig
  14 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:01 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

With rtgroups, the rt bitmap and summary files are now per-group, so
adjust the fuzz and fsck tests to find the new locations.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs    |   19 +++++++++++++++++++
 tests/xfs/581 |    9 ++++++++-
 tests/xfs/582 |   14 +++++++-------
 tests/xfs/739 |    6 +++++-
 tests/xfs/740 |    6 +++++-
 tests/xfs/741 |    6 +++++-
 tests/xfs/742 |    6 +++++-
 tests/xfs/743 |    6 +++++-
 tests/xfs/744 |    6 +++++-
 tests/xfs/745 |    6 +++++-
 tests/xfs/746 |    6 +++++-
 tests/xfs/793 |   14 +++++++-------
 12 files changed, 81 insertions(+), 23 deletions(-)


diff --git a/common/xfs b/common/xfs
index 1e415a4eb3ed68..97bdf8575a4bd4 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1950,6 +1950,25 @@ _scratch_xfs_find_metafile()
 	local metafile="$1"
 	local sb_field
 
+	# With metadir=1, the realtime volume is sharded into allocation
+	# groups.  Each rtgroup has its own bitmap and summary file.  Tests
+	# should pick a particular file, but this compatibility shim still
+	# exists to keep old tests working.
+	case "$metafile" in
+	"rbmino")
+		if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+			echo "path -m /rtgroups/0.bitmap"
+			return 0
+		fi
+		;;
+	"rsumino")
+		if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+			echo "path -m /rtgroups/0.summary"
+			return 0
+		fi
+		;;
+	esac
+
 	sb_field="$(_scratch_xfs_get_sb_field "$metafile")"
 	if echo "$sb_field" | grep -q -w 'not found'; then
 		return 1
diff --git a/tests/xfs/581 b/tests/xfs/581
index 6aa360b37b90c5..7d79dbcad70149 100755
--- a/tests/xfs/581
+++ b/tests/xfs/581
@@ -30,7 +30,14 @@ _require_xfs_stress_scrub
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 _require_xfs_has_feature "$SCRATCH_MNT" realtime
-_scratch_xfs_stress_scrub -s "scrub rtbitmap"  -s "scrub rgbitmap %rgno%"
+
+if _xfs_has_feature "$SCRATCH_MNT" rtgroups; then
+	_scratch_xfs_stress_scrub -s "scrub rtbitmap %rgno%"
+elif xfs_io -c 'help scrub' | grep -q rgsuper; then
+	_scratch_xfs_stress_scrub -s "scrub rtbitmap 0"
+else
+	_scratch_xfs_stress_scrub -s "scrub rtbitmap"
+fi
 
 # success, all done
 echo Silence is golden
diff --git a/tests/xfs/582 b/tests/xfs/582
index e92f128f8a5695..a2cc58c04bf8d2 100755
--- a/tests/xfs/582
+++ b/tests/xfs/582
@@ -31,13 +31,13 @@ _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
 _require_xfs_has_feature "$SCRATCH_MNT" realtime
 
-# XXX the realtime summary scrubber isn't currently implemented upstream.
-# Don't bother trying to test it on those kernels
-$XFS_IO_PROG -c 'scrub rtsummary' -c 'scrub rtsummary' "$SCRATCH_MNT" 2>&1 | \
-	grep -q 'Scan was not complete' && \
-	_notrun "rtsummary scrub is incomplete"
-
-_scratch_xfs_stress_scrub -s "scrub rtsummary"
+if _xfs_has_feature "$SCRATCH_MNT" rtgroups; then
+	_scratch_xfs_stress_scrub -s "scrub rtsummary %rgno%"
+elif xfs_io -c 'help scrub' | grep -q rgsuper; then
+	_scratch_xfs_stress_scrub -s "scrub rtsummary 0"
+else
+	_scratch_xfs_stress_scrub -s "scrub rtsummary"
+fi
 
 # success, all done
 echo Silence is golden
diff --git a/tests/xfs/739 b/tests/xfs/739
index 5fd6caa5bce2f8..77cceac7ac7f02 100755
--- a/tests/xfs/739
+++ b/tests/xfs/739
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-path="$(_scratch_xfs_find_metafile rbmino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.bitmap"
+else
+	path="$(_scratch_xfs_find_metafile rbmino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'online' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
diff --git a/tests/xfs/740 b/tests/xfs/740
index c8990034773b32..fe5d054956d5e2 100755
--- a/tests/xfs/740
+++ b/tests/xfs/740
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-path="$(_scratch_xfs_find_metafile rsumino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.summary"
+else
+	path="$(_scratch_xfs_find_metafile rsumino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'online' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
diff --git a/tests/xfs/741 b/tests/xfs/741
index 96c2315c524311..35f78aab7faead 100755
--- a/tests/xfs/741
+++ b/tests/xfs/741
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-path="$(_scratch_xfs_find_metafile rbmino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.bitmap"
+else
+	path="$(_scratch_xfs_find_metafile rbmino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'offline' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
diff --git a/tests/xfs/742 b/tests/xfs/742
index 301ae7b9574320..04087c1a224558 100755
--- a/tests/xfs/742
+++ b/tests/xfs/742
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-path="$(_scratch_xfs_find_metafile rsumino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.summary"
+else
+	path="$(_scratch_xfs_find_metafile rsumino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'offline' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
diff --git a/tests/xfs/743 b/tests/xfs/743
index 039624f711c0a6..1e70147fa3bcef 100755
--- a/tests/xfs/743
+++ b/tests/xfs/743
@@ -26,7 +26,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-path="$(_scratch_xfs_find_metafile rbmino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.bitmap"
+else
+	path="$(_scratch_xfs_find_metafile rbmino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'both' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
diff --git a/tests/xfs/744 b/tests/xfs/744
index 13f63b9ceb1756..0db3dd617c2d1f 100755
--- a/tests/xfs/744
+++ b/tests/xfs/744
@@ -26,7 +26,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-path="$(_scratch_xfs_find_metafile rsumino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.summary"
+else
+	path="$(_scratch_xfs_find_metafile rsumino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'both' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
diff --git a/tests/xfs/745 b/tests/xfs/745
index 56a6d58ef9f4ca..acfbe72597fd5a 100755
--- a/tests/xfs/745
+++ b/tests/xfs/745
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtbitmap"
-path="$(_scratch_xfs_find_metafile rbmino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.bitmap"
+else
+	path="$(_scratch_xfs_find_metafile rbmino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'none' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtbitmap"
 
diff --git a/tests/xfs/746 b/tests/xfs/746
index 935b2e5acba5d4..0d1ab895aacd62 100755
--- a/tests/xfs/746
+++ b/tests/xfs/746
@@ -25,7 +25,11 @@ echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
 echo "Fuzz rtsummary"
-path="$(_scratch_xfs_find_metafile rsumino)"
+if _xfs_has_feature "$SCRATCH_DEV" rtgroups; then
+	path="path -m /rtgroups/0.summary"
+else
+	path="$(_scratch_xfs_find_metafile rsumino)"
+fi
 _scratch_xfs_fuzz_metadata '' 'none' "$path" 'dblock 0' >> $seqres.full
 echo "Done fuzzing rtsummary"
 
diff --git a/tests/xfs/793 b/tests/xfs/793
index a779bf81738537..07c64e7a3f9744 100755
--- a/tests/xfs/793
+++ b/tests/xfs/793
@@ -32,13 +32,13 @@ _scratch_mount
 _require_xfs_has_feature "$SCRATCH_MNT" realtime
 _xfs_force_bdev realtime $SCRATCH_MNT
 
-# XXX the realtime summary scrubber isn't currently implemented upstream.
-# Don't bother trying to fix it on those kernels
-$XFS_IO_PROG -c 'scrub rtsummary' -c 'scrub rtsummary' "$SCRATCH_MNT" 2>&1 | \
-	grep -q 'Scan was not complete' && \
-	_notrun "rtsummary scrub is incomplete"
-
-_scratch_xfs_stress_online_repair -s "repair rtsummary"
+if _xfs_has_feature "$SCRATCH_MNT" rtgroups; then
+	_scratch_xfs_stress_online_repair -s "repair rtsummary %rgno%"
+elif xfs_io -c 'help scrub' | grep -q rgsuper; then
+	_scratch_xfs_stress_online_repair -s "repair rtsummary 0"
+else
+	_scratch_xfs_stress_online_repair -s "repair rtsummary"
+fi
 
 # success, all done
 echo Silence is golden


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

* [PATCH 1/4] xfs: update tests for quota files in the metadir
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
@ 2025-02-19  1:01   ` Darrick J. Wong
  2025-02-19  7:19     ` Christoph Hellwig
  2025-02-19  1:02   ` [PATCH 2/4] xfs: test persistent quota flags Darrick J. Wong
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:01 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Update fstests to handle quota files in the metadir.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)


diff --git a/common/xfs b/common/xfs
index 97bdf8575a4bd4..30d2f98c3795da 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1967,6 +1967,24 @@ _scratch_xfs_find_metafile()
 			return 0
 		fi
 		;;
+	"uquotino")
+		if _xfs_has_feature "$SCRATCH_DEV" metadir; then
+			echo "path -m /quota/user"
+			return 0
+		fi
+		;;
+	"gquotino")
+		if _xfs_has_feature "$SCRATCH_DEV" metadir; then
+			echo "path -m /quota/group"
+			return 0
+		fi
+		;;
+	"pquotino")
+		if _xfs_has_feature "$SCRATCH_DEV" metadir; then
+			echo "path -m /quota/project"
+			return 0
+		fi
+		;;
 	esac
 
 	sb_field="$(_scratch_xfs_get_sb_field "$metafile")"


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

* [PATCH 2/4] xfs: test persistent quota flags
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
  2025-02-19  1:01   ` [PATCH 1/4] xfs: update tests for " Darrick J. Wong
@ 2025-02-19  1:02   ` Darrick J. Wong
  2025-02-19  7:20     ` Christoph Hellwig
  2025-02-19  1:02   ` [PATCH 3/4] xfs: fix quota detection in fuzz tests Darrick J. Wong
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:02 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Test the persistent quota flags that come with the metadir feature.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/generic/563  |    8 ++-
 tests/xfs/1891     |  128 +++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1891.out |  147 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 282 insertions(+), 1 deletion(-)
 create mode 100755 tests/xfs/1891
 create mode 100644 tests/xfs/1891.out


diff --git a/tests/generic/563 b/tests/generic/563
index 95a928fba5627e..89a71aa44938ea 100755
--- a/tests/generic/563
+++ b/tests/generic/563
@@ -96,7 +96,13 @@ smajor=$((0x`stat -L -c %t $loop_dev`))
 sminor=$((0x`stat -L -c %T $loop_dev`))
 
 _mkfs_dev $loop_dev >> $seqres.full 2>&1
-_mount $loop_dev $SCRATCH_MNT || _fail "mount failed"
+if [ $FSTYP = "xfs" ]; then
+	# Writes to the quota file are captured in cgroup metrics on XFS, so
+	# we require that quota is not enabled at all.
+	_mount $loop_dev -o noquota $SCRATCH_MNT || _fail "mount failed"
+else
+	_mount $loop_dev $SCRATCH_MNT || _fail "mount failed"
+fi
 
 blksize=$(_get_block_size "$SCRATCH_MNT")
 
diff --git a/tests/xfs/1891 b/tests/xfs/1891
new file mode 100755
index 00000000000000..7db94e0976527e
--- /dev/null
+++ b/tests/xfs/1891
@@ -0,0 +1,128 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test 1891
+#
+# Functionality test for persistent quota accounting and enforcement flags in
+# XFS when metadata directories are enabled.
+#
+. ./common/preamble
+_begin_fstest auto quick quota
+
+. ./common/filter
+. ./common/quota
+
+$MKFS_XFS_PROG 2>&1 | grep -q 'uquota' || \
+	_notrun "mkfs does not support uquota option"
+
+_require_scratch
+_require_xfs_quota
+
+filter_quota_state() {
+	sed -e 's/Inode: #[0-9]\+/Inode #XXX/g' \
+	    -e '/max warnings:/d' \
+	    -e '/Blocks grace time:/d' \
+	    -e '/Inodes grace time:/d' \
+		| _filter_scratch
+}
+
+qerase_mkfs_options() {
+	echo "$MKFS_OPTIONS" | sed \
+		-e 's/uquota//g' \
+		-e 's/gquota//g' \
+		-e 's/pquota//g' \
+		-e 's/uqnoenforce//g' \
+		-e 's/gqnoenforce//g' \
+		-e 's/pqnoenforce//g' \
+		-e 's/,,*/,/g'
+}
+
+confirm() {
+	echo "$MOUNT_OPTIONS" | grep -E -q '(qnoenforce|quota)' && \
+		echo "saw quota mount options"
+	_scratch_mount
+	$XFS_QUOTA_PROG -x -c "state -ugp" $SCRATCH_MNT | filter_quota_state
+	_check_xfs_scratch_fs
+	_scratch_unmount
+}
+
+ORIG_MOUNT_OPTIONS="$MOUNT_OPTIONS"
+MKFS_OPTIONS="$(qerase_mkfs_options)"
+
+echo "Test 0: formatting a subset"
+_scratch_mkfs -m uquota,gqnoenforce &>> $seqres.full
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+confirm
+
+echo "Test 1: formatting"
+_scratch_mkfs -m uquota,gquota,pquota &>> $seqres.full
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+confirm
+
+echo "Test 2: only grpquota"
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option grpquota
+confirm
+
+echo "Test 3: repair"
+_scratch_xfs_repair &>> $seqres.full || echo "repair failed?"
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+confirm
+
+echo "Test 4: weird options"
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option pqnoenforce,uquota
+confirm
+
+echo "Test 5: simple recovery"
+_scratch_mkfs -m uquota,gquota,pquota &>> $seqres.full
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+echo "$MOUNT_OPTIONS" | grep -E -q '(qnoenforce|quota)' && \
+	echo "saw quota mount options"
+_scratch_mount
+$XFS_QUOTA_PROG -x -c "state -ugp" $SCRATCH_MNT | filter_quota_state
+touch $SCRATCH_MNT/a
+_scratch_shutdown -v -f >> $seqres.full
+echo shutdown
+_scratch_unmount
+confirm
+
+echo "Test 6: simple recovery with mount options"
+_scratch_mkfs -m uquota,gquota,pquota &>> $seqres.full
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+echo "$MOUNT_OPTIONS" | grep -E -q '(qnoenforce|quota)' && \
+	echo "saw quota mount options"
+_scratch_mount
+$XFS_QUOTA_PROG -x -c "state -ugp" $SCRATCH_MNT | filter_quota_state
+touch $SCRATCH_MNT/a
+_scratch_shutdown -v -f >> $seqres.full
+echo shutdown
+_scratch_unmount
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option gqnoenforce
+confirm
+
+echo "Test 7: user quotaoff recovery"
+_scratch_mkfs -m uquota,gquota,pquota &>> $seqres.full
+MOUNT_OPTIONS="$ORIG_MOUNT_OPTIONS"
+_qmount_option	# blank out quota options
+echo "$MOUNT_OPTIONS" | grep -E -q '(qnoenforce|quota)' && \
+	echo "saw quota mount options"
+_scratch_mount
+$XFS_QUOTA_PROG -x -c "state -ugp" $SCRATCH_MNT | filter_quota_state
+touch $SCRATCH_MNT/a
+$XFS_QUOTA_PROG -x -c 'off -u' $SCRATCH_MNT
+_scratch_shutdown -v -f >> $seqres.full
+echo shutdown
+_scratch_unmount
+confirm
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1891.out b/tests/xfs/1891.out
new file mode 100644
index 00000000000000..7e8894088042bb
--- /dev/null
+++ b/tests/xfs/1891.out
@@ -0,0 +1,147 @@
+QA output created by 1891
+Test 0: formatting a subset
+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: OFF
+  Inode #XXX (1 blocks, 1 extents)
+Project quota state on SCRATCH_MNT (SCRATCH_DEV)
+  Accounting: OFF
+  Enforcement: OFF
+  Inode: N/A
+Test 1: formatting
+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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)
+Test 2: only grpquota
+saw quota mount options
+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 #XXX (1 blocks, 1 extents)
+Test 3: repair
+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 #XXX (1 blocks, 1 extents)
+Test 4: weird options
+saw quota mount options
+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 #XXX (1 blocks, 1 extents)
+Project quota state on SCRATCH_MNT (SCRATCH_DEV)
+  Accounting: ON
+  Enforcement: OFF
+  Inode #XXX (1 blocks, 1 extents)
+Test 5: simple recovery
+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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)
+shutdown
+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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)
+Test 6: simple recovery with mount options
+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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)
+shutdown
+saw quota mount options
+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: OFF
+  Inode #XXX (1 blocks, 1 extents)
+Project quota state on SCRATCH_MNT (SCRATCH_DEV)
+  Accounting: OFF
+  Enforcement: OFF
+  Inode #XXX (1 blocks, 1 extents)
+Test 7: user quotaoff recovery
+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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)
+shutdown
+User quota state on SCRATCH_MNT (SCRATCH_DEV)
+  Accounting: ON
+  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: ON
+  Enforcement: ON
+  Inode #XXX (1 blocks, 1 extents)


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

* [PATCH 3/4] xfs: fix quota detection in fuzz tests
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
  2025-02-19  1:01   ` [PATCH 1/4] xfs: update tests for " Darrick J. Wong
  2025-02-19  1:02   ` [PATCH 2/4] xfs: test persistent quota flags Darrick J. Wong
@ 2025-02-19  1:02   ` Darrick J. Wong
  2025-02-19  7:20     ` Christoph Hellwig
  2025-02-19  1:02   ` [PATCH 4/4] xfs: fix tests for persistent qflags Darrick J. Wong
  2025-02-19  7:19   ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Christoph Hellwig
  4 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:02 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

With metadir, quota options persist until they are changed by mount
options.  Therefore, we can set the quota flags in MKFS_OPTIONS and
needn't supply them in MOUNT_OPTIONS.  Unfortunately, this means that we
cannot grep the MOUNT_OPTIONS anymore; we must mount the fs and run
src/feature to determine if quotas are enabled.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/425 |    5 ++++-
 tests/xfs/426 |    5 ++++-
 tests/xfs/427 |    5 ++++-
 tests/xfs/428 |    5 ++++-
 tests/xfs/429 |    5 ++++-
 tests/xfs/430 |    5 ++++-
 tests/xfs/487 |    5 ++++-
 tests/xfs/488 |    5 ++++-
 tests/xfs/489 |    5 ++++-
 tests/xfs/779 |    5 ++++-
 tests/xfs/780 |    5 ++++-
 tests/xfs/781 |    5 ++++-
 12 files changed, 48 insertions(+), 12 deletions(-)


diff --git a/tests/xfs/425 b/tests/xfs/425
index 7ad53f97a6940c..77f86bcc398312 100755
--- a/tests/xfs/425
+++ b/tests/xfs/425
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled"
+
+_scratch_mount
+$here/src/feature -U $SCRATCH_DEV || _notrun "user quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/426 b/tests/xfs/426
index 53bfd0d637fcb5..80f572eb8068a2 100755
--- a/tests/xfs/426
+++ b/tests/xfs/426
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled"
+
+_scratch_mount
+$here/src/feature -U $SCRATCH_DEV || _notrun "user quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/427 b/tests/xfs/427
index 38de1360af6262..48b8d5e935abfe 100755
--- a/tests/xfs/427
+++ b/tests/xfs/427
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled"
+
+_scratch_mount
+$here/src/feature -G $SCRATCH_DEV || _notrun "group quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/428 b/tests/xfs/428
index e112ccf84646c1..f87f0a98bae3e9 100755
--- a/tests/xfs/428
+++ b/tests/xfs/428
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled"
+
+_scratch_mount
+$here/src/feature -G $SCRATCH_DEV || _notrun "group quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/429 b/tests/xfs/429
index ded8c3944a2648..426e716aa079bf 100755
--- a/tests/xfs/429
+++ b/tests/xfs/429
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled"
+
+_scratch_mount
+$here/src/feature -P $SCRATCH_DEV || _notrun "project quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/430 b/tests/xfs/430
index 3e6527851069a9..b3a2c6dd1a5f6a 100755
--- a/tests/xfs/430
+++ b/tests/xfs/430
@@ -23,7 +23,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled"
+
+_scratch_mount
+$here/src/feature -P $SCRATCH_DEV || _notrun "project quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/487 b/tests/xfs/487
index 0a5403a25dfd82..809a4c6fd621cd 100755
--- a/tests/xfs/487
+++ b/tests/xfs/487
@@ -24,7 +24,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled"
+
+_scratch_mount
+$here/src/feature -U $SCRATCH_DEV || _notrun "user quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/488 b/tests/xfs/488
index 0e67889f26f7a0..a8144c9ce39b91 100755
--- a/tests/xfs/488
+++ b/tests/xfs/488
@@ -24,7 +24,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled"
+
+_scratch_mount
+$here/src/feature -G $SCRATCH_DEV || _notrun "group quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/489 b/tests/xfs/489
index ef65525c224764..cb24b444bcc919 100755
--- a/tests/xfs/489
+++ b/tests/xfs/489
@@ -24,7 +24,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled"
+
+_scratch_mount
+$here/src/feature -P $SCRATCH_DEV || _notrun "project quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/779 b/tests/xfs/779
index acce522995c693..e1e44c1928c67b 100755
--- a/tests/xfs/779
+++ b/tests/xfs/779
@@ -25,7 +25,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled"
+
+_scratch_mount
+$here/src/feature -U $SCRATCH_DEV || _notrunn "user quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/780 b/tests/xfs/780
index efcbeb8e147353..ebd25f8a13bab4 100755
--- a/tests/xfs/780
+++ b/tests/xfs/780
@@ -25,7 +25,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled"
+
+_scratch_mount
+$here/src/feature -G $SCRATCH_DEV || _notrun "group quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 
diff --git a/tests/xfs/781 b/tests/xfs/781
index 09d63bfeceb6e7..49920cd1215ec1 100755
--- a/tests/xfs/781
+++ b/tests/xfs/781
@@ -25,7 +25,10 @@ _require_quota
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
-echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled"
+
+_scratch_mount
+$here/src/feature -P $SCRATCH_DEV || _notrun "project quota disabled"
+_scratch_unmount
 
 _scratch_xfs_set_quota_fuzz_ids
 


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

* [PATCH 4/4] xfs: fix tests for persistent qflags
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  1:02   ` [PATCH 3/4] xfs: fix quota detection in fuzz tests Darrick J. Wong
@ 2025-02-19  1:02   ` Darrick J. Wong
  2025-02-19  7:20     ` Christoph Hellwig
  2025-02-19  7:19   ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Christoph Hellwig
  4 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:02 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Fix the tests that now break with persistent quota flags.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/quota              |    1 +
 common/rc                 |    1 +
 common/xfs                |    3 +++
 tests/xfs/007             |    2 +-
 tests/xfs/096             |    1 +
 tests/xfs/096.out         |    2 +-
 tests/xfs/106             |    2 +-
 tests/xfs/116             |   13 ++++++++++++-
 tests/xfs/116.cfg         |    1 +
 tests/xfs/116.out.default |    0 
 tests/xfs/116.out.metadir |    3 +++
 tests/xfs/152             |    2 +-
 tests/xfs/263             |    1 +
 tests/xfs/263.out         |    2 +-
 14 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100644 tests/xfs/116.cfg
 rename tests/xfs/{116.out => 116.out.default} (100%)
 create mode 100644 tests/xfs/116.out.metadir


diff --git a/common/quota b/common/quota
index 4dad9b79a27a7f..4ef0d4775067ee 100644
--- a/common/quota
+++ b/common/quota
@@ -312,6 +312,7 @@ _qmount_option()
 		-e 's/grpjquota=[^, ]*/QUOTA/g' \
 		-e 's/\bpquota/QUOTA/g'    \
 		-e 's/prjquota/QUOTA/g'    \
+		-e 's/noquota/QUOTA/g'     \
 		-e 's/quota/QUOTA/g'       \
 		-e 's/uqnoenforce/QUOTA/g' \
 		-e 's/gqnoenforce/QUOTA/g' \
diff --git a/common/rc b/common/rc
index 20d07e70401f90..96082f050de587 100644
--- a/common/rc
+++ b/common/rc
@@ -3731,6 +3731,7 @@ _get_os_name()
 _link_out_file_named()
 {
 	test -n "$seqfull" || _fail "need to set seqfull"
+	test -r "$seqfull.cfg" || _fail "need $seqfull.cfg"
 
 	local features=$2
 	local suffix=$(FEATURES="$features" perl -e '
diff --git a/common/xfs b/common/xfs
index 30d2f98c3795da..aae8b427d25fe9 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1704,6 +1704,9 @@ _xfs_filter_mkfs()
 		print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n";
 		print STDOUT "log      =LDEV bsize=XXX blocks=XXX\n";
 	}
+	if (/^\s+=\s+exchange=(\d+)\s+metadir=(\d+)/) {
+		print STDERR "exchange=$1\nmetadir=$2\n\n";
+	}
 	if (/^\s+=\s+sectsz=(\d+)\s+sunit=(\d+) blks/) {
 		print STDERR "logsectsz=$1\nlogsunit=$2\n\n";
 	}
diff --git a/tests/xfs/007 b/tests/xfs/007
index e35a069f9bd5c5..4721bc832b3fe4 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -47,7 +47,7 @@ do_test()
 	# This takes care of newer kernels where quotaoff clears the superblock
 	# quota enforcement flags but doesn't shut down accounting.
 	_scratch_unmount
-	_qmount_option ""
+	_qmount_option "noquota"
 	_scratch_mount
 
 	rm_commands=(-x -c "remove -$off_opts")
diff --git a/tests/xfs/096 b/tests/xfs/096
index 57a05a8ffefbd1..f1f5d562d4fa18 100755
--- a/tests/xfs/096
+++ b/tests/xfs/096
@@ -28,6 +28,7 @@ function option_string()
 	if [ "$((VAL & 4))" -ne "0" ]; then OPT=prjquota,${OPT}; fi;
 	if [ "$((VAL & 2))" -ne "0" ]; then OPT=grpquota,${OPT}; fi;
 	if [ "$((VAL & 1))" -ne "0" ]; then OPT=usrquota,${OPT}; fi;
+	if [ "$VAL" = "0" ]; then OPT=noquota; fi;
 	echo $OPT
 }
 
diff --git a/tests/xfs/096.out b/tests/xfs/096.out
index 1deb7a8c302374..20f68d3870c4a0 100644
--- a/tests/xfs/096.out
+++ b/tests/xfs/096.out
@@ -1,5 +1,5 @@
 QA output created by 096
-== Options: rw ==
+== Options: noquota ==
 == Options: usrquota,rw ==
 User quota state on SCRATCH_MNT (SCRATCH_DEV)
   Accounting: ON
diff --git a/tests/xfs/106 b/tests/xfs/106
index 066efef1181b8a..10cbd1052bbc89 100755
--- a/tests/xfs/106
+++ b/tests/xfs/106
@@ -155,7 +155,7 @@ test_off()
 {
 	echo "turning quota off by remounting"
 	_scratch_unmount
-	_qmount_option ""
+	_qmount_option "noquota"
 	_qmount
 }
 
diff --git a/tests/xfs/116 b/tests/xfs/116
index c5e7508f8862ed..3ef6f5ddfdb2d6 100755
--- a/tests/xfs/116
+++ b/tests/xfs/116
@@ -23,7 +23,18 @@ _require_xfs_quota
 # Only mount with the quota options we specify below
 _qmount_option "defaults"
 
-_scratch_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs >> $seqres.full
+
+# link correct .out file, see $seqfull.cfg
+seqfull=$0
+if [ "$metadir" = 1 ]; then
+	_link_out_file_named $seqfull.out "metadir"
+else
+	_link_out_file_named $seqfull.out
+fi
+
 _scratch_mount "-o uquota"
 _scratch_unmount
 _scratch_xfs_db -r -c sb -c print  | grep qflags
diff --git a/tests/xfs/116.cfg b/tests/xfs/116.cfg
new file mode 100644
index 00000000000000..571f542faef97d
--- /dev/null
+++ b/tests/xfs/116.cfg
@@ -0,0 +1 @@
+metadir: metadir
diff --git a/tests/xfs/116.out b/tests/xfs/116.out.default
similarity index 100%
rename from tests/xfs/116.out
rename to tests/xfs/116.out.default
diff --git a/tests/xfs/116.out.metadir b/tests/xfs/116.out.metadir
new file mode 100644
index 00000000000000..3a58fb919b1e39
--- /dev/null
+++ b/tests/xfs/116.out.metadir
@@ -0,0 +1,3 @@
+QA output created by 116
+qflags = 0x7
+qflags = 0x7
diff --git a/tests/xfs/152 b/tests/xfs/152
index 6c052cbc9b31f5..94428b35d22a87 100755
--- a/tests/xfs/152
+++ b/tests/xfs/152
@@ -194,7 +194,7 @@ test_off()
 {
 	echo "checking off command (type=$type)"
 	_scratch_unmount
-	_qmount_option ""
+	_qmount_option "noquota"
 	_qmount
 }
 
diff --git a/tests/xfs/263 b/tests/xfs/263
index aedbc4795296d3..83ec8b959fa9de 100755
--- a/tests/xfs/263
+++ b/tests/xfs/263
@@ -27,6 +27,7 @@ function option_string()
 	if [ "$((VAL & 4))" -ne "0" ]; then OPT=prjquota,${OPT}; fi;
 	if [ "$((VAL & 2))" -ne "0" ]; then OPT=grpquota,${OPT}; fi;
 	if [ "$((VAL & 1))" -ne "0" ]; then OPT=usrquota,${OPT}; fi;
+	if [ "$VAL" = "0" ]; then OPT=noquota; fi;
 	echo $OPT
 }
 
diff --git a/tests/xfs/263.out b/tests/xfs/263.out
index 64c1a5876cfa24..8682eee2680728 100644
--- a/tests/xfs/263.out
+++ b/tests/xfs/263.out
@@ -1,5 +1,5 @@
 QA output created by 263
-== Options: rw ==
+== Options: noquota ==
 == Options: usrquota,rw ==
 User quota state on SCRATCH_MNT (SCRATCH_DEV)
   Accounting: ON


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

* [PATCH 1/3] common: enable testing of realtime quota when supported
  2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
@ 2025-02-19  1:02   ` Darrick J. Wong
  2025-02-19  7:21     ` Christoph Hellwig
  2025-02-19  1:03   ` [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 3/3] xfs: regression testing of quota on the realtime device Darrick J. Wong
  2 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:02 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

If the kernel advertises realtime quota support, test it.

However, this has a plot twist -- because rt quota only works if the xfs
is formatted with rtgroups, we have to mount a filesystem to see if
rtquota is actually supported.  Since it's time consuming to format and
mount the scratch filesystem, we'll assume that the test and scratch
fses have the same support.

This will cause problems if one sets SCRATCH_RTDEV but not TEST_RTDEV.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |   10 ++++++---
 common/quota    |   20 +++---------------
 common/xfs      |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+), 20 deletions(-)


diff --git a/common/populate b/common/populate
index a77d1b0f5f3873..ade3ace886f4d4 100644
--- a/common/populate
+++ b/common/populate
@@ -245,9 +245,13 @@ _populate_xfs_qmount_option()
 	if [ ! -f /proc/fs/xfs/xqmstat ]; then
 		# No quota support
 		return
-	elif [ "${USE_EXTERNAL}" = "yes" ] && [ ! -z "${SCRATCH_RTDEV}" ]; then
-		# Quotas not supported on rt filesystems
-		return
+	elif [ "${USE_EXTERNAL}" = "yes" ] && [ -n "${SCRATCH_RTDEV}" ]; then
+		# We have not mounted the scratch fs, so we can only check
+		# rtquota support from the test fs.  Skip the quota options if
+		# the test fs does not have an rt section.
+		test -n "${TEST_RTDEV}" || return
+		_xfs_kmod_supports_rtquota || return
+		_xfs_test_supports_rtquota || return
 	elif [ -z "${XFS_QUOTA_PROG}" ]; then
 		# xfs quota tools not installed
 		return
diff --git a/common/quota b/common/quota
index 4ef0d4775067ee..6735d0fec48991 100644
--- a/common/quota
+++ b/common/quota
@@ -23,12 +23,7 @@ _require_quota()
 	if [ ! -f /proc/fs/xfs/xqmstat ]; then
 	    _notrun "Installed kernel does not support XFS quotas"
         fi
-	if [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ]; then
-	    _notrun "Quotas not supported on realtime test device"
-	fi
-	if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ]; then
-	    _notrun "Quotas not supported on realtime scratch device"
-	fi
+	_require_xfs_rtquota_if_rtdev
 	;;
     *)
 	_notrun "disk quotas not supported by this filesystem type: $FSTYP"
@@ -44,12 +39,7 @@ _require_xfs_quota()
 {
     $here/src/feature -q $TEST_DEV
     [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
-    if [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ]; then
-	_notrun "Quotas not supported on realtime test device"
-    fi
-    if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ]; then
-	_notrun "Quotas not supported on realtime scratch device"
-    fi
+    _require_xfs_rtquota_if_rtdev
     [ -n "$XFS_QUOTA_PROG" ] || _notrun "XFS quota user tools not installed"
 }
 
@@ -153,11 +143,7 @@ _require_prjquota()
     fi
     $here/src/feature -P $_dev
     [ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
-    if [ "$USE_EXTERNAL" = yes ]; then
-	if [ -n "$TEST_RTDEV" -o -n "$SCRATCH_RTDEV" ]; then
-	    _notrun "Project quotas not supported on realtime filesystem"
-	fi
-    fi
+    test "$FSTYP" = "xfs" && _require_xfs_rtquota_if_rtdev
 }
 
 #
diff --git a/common/xfs b/common/xfs
index aae8b427d25fe9..adad37ea0710e0 100644
--- a/common/xfs
+++ b/common/xfs
@@ -2073,3 +2073,65 @@ _require_xfs_scratch_metadir()
 		_scratch_unmount
 	fi
 }
+
+# Does the xfs kernel module support realtime quota?
+_xfs_kmod_supports_rtquota() {
+	local xqmfile="/proc/fs/xfs/xqm"
+
+	test -e "$xqmfile" || modprobe xfs
+	test -e "$xqmfile" || return 1
+
+	grep -q -w rtquota "$xqmfile"
+}
+
+# Does this mounted filesystem support realtime quota?  This is the only way
+# to check that the fs really supports it because the kernel ignores quota
+# mount options for pre-rtgroups realtime filesystems.
+_xfs_fs_supports_rtquota() {
+	local mntpt="$1"
+	local dev="$2"
+	local rtdev="$3"
+
+	test -d "$mntpt" || \
+		echo "_xfs_fs_supports_rtquota needs a mountpoint"
+	test "$USE_EXTERNAL" == "yes" || \
+		echo "_xfs_fs_supports_rtquota needs USE_EXTERNAL=yes"
+	test -n "$rtdev" || \
+		echo "_xfs_fs_supports_rtquota needs an rtdev"
+
+	$here/src/feature -U $dev || \
+		$here/src/feature -G $dev || \
+		$here/src/feature -P $dev
+}
+
+# Do we support realtime quotas on the (mounted) test filesystem?
+_xfs_test_supports_rtquota() {
+	_xfs_fs_supports_rtquota "$TEST_DIR" "$TEST_DEV" "$TEST_RTDEV"
+}
+
+# Do we support realtime quotas on the (mounted) scratch filesystem?
+_xfs_scratch_supports_rtquota() {
+	_xfs_fs_supports_rtquota "$SCRATCH_MNT" "$SCRATCH_DEV" "$SCRATCH_RTDEV"
+}
+
+# Make sure that we're set up for realtime quotas if external rt devices are
+# configured.  The test filesystem has to be mounted before each test, so we
+# can check that quickly, and we make the bold assumption that the same will
+# apply to any scratch fs that might be created.
+_require_xfs_rtquota_if_rtdev() {
+	test "$USE_EXTERNAL" = "yes" || return
+
+	if [ -n "$TEST_RTDEV$SCRATCH_RTDEV" ]; then
+		_xfs_kmod_supports_rtquota || \
+			_notrun "Kernel driver does not support rt quota"
+	fi
+
+	if [ -n "$TEST_RTDEV" ]; then
+		_xfs_test_supports_rtquota || \
+			_notrun "Quotas not supported on realtime device"
+	fi
+
+	if [ -n "$SCRATCH_RTDEV" ] && [ -z "$TEST_RTDEV" ]; then
+		_notrun "Quotas probably not supported on realtime scratch device; set TEST_RTDEV"
+	fi
+}


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

* [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota
  2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
  2025-02-19  1:02   ` [PATCH 1/3] common: enable testing of realtime quota when supported Darrick J. Wong
@ 2025-02-19  1:03   ` Darrick J. Wong
  2025-02-19  7:21     ` Christoph Hellwig
  2025-02-19  1:03   ` [PATCH 3/3] xfs: regression testing of quota on the realtime device Darrick J. Wong
  2 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:03 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Fix or limit the scope of tests so that we can turn on testing for
realtime quotas.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/quota      |   25 +++++++++++++++++++++++++
 tests/generic/219 |    1 +
 tests/generic/230 |    1 +
 tests/generic/305 |    1 +
 tests/generic/326 |    1 +
 tests/generic/327 |    1 +
 tests/generic/328 |    1 +
 tests/generic/566 |    4 +++-
 tests/generic/587 |    1 +
 tests/generic/603 |    1 +
 tests/generic/691 |    2 ++
 tests/generic/710 |    4 +++-
 tests/xfs/050     |    2 ++
 tests/xfs/096     |    4 ++++
 tests/xfs/106     |    1 +
 tests/xfs/108     |    2 ++
 tests/xfs/152     |    1 +
 tests/xfs/153     |    2 ++
 tests/xfs/161     |    1 +
 tests/xfs/213     |    1 +
 tests/xfs/214     |    1 +
 tests/xfs/220     |    2 ++
 tests/xfs/299     |    2 ++
 tests/xfs/330     |    1 +
 tests/xfs/434     |    1 +
 tests/xfs/435     |    1 +
 tests/xfs/440     |    3 +++
 tests/xfs/441     |    1 +
 tests/xfs/442     |    1 +
 tests/xfs/508     |    2 ++
 tests/xfs/511     |   10 +++++++++-
 tests/xfs/720     |    5 +++++
 32 files changed, 84 insertions(+), 3 deletions(-)


diff --git a/common/quota b/common/quota
index 6735d0fec48991..2f5ccd2fa17363 100644
--- a/common/quota
+++ b/common/quota
@@ -436,5 +436,30 @@ _restore_project_quota()
 	sed -i "/:$id$/d" /etc/projid
 }
 
+# Reconfigure the mounted fs as needed so that we can test the VFS quota
+# utilities.  They do not support realtime block limits or reporting, so
+# we forcibly inhibit rtinherit on XFS filesystems.
+_force_vfs_quota_testing()
+{
+	local mount="${1:-$TEST_DIR}"
+
+	test "$FSTYP" = "xfs" && _xfs_force_bdev data "$mount"
+}
+
+# Does the mounted scratch filesystem have a realtime volume where quota works?
+# Returns nonzero if any of the above are false.
+_scratch_supports_rtquota()
+{
+	case "$FSTYP" in
+	"xfs")
+		if [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ]; then
+			_xfs_scratch_supports_rtquota
+			return
+		fi
+	esac
+
+	return 1
+}
+
 # make sure this script returns success
 /bin/true
diff --git a/tests/generic/219 b/tests/generic/219
index d72aa745fdfcf1..cc2ec119eb4298 100755
--- a/tests/generic/219
+++ b/tests/generic/219
@@ -92,6 +92,7 @@ test_accounting()
 _scratch_unmount 2>/dev/null
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
+_force_vfs_quota_testing $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
 quotaon $SCRATCH_MNT 2>/dev/null
 _scratch_unmount
diff --git a/tests/generic/230 b/tests/generic/230
index 18e20f4b2e9439..a8caf5a808c3c7 100755
--- a/tests/generic/230
+++ b/tests/generic/230
@@ -100,6 +100,7 @@ _qmount_option 'defaults'
 
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
+_force_vfs_quota_testing $SCRATCH_MNT
 BLOCK_SIZE=$(_get_file_block_size $SCRATCH_MNT)
 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
 quotaon $SCRATCH_MNT 2>/dev/null
diff --git a/tests/generic/305 b/tests/generic/305
index 6ccbb3d07c70c2..373abf57037ed6 100755
--- a/tests/generic/305
+++ b/tests/generic/305
@@ -26,6 +26,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/generic/326 b/tests/generic/326
index 321e7dc6a8e54c..d16e95aabaecd5 100755
--- a/tests/generic/326
+++ b/tests/generic/326
@@ -27,6 +27,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/generic/327 b/tests/generic/327
index 18cfcd1f655bd7..9102cbd6841072 100755
--- a/tests/generic/327
+++ b/tests/generic/327
@@ -25,6 +25,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/generic/328 b/tests/generic/328
index fa33bdb78dba12..db785475db87d6 100755
--- a/tests/generic/328
+++ b/tests/generic/328
@@ -26,6 +26,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/generic/566 b/tests/generic/566
index a41e04852ed88c..a6ec82fd36d8bb 100755
--- a/tests/generic/566
+++ b/tests/generic/566
@@ -35,7 +35,9 @@ _qmount
 dir="$SCRATCH_MNT/dummy"
 mkdir -p $dir
 chown $qa_user $dir
-$XFS_QUOTA_PROG -x -c "limit -g bsoft=100k bhard=100k $qa_user" $SCRATCH_MNT
+_scratch_supports_rtquota && \
+	extra_limits="rtbsoft=100k rtbhard=100k"
+$XFS_QUOTA_PROG -x -c "limit -g bsoft=100k bhard=100k $extra_limits $qa_user" $SCRATCH_MNT
 
 $XFS_IO_PROG -f -c 'pwrite -S 0x58 0 1m' $dir/foo >> $seqres.full
 chown $qa_user "${dir}/foo"
diff --git a/tests/generic/587 b/tests/generic/587
index 466596799431f7..49fcade72790d6 100755
--- a/tests/generic/587
+++ b/tests/generic/587
@@ -56,6 +56,7 @@ _scratch_mkfs > $seqres.full
 # This test must have user quota enabled
 _qmount_option usrquota
 _qmount >> $seqres.full
+_force_vfs_quota_testing $SCRATCH_MNT
 
 testfile=$SCRATCH_MNT/test-$seq
 touch $testfile
diff --git a/tests/generic/603 b/tests/generic/603
index b199f801a8f03f..9b5e824577b382 100755
--- a/tests/generic/603
+++ b/tests/generic/603
@@ -120,6 +120,7 @@ _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
 _qmount_option "usrquota,grpquota,prjquota"
 _qmount
+_force_vfs_quota_testing $SCRATCH_MNT
 _require_prjquota $SCRATCH_DEV
 BLOCK_SIZE=$(_get_file_block_size $SCRATCH_MNT)
 rm -rf $SCRATCH_MNT/t
diff --git a/tests/generic/691 b/tests/generic/691
index 30ae4a1e384a05..fa682fb73b0417 100755
--- a/tests/generic/691
+++ b/tests/generic/691
@@ -39,6 +39,7 @@ _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
 _qmount_option "prjquota"
 _qmount
+_force_vfs_quota_testing $SCRATCH_MNT
 _require_prjquota $SCRATCH_DEV
 
 filter_quota()
@@ -66,6 +67,7 @@ exercise()
 		_scratch_enable_pquota
 	fi
 	_qmount
+	_force_vfs_quota_testing $SCRATCH_MNT
 	if [ "$type" = "P" ];then
 		_create_project_quota $SCRATCH_MNT/t $projid $qa_user
 		file=$SCRATCH_MNT/t/testfile
diff --git a/tests/generic/710 b/tests/generic/710
index 072cddf570f444..16f7276d3d4b04 100755
--- a/tests/generic/710
+++ b/tests/generic/710
@@ -32,7 +32,9 @@ $XFS_IO_PROG -f -c 'pwrite -S 0x59 0 64k -b 64k' -c 'truncate 256k' $SCRATCH_MNT
 chown nobody $SCRATCH_MNT/b
 
 # Set up a quota limit
-$XFS_QUOTA_PROG -x -c "limit -u bhard=70k nobody" $SCRATCH_MNT
+_scratch_supports_rtquota && \
+	extra_limits="rtbhard=70k"
+$XFS_QUOTA_PROG -x -c "limit -u bhard=70k $extra_limits nobody" $SCRATCH_MNT
 
 echo before exchangerange >> $seqres.full
 $XFS_QUOTA_PROG -x -c 'report -a' $SCRATCH_MNT >> $seqres.full
diff --git a/tests/xfs/050 b/tests/xfs/050
index 1e40ab90a843e8..46c60a4bdd6b66 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -33,6 +33,7 @@ _scratch_mkfs >/dev/null 2>&1
 orig_mntopts="$MOUNT_OPTIONS"
 _qmount_option "uquota"
 _scratch_mount
+_force_vfs_quota_testing $SCRATCH_MNT   # golden output encodes block usage
 bsize=$(_get_file_block_size $SCRATCH_MNT)
 # needs quota enabled to compute the number of metadata dir files
 HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
@@ -75,6 +76,7 @@ _exercise()
 	. $tmp.mkfs
 
 	_qmount
+	_force_vfs_quota_testing $SCRATCH_MNT   # golden output encodes block usage
 
 	# Figure out whether we're doing large allocations
 	# (bail out if they're so large they stuff the test up)
diff --git a/tests/xfs/096 b/tests/xfs/096
index f1f5d562d4fa18..4c4fdfa12ef840 100755
--- a/tests/xfs/096
+++ b/tests/xfs/096
@@ -20,6 +20,10 @@ _require_scratch
 _require_xfs_quota
 _require_xfs_nocrc
 
+if [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ]; then
+	_notrun "Realtime quotas not supported on V4 filesystems"
+fi
+
 function option_string()
 {
 	VAL=$1
diff --git a/tests/xfs/106 b/tests/xfs/106
index 10cbd1052bbc89..108cd0b8c3061a 100755
--- a/tests/xfs/106
+++ b/tests/xfs/106
@@ -195,6 +195,7 @@ test_xfs_quota()
 {
 	_qmount_option $1
 	_qmount
+	_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 	if [ $type == "p" ]; then
 		_require_prjquota $SCRATCH_DEV
diff --git a/tests/xfs/108 b/tests/xfs/108
index 149d76eeb17a42..8adc63d4e56e4f 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -63,6 +63,7 @@ test_accounting()
 export MOUNT_OPTIONS="-opquota"
 _scratch_mkfs_xfs >> $seqres.full
 _qmount
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 _require_prjquota $SCRATCH_DEV
 
 rm -f $tmp.projects $seqres.full
@@ -70,6 +71,7 @@ _scratch_unmount 2>/dev/null
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 uid=1
 gid=2
diff --git a/tests/xfs/152 b/tests/xfs/152
index 94428b35d22a87..7ba00c4bfac9ff 100755
--- a/tests/xfs/152
+++ b/tests/xfs/152
@@ -240,6 +240,7 @@ qmount_idmapped()
 {
 	wipe_mounts
 	_try_scratch_mount || _fail "qmount failed"
+	_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 	mkdir -p "${SCRATCH_MNT}/unmapped"
 	mkdir -p "${SCRATCH_MNT}/idmapped"
diff --git a/tests/xfs/153 b/tests/xfs/153
index 2ce22b8c44b298..27db71e7738d08 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -38,6 +38,7 @@ _scratch_mkfs >/dev/null 2>&1
 orig_mntopts="$MOUNT_OPTIONS"
 _qmount_option "uquota"
 _scratch_mount
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 bsize=$(_get_file_block_size $SCRATCH_MNT)
 # needs quota enabled to compute the number of metadata dir files
 HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
@@ -80,6 +81,7 @@ run_tests()
 	. $tmp.mkfs
 
 	_qmount
+	_force_vfs_quota_testing $SCRATCH_MNT   # golden output encodes block usage
 
 	# Figure out whether we're doing large allocations
 	# (bail out if they're so large they stuff the test up)
diff --git a/tests/xfs/161 b/tests/xfs/161
index e13a646a5053bd..c35bcabb5eda90 100755
--- a/tests/xfs/161
+++ b/tests/xfs/161
@@ -36,6 +36,7 @@ _qmount_option "usrquota"
 _scratch_xfs_db -c 'version' -c 'sb 0' -c 'p' >> $seqres.full
 _scratch_mount >> $seqres.full
 
+_xfs_force_bdev data $SCRATCH_MNT
 
 min_blksz=65536
 file_blksz=$(_get_file_block_size "$SCRATCH_MNT")
diff --git a/tests/xfs/213 b/tests/xfs/213
index 7b27e3c09a815a..a9e97ee01cabce 100755
--- a/tests/xfs/213
+++ b/tests/xfs/213
@@ -28,6 +28,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT	# repquota
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/xfs/214 b/tests/xfs/214
index f2f23b3fb33f5d..c316a92baa4404 100755
--- a/tests/xfs/214
+++ b/tests/xfs/214
@@ -29,6 +29,7 @@ echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT	# repquota
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
 
diff --git a/tests/xfs/220 b/tests/xfs/220
index f89c976fb850af..d34764301b9e06 100755
--- a/tests/xfs/220
+++ b/tests/xfs/220
@@ -37,6 +37,7 @@ _scratch_mkfs_xfs >/dev/null 2>&1
 
 # mount  with quotas enabled
 _scratch_mount -o uquota
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 # turn off quota
 $XFS_QUOTA_PROG -x -c off $SCRATCH_DEV
@@ -49,6 +50,7 @@ _scratch_mkfs_xfs >/dev/null 2>&1
 
 # mount  with quotas enabled
 _scratch_mount -o uquota
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 # turn off quota accounting...
 $XFS_QUOTA_PROG -x -c off $SCRATCH_DEV
diff --git a/tests/xfs/299 b/tests/xfs/299
index 3986f8fb904e5d..9f8b6631ccabfb 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -153,6 +153,7 @@ projid_file="$tmp.projid"
 echo "*** user, group, and project"
 _qmount_option "uquota,gquota,pquota"
 _qmount
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 
 bsize=$(_get_file_block_size $SCRATCH_MNT)
 HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
@@ -180,6 +181,7 @@ cat $tmp.mkfs >>$seqres.full
 echo "*** uqnoenforce, gqnoenforce, and pqnoenforce"
 _qmount_option "uqnoenforce,gqnoenforce,pqnoenforce"
 _qmount
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 _exercise uno
 _exercise gno
 _exercise pno
diff --git a/tests/xfs/330 b/tests/xfs/330
index 30c09ff5906e12..ca74929b1d26fc 100755
--- a/tests/xfs/330
+++ b/tests/xfs/330
@@ -36,6 +36,7 @@ echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
 _scratch_mount >> "$seqres.full" 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT	 # golden output encodes block usage
 HIDDEN_QUOTA_FILES=$(_xfs_calc_hidden_quota_files $SCRATCH_MNT)
 quotacheck -u -g $SCRATCH_MNT 2> /dev/null
 quotaon $SCRATCH_MNT 2> /dev/null
diff --git a/tests/xfs/434 b/tests/xfs/434
index fe609b138d732b..2dec1b084e0801 100755
--- a/tests/xfs/434
+++ b/tests/xfs/434
@@ -44,6 +44,7 @@ _scratch_mount -o noquota >> "$seqres.full" 2>&1
 
 testdir="$SCRATCH_MNT/test-$seq"
 blksz=65536
+_require_congruent_file_oplen $SCRATCH_MNT $blksz
 blks=3
 mkdir "$testdir"
 
diff --git a/tests/xfs/435 b/tests/xfs/435
index 22c02fbd1289bb..c1d6a40e00fc1f 100755
--- a/tests/xfs/435
+++ b/tests/xfs/435
@@ -35,6 +35,7 @@ _scratch_mount -o quota >> "$seqres.full" 2>&1
 
 testdir="$SCRATCH_MNT/test-$seq"
 blksz=65536
+_require_congruent_file_oplen $SCRATCH_MNT $blksz
 blks=3
 mkdir "$testdir"
 
diff --git a/tests/xfs/440 b/tests/xfs/440
index c0b6756ba97665..8c283fd28bbf9e 100755
--- a/tests/xfs/440
+++ b/tests/xfs/440
@@ -32,6 +32,9 @@ echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount "-o usrquota,grpquota" >> "$seqres.full" 2>&1
 
+# Make sure all our files are on the data device
+_xfs_force_bdev data $SCRATCH_MNT
+
 echo "Create files"
 $XFS_IO_PROG -c "cowextsize 1m" $SCRATCH_MNT
 touch $SCRATCH_MNT/a $SCRATCH_MNT/force_fsgqa
diff --git a/tests/xfs/441 b/tests/xfs/441
index ca3c576ad9cc66..a64da1d815047b 100755
--- a/tests/xfs/441
+++ b/tests/xfs/441
@@ -31,6 +31,7 @@ check_quota() {
 echo "Format and mount (noquota)"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount "-o noquota" >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT	 # _check_quota_usage uses repquota
 
 echo "Create files"
 _pwrite_byte 0x58 0 1m $SCRATCH_MNT/a >> $seqres.full
diff --git a/tests/xfs/442 b/tests/xfs/442
index 08f0aac40433ee..9bb055ce4d02de 100755
--- a/tests/xfs/442
+++ b/tests/xfs/442
@@ -60,6 +60,7 @@ _qmount_option "usrquota,grpquota,prjquota"
 # tests now have separate faster-running regression tests.
 _scratch_mkfs_sized $((1600 * 1048576)) > $seqres.full 2>&1
 _scratch_mount >> $seqres.full 2>&1
+_force_vfs_quota_testing $SCRATCH_MNT	 # _check_quota_usage uses repquota
 
 nr_cpus=$((LOAD_FACTOR * 4))
 nr_ops=$((25000 * TIME_FACTOR))
diff --git a/tests/xfs/508 b/tests/xfs/508
index 1bd13e98c9f641..df38dd3fbd50e4 100755
--- a/tests/xfs/508
+++ b/tests/xfs/508
@@ -57,6 +57,8 @@ _require_prjquota $SCRATCH_DEV
 mkdir $SCRATCH_MNT/dir
 $QUOTA_CMD -x -c 'project -s test' $SCRATCH_MNT >>$seqres.full 2>&1
 $QUOTA_CMD -x -c 'limit -p bsoft=10m bhard=20m test' $SCRATCH_MNT
+_scratch_supports_rtquota && \
+	$QUOTA_CMD -x -c 'limit -p rtbsoft=10m rtbhard=20m test' $SCRATCH_MNT
 
 # test the Project inheritance bit is a directory only flag, and it's set on
 # directory by default. Expect no complain about "project inheritance flag is
diff --git a/tests/xfs/511 b/tests/xfs/511
index a942e92e3af32d..0c7e137203ddb7 100755
--- a/tests/xfs/511
+++ b/tests/xfs/511
@@ -38,11 +38,19 @@ $XFS_IO_PROG -f -c "pwrite 0 65536" -c syncfs $SCRATCH_MNT/t/file >>$seqres.full
 quota_cmd="$XFS_QUOTA_PROG -x"
 $quota_cmd -c "project -s -p $SCRATCH_MNT/t 42" $SCRATCH_MNT >/dev/null 2>&1
 $quota_cmd -c 'limit -p isoft=53 bsoft=100m 42' $SCRATCH_MNT
+_scratch_supports_rtquota && \
+	$quota_cmd -c 'limit -p rtbsoft=100m 42' $SCRATCH_MNT
+
+# The golden output for this test was written with the assumption that the file
+# allocation unit divides 64k evenly, so the file block usage would be exactly
+# 64k.  On realtime filesystems this isn't always true (e.g. -rextsize=28k) so
+# we'll accept the space usage being the same as what du reports for the file.
+file_nblocks=$(du -B 1024 $SCRATCH_MNT/t/file | awk '{print $1}')
 
 # The itotal and size should be 53 and 102400(k), as above project quota limit.
 # The isued and used should be 2 and 64(k), as this case takes.
 df -k --output=file,itotal,iused,size,used $SCRATCH_MNT/t | \
-	_filter_scratch | _filter_spaces
+	_filter_scratch | _filter_spaces | sed -e "s|$file_nblocks$|64|"
 
 # success, all done
 status=0
diff --git a/tests/xfs/720 b/tests/xfs/720
index 97b3d2579cbd7f..565373bef71e88 100755
--- a/tests/xfs/720
+++ b/tests/xfs/720
@@ -30,6 +30,11 @@ _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
 _qmount
 
+# This test tries to exceed quota limits by creating an N>2 block bmbt, setting
+# the block limit to 2N, and rebuilding the bmbt.  Hence we must force the
+# files to be created on the data device.
+_xfs_force_bdev data $SCRATCH_MNT
+
 blocksize=$(_get_block_size $SCRATCH_MNT)
 alloc_unit=$(_get_file_block_size $SCRATCH_MNT)
 


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

* [PATCH 3/3] xfs: regression testing of quota on the realtime device
  2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
  2025-02-19  1:02   ` [PATCH 1/3] common: enable testing of realtime quota when supported Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota Darrick J. Wong
@ 2025-02-19  1:03   ` Darrick J. Wong
  2025-02-19  7:21     ` Christoph Hellwig
  2 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:03 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Make sure that quota accounting and enforcement work correctly for
realtime volumes on XFS.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1858     |  174 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1858.out |   47 ++++++++++++++
 2 files changed, 221 insertions(+)
 create mode 100755 tests/xfs/1858
 create mode 100644 tests/xfs/1858.out


diff --git a/tests/xfs/1858 b/tests/xfs/1858
new file mode 100755
index 00000000000000..64c536024f6ec0
--- /dev/null
+++ b/tests/xfs/1858
@@ -0,0 +1,174 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1858
+#
+# Functional testing for realtime quotas.
+
+. ./common/preamble
+_begin_fstest auto quick quota realtime
+
+. ./common/quota
+. ./common/filter
+
+_require_test_program "punch-alternating"
+_require_scratch
+_require_user
+
+echo "Format filesystem" | tee -a $seqres.full
+_scratch_mkfs > $seqres.full
+_try_scratch_mount -o usrquota || \
+	_notrun "Can't mount with realtime quota enabled"
+
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_scratch_supports_rtquota || _notrun "Requires realtime quota"
+
+# Make sure all our files are on the rt device
+_xfs_force_bdev realtime $SCRATCH_MNT
+chmod a+rwx $SCRATCH_MNT
+
+# Record rt geometry
+bmbt_blksz=$(_get_block_size $SCRATCH_MNT)
+file_blksz=$(_get_file_block_size $SCRATCH_MNT)
+rextsize=$((file_blksz / bmbt_blksz))
+echo "bmbt_blksz $bmbt_blksz" >> $seqres.full
+echo "file_blksz $file_blksz" >> $seqres.full
+echo "rextsize $rextsize" >> $seqres.full
+
+note() {
+	echo -e "\n$*" | tee -a $seqres.full
+}
+
+# Report on the user's block and rt block usage, soft limit, hard limit, and
+# warning count for rt volumes
+report_rtusage() {
+	local user="$1"
+	local timeout_arg="$2"
+	local print_timeout=0
+
+	test -z "$user" && user=$qa_user
+	test -n "$timeout_arg" && print_timeout=1
+
+	$XFS_QUOTA_PROG -c "quota -u -r -n -N $user" $SCRATCH_MNT | \
+		sed -e 's/ days/_days/g' >> $seqres.full
+
+	$XFS_QUOTA_PROG -c "quota -u -r -n -N $user" $SCRATCH_MNT | \
+		sed -e 's/ days/_days/g' | \
+		awk -v user=$user -v print_timeout=$print_timeout -v file_blksz=$file_blksz \
+			'{printf("%s[real] %d %d %d %d %s\n", user, $2 * 1024 / file_blksz, $3 * 1024 / file_blksz, $4 * 1024 / file_blksz, $5, print_timeout ? $6 : "---");}'
+}
+
+note "Write 128rx to root"
+$XFS_IO_PROG -f -c "pwrite 0 $((128 * file_blksz))" $SCRATCH_MNT/file1 > /dev/null
+chmod a+r $SCRATCH_MNT/file1
+_scratch_sync
+report_rtusage 0
+
+note "Write 64rx to root, 4444, and 5555."
+$XFS_IO_PROG -f -c "pwrite 0 $((64 * file_blksz))" $SCRATCH_MNT/file3.5555 > /dev/null
+chown 5555 $SCRATCH_MNT/file3.5555
+$XFS_IO_PROG -f -c "pwrite 0 $((64 * file_blksz))" $SCRATCH_MNT/file3.4444 > /dev/null
+chown 4444 $SCRATCH_MNT/file3.4444
+$XFS_IO_PROG -f -c "pwrite 0 $((64 * file_blksz))" $SCRATCH_MNT/file3 > /dev/null
+_scratch_sync
+report_rtusage 0
+report_rtusage 4444
+report_rtusage 5555
+
+note "Move 64rx from root to 5555"
+chown 5555 $SCRATCH_MNT/file3
+report_rtusage 0
+report_rtusage 4444
+report_rtusage 5555
+
+note "Move 64rx from 5555 to 4444"
+chown 4444 $SCRATCH_MNT/file3
+report_rtusage 0
+report_rtusage 4444
+report_rtusage 5555
+
+note "Set hard limit of 1024rx and check enforcement"
+$XFS_QUOTA_PROG -x -c "limit -u rtbhard=$((1024 * file_blksz)) $qa_user" $SCRATCH_MNT
+# fsync (-w) after pwrite because enforcement only begins when space usage is
+# committed.  If delalloc is enabled, this doesn't happen until writeback.
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w 0 $((2048 * file_blksz))' $SCRATCH_MNT/file2"
+report_rtusage
+
+note "Set soft limit of 512rx and check timelimit enforcement"
+rm -f $SCRATCH_MNT/file2 $SCRATCH_MNT/file2.1
+period=6	# seconds
+$XFS_QUOTA_PROG -x \
+	-c "limit -u rtbsoft=$((512 * file_blksz)) rtbhard=0 $qa_user" \
+	-c "timer -u -r -d $period" \
+	-c 'state -u' $SCRATCH_MNT >> $seqres.full
+
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w 0 $((512 * file_blksz))' $SCRATCH_MNT/file2" > /dev/null
+report_rtusage
+
+overflow=$(date +%s)
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w -b $file_blksz 0 $file_blksz' $SCRATCH_MNT/file2.1" > /dev/null
+report_rtusage
+sleep $((period / 2))
+note "Try again after $((period / 2))s"
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w -b $file_blksz $file_blksz $file_blksz' $SCRATCH_MNT/file2.1" > /dev/null
+report_rtusage
+sleep $period
+note "Try again after another ${period}s"
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w -b $file_blksz $((2 * file_blksz)) $file_blksz' $SCRATCH_MNT/file2.1" > /dev/null
+report_rtusage
+
+note "Extend time limits and warnings"
+rm -f $SCRATCH_MNT/file2 $SCRATCH_MNT/file2.1
+$XFS_QUOTA_PROG -x \
+	-c "limit -u rtbsoft=$((512 * file_blksz)) rtbhard=0 $qa_user" \
+	-c "timer -u -r -d 49h" $SCRATCH_MNT \
+	-c 'state -u' $SCRATCH_MNT >> $seqres.full
+
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w 0 $((512 * file_blksz))' $SCRATCH_MNT/file2" > /dev/null
+report_rtusage $qa_user want_timeout
+
+note "Try to trip a 2 day grace period"
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w -b $file_blksz 0 $file_blksz' $SCRATCH_MNT/file2.1" > /dev/null
+report_rtusage $qa_user want_timeout
+
+$XFS_QUOTA_PROG -x -c "timer -u -r 73h $qa_user" $SCRATCH_MNT
+
+note "Try to trip a 3 day grace period"
+_su $qa_user -c "$XFS_IO_PROG -f -c 'pwrite -w -b $file_blksz $file_blksz $file_blksz' $SCRATCH_MNT/file2.1" > /dev/null
+report_rtusage $qa_user want_timeout
+
+note "Test quota applied to bmbt"
+
+# Testing quota enforcement for bmbt shape changes is tricky.  The block
+# reservation will be for enough blocks to handle the maximal btree split.
+# This is (approximately) 9 blocks no matter the size of the existing extent
+# map structure, so we set the hard limit to one more than this quantity.
+#
+# However, that means that we need to make a file of at least twice that size
+# to ensure that we create enough extent records even in the rextsize==1 case
+# where punching doesn't just create unwritten records.
+#
+# Unfortunately, it's very difficult to predict when exactly the EDQUOT will
+# come down, so we just look for the error message.
+extent_records=$(( (25 * bmbt_blksz) / 16))
+echo "extent_records $extent_records" >> $seqres.full
+
+rm -f $SCRATCH_MNT/file2
+$XFS_QUOTA_PROG -x \
+	-c "limit -u rtbsoft=0 rtbhard=0 $qa_user" \
+	-c "limit -u bhard=$((bmbt_blksz * 10)) bsoft=0 $qa_user" \
+	-c 'state -u' $SCRATCH_MNT >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x58 -b 64m 0 $((extent_records * file_blksz))" $SCRATCH_MNT/file2 > /dev/null
+_scratch_sync
+chown $qa_user $SCRATCH_MNT/file2
+$here/src/punch-alternating $SCRATCH_MNT/file2 2>&1 | _filter_scratch
+
+$XFS_QUOTA_PROG -c "quota -u -r -n -N $qa_user" -c "quota -u -b -n -N $qa_user" $SCRATCH_MNT >> $seqres.full
+$XFS_IO_PROG -c "bmap -e -l -p -v" $SCRATCH_MNT/file2 >> $seqres.full
+
+# success, all done
+$XFS_QUOTA_PROG -x -c 'report -a -u' -c 'report -a -u -r' $SCRATCH_MNT >> $seqres.full
+ls -latr $SCRATCH_MNT >> $seqres.full
+status=0
+exit
diff --git a/tests/xfs/1858.out b/tests/xfs/1858.out
new file mode 100644
index 00000000000000..85298618d26e0f
--- /dev/null
+++ b/tests/xfs/1858.out
@@ -0,0 +1,47 @@
+QA output created by 1858
+Format filesystem
+
+Write 128rx to root
+0[real] 128 0 0 0 ---
+
+Write 64rx to root, 4444, and 5555.
+0[real] 192 0 0 0 ---
+4444[real] 64 0 0 0 ---
+5555[real] 64 0 0 0 ---
+
+Move 64rx from root to 5555
+0[real] 128 0 0 0 ---
+4444[real] 64 0 0 0 ---
+5555[real] 128 0 0 0 ---
+
+Move 64rx from 5555 to 4444
+0[real] 128 0 0 0 ---
+4444[real] 128 0 0 0 ---
+5555[real] 64 0 0 0 ---
+
+Set hard limit of 1024rx and check enforcement
+pwrite: Disk quota exceeded
+fsgqa[real] 1024 0 1024 0 ---
+
+Set soft limit of 512rx and check timelimit enforcement
+fsgqa[real] 512 512 0 0 ---
+fsgqa[real] 513 512 0 0 ---
+
+Try again after 3s
+fsgqa[real] 514 512 0 0 ---
+
+Try again after another 6s
+pwrite: Disk quota exceeded
+fsgqa[real] 514 512 0 0 ---
+
+Extend time limits and warnings
+fsgqa[real] 512 512 0 0 [--------]
+
+Try to trip a 2 day grace period
+fsgqa[real] 513 512 0 0 [2_days]
+
+Try to trip a 3 day grace period
+fsgqa[real] 514 512 0 0 [3_days]
+
+Test quota applied to bmbt
+SCRATCH_MNT/file2: Disk quota exceeded


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

* [PATCH 1/1] common: test statfs reporting with project quota
  2025-02-19  0:48 ` [PATCHSET 09/12] fstests: check new 6.14 behaviors Darrick J. Wong
@ 2025-02-19  1:03   ` Darrick J. Wong
  2025-02-19  7:22     ` Christoph Hellwig
  0 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:03 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Create a test to check that statfs on a directory tree with a project
quota will report the quota limit and available blocks; and that the
available blocks reported doesn't exceed that of the whole filesystem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/generic/1955     |  114 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/1955.out |   13 +++++
 2 files changed, 127 insertions(+)
 create mode 100755 tests/generic/1955
 create mode 100644 tests/generic/1955.out


diff --git a/tests/generic/1955 b/tests/generic/1955
new file mode 100755
index 00000000000000..e431b3c4e3fd5d
--- /dev/null
+++ b/tests/generic/1955
@@ -0,0 +1,114 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1955
+#
+# Make sure that statfs reporting works when project quotas are set on a
+# directory tree.
+#
+. ./common/preamble
+_begin_fstest auto quota
+
+_fixed_by_git_commit kernel XXXXXXXXXXXXXX \
+	"xfs: don't over-report free space or inodes in statvfs"
+
+. ./common/filter
+. ./common/quota
+
+_require_quota
+_require_scratch
+_require_xfs_io_command 'chproj'
+_require_xfs_io_command "falloc"
+
+_scratch_mkfs >$seqres.full 2>&1
+_scratch_enable_pquota
+_qmount_option "prjquota"
+_qmount
+_force_vfs_quota_testing $SCRATCH_MNT
+_require_prjquota $SCRATCH_DEV
+
+mkdir $SCRATCH_MNT/dir
+
+bsize() {
+	$XFS_IO_PROG -c 'statfs' $1 | grep f_bsize | awk '{print $3}'
+}
+
+blocks() {
+	$XFS_IO_PROG -c 'statfs' $1 | grep f_blocks | awk '{print $3}'
+}
+
+bavail() {
+	$XFS_IO_PROG -c 'statfs' $1 | grep f_bavail | awk '{print $3}'
+}
+
+bsize=$(bsize $SCRATCH_MNT)
+orig_bavail=$(bavail $SCRATCH_MNT)
+orig_blocks=$(blocks $SCRATCH_MNT)
+
+# Set a project quota limit of half the free space, make sure both report the
+# same number of blocks
+pquot_limit=$(( orig_bavail / 2 ))
+setquota -P 55 0 $((pquot_limit * bsize / 1024))K 0 0 $SCRATCH_DEV
+$XFS_IO_PROG -c 'chproj 55' -c 'chattr +P' $SCRATCH_MNT/dir
+
+# check statfs reporting
+fs_blocks=$(blocks $SCRATCH_MNT)
+dir_blocks=$(blocks $SCRATCH_MNT/dir)
+
+_within_tolerance "root blocks1" $fs_blocks $orig_blocks 1% -v
+_within_tolerance "dir blocks1" $dir_blocks $pquot_limit 1% -v
+
+fs_bavail=$(bavail $SCRATCH_MNT)
+expected_dir_bavail=$pquot_limit
+dir_bavail=$(bavail $SCRATCH_MNT/dir)
+
+_within_tolerance "root bavail1" $fs_bavail $orig_bavail 1% -v
+_within_tolerance "dir bavail1" $dir_bavail $expected_dir_bavail 1% -v
+
+# use up most of the free space in the filesystem
+rem_free=$(( orig_bavail / 10 ))	# bsize blocks
+fallocate -l $(( (orig_bavail - rem_free) * bsize )) $SCRATCH_MNT/a
+
+if [ $rem_free -gt $pquot_limit ]; then
+	echo "rem_free $rem_free greater than pquot_limit $pquot_limit??"
+fi
+
+# check statfs reporting
+fs_blocks=$(blocks $SCRATCH_MNT)
+dir_blocks=$(blocks $SCRATCH_MNT/dir)
+
+_within_tolerance "root blocks2" $fs_blocks $orig_blocks 1% -v
+_within_tolerance "dir blocks2" $dir_blocks $pquot_limit 1% -v
+
+fs_bavail=$(bavail $SCRATCH_MNT)
+dir_bavail=$(bavail $SCRATCH_MNT/dir)
+
+_within_tolerance "root bavail2" $fs_bavail $rem_free 1% -v
+_within_tolerance "dir bavail2" $dir_bavail $rem_free 1% -v
+
+# use up 10 blocks of project quota
+$XFS_IO_PROG -f -c "pwrite -S 0x99 0 $((bsize * 10))" -c fsync $SCRATCH_MNT/dir/a >> $seqres.full
+
+# check statfs reporting
+fs_blocks=$(blocks $SCRATCH_MNT)
+dir_blocks=$(blocks $SCRATCH_MNT/dir)
+
+_within_tolerance "root blocks3" $fs_blocks $orig_blocks 1% -v
+_within_tolerance "dir blocks3" $dir_blocks $pquot_limit 1% -v
+
+fs_bavail=$(bavail $SCRATCH_MNT)
+dir_bavail=$(bavail $SCRATCH_MNT/dir)
+
+_within_tolerance "root bavail3" $fs_bavail $rem_free 1% -v
+_within_tolerance "dir bavail3" $dir_bavail $((rem_free - 10)) 1% -v
+
+# final state diagnostics
+$XFS_IO_PROG -c 'statfs' $SCRATCH_MNT $SCRATCH_MNT/dir | grep statfs >> $seqres.full
+repquota -P $SCRATCH_DEV >> $seqres.full
+df $SCRATCH_MNT >> $seqres.full
+ls -laR $SCRATCH_MNT/ >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/1955.out b/tests/generic/1955.out
new file mode 100644
index 00000000000000..3601010962193e
--- /dev/null
+++ b/tests/generic/1955.out
@@ -0,0 +1,13 @@
+QA output created by 1955
+root blocks1 is in range
+dir blocks1 is in range
+root bavail1 is in range
+dir bavail1 is in range
+root blocks2 is in range
+dir blocks2 is in range
+root bavail2 is in range
+dir bavail2 is in range
+root blocks3 is in range
+dir blocks3 is in range
+root bavail3 is in range
+dir bavail3 is in range


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

* [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
@ 2025-02-19  1:03   ` Darrick J. Wong
  2025-02-19  7:24     ` Christoph Hellwig
  2025-02-19  1:04   ` [PATCH 02/13] xfs/336: port to common/metadump Darrick J. Wong
                     ` (11 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:03 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The realtime rmap tests were added to fstests a long time ago.  Since
they were added, we decided to create a metadata file directory
structure instead of adding more fields to the superblock.  Therefore,
fix all the tests that try to access these paths.

While we're at it, fix xfs/409 to run the *online* scrub program like
it's supposed to.  xfs/408 is the fuzzer for xfs_repair testing.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs        |   41 +++++++++++++++++++++++++++++++++++++++++
 tests/xfs/122.out |    1 -
 tests/xfs/333     |   43 -------------------------------------------
 tests/xfs/333.out |    6 ------
 tests/xfs/337     |    2 +-
 tests/xfs/338     |   30 +++++++++++++++++++++++++-----
 tests/xfs/339     |    5 +++--
 tests/xfs/340     |   25 ++++++++++++++++++++-----
 tests/xfs/341     |    2 +-
 tests/xfs/342     |    4 ++--
 10 files changed, 93 insertions(+), 66 deletions(-)
 delete mode 100755 tests/xfs/333
 delete mode 100644 tests/xfs/333.out


diff --git a/common/xfs b/common/xfs
index adad37ea0710e0..1a0ececde39422 100644
--- a/common/xfs
+++ b/common/xfs
@@ -2135,3 +2135,44 @@ _require_xfs_rtquota_if_rtdev() {
 		_notrun "Quotas probably not supported on realtime scratch device; set TEST_RTDEV"
 	fi
 }
+
+# Resolve a metadata directory tree path and return the inode number.
+_scratch_metadir_lookup() {
+	local res="$(_scratch_xfs_db -c "ls -i -m $1")"
+	test "${PIPESTATUS[0]}" -eq 0 && echo "$res"
+}
+
+# Figure out which directory entry we have to change to update the rtrmap
+# inode pointer.  The last line of output is inumber field within a metadata
+# object; any previous lines are the accessor commands that must be fed to
+# xfs_db to get to the correct directory block.
+_scratch_find_rt_metadir_entry() {
+	local sfkey="$(_scratch_xfs_db -c 'path -m /rtgroups' -c print | \
+		grep "\"$1\"" | \
+		sed -e 's/.name.*$//g' -e 's/\[/\\[/g' -e 's/\]/\\]/g' )"
+	if [ -n "$sfkey" ]; then
+		echo 'path -m /rtgroups'
+		_scratch_xfs_db -c 'path -m /rtgroups' -c print | \
+			grep "${sfkey}.inumber" | awk '{print $1}'
+		return 0
+	fi
+
+	local size=$(_scratch_xfs_db -c 'path -m /rtgroups' -c 'print core.size' | awk '{print $3}')
+	local blksz=$(_scratch_xfs_db -c 'sb 0' -c 'print blocksize' | awk '{print $3}')
+	local dirblklog=$(_scratch_xfs_db -c 'sb 0' -c 'print dirblklog' | awk '{print $3}')
+	local dirblksz=$((blksz << dirblklog ))
+	for ((fileoff = 0; fileoff < (size / dirblksz); fileoff++)); do
+		local dbkey="$(_scratch_xfs_db -c 'path -m /rtgroups' -c "dblock $fileoff" -c 'print' | \
+			grep "\"$1\"" | \
+			sed -e 's/.name.*$//g' -e 's/\[/\\[/g' -e 's/\]/\\]/g' )"
+		if [ -n "$dbkey" ]; then
+			echo 'path -m /rtgroups'
+			echo "dblock $fileoff"
+			_scratch_xfs_db -c 'path -m /rtgroups' -c "dblock $fileoff" -c print | \
+				grep "${dbkey}.inumber" | awk '{print $1}'
+			return 0
+		fi
+	done
+
+	return 1
+}
diff --git a/tests/xfs/122.out b/tests/xfs/122.out
index 4dc7d7d0a3602b..ec5028621a8e75 100644
--- a/tests/xfs/122.out
+++ b/tests/xfs/122.out
@@ -44,7 +44,6 @@ offsetof(xfs_sb_t, sb_rextents) = 24
 offsetof(xfs_sb_t, sb_rextsize) = 80
 offsetof(xfs_sb_t, sb_rextslog) = 125
 offsetof(xfs_sb_t, sb_rootino) = 56
-offsetof(xfs_sb_t, sb_rrmapino) = 264
 offsetof(xfs_sb_t, sb_rsumino) = 72
 offsetof(xfs_sb_t, sb_sectlog) = 121
 offsetof(xfs_sb_t, sb_sectsize) = 102
diff --git a/tests/xfs/333 b/tests/xfs/333
deleted file mode 100755
index f68f2f01320420..00000000000000
--- a/tests/xfs/333
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2016, Oracle and/or its affiliates.  All Rights Reserved.
-#
-# FS QA Test No. 333
-#
-# Set rrmapino to another inode on an non-rt rmap fs and see if repair fixes it.
-#
-. ./common/preamble
-_begin_fstest auto quick rmap realtime
-
-# Import common functions.
-. ./common/filter
-
-_require_xfs_scratch_rmapbt
-_disable_dmesg_check
-
-rm -f "$seqres.full"
-
-unset SCRATCH_RTDEV
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-rrmapino="$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' 2>&1)"
-test "${rrmapino}" = "field rrmapino not found" && _notrun "realtime rmapbt not supported"
-_scratch_mount
-
-echo "Create some files"
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
-echo garbage > $SCRATCH_MNT/f3
-ino=$(stat -c '%i' $SCRATCH_MNT/f3)
-_scratch_unmount
-
-echo "Corrupt fs"
-_scratch_xfs_db -x -c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
-_try_scratch_mount 2>&1 | _filter_error_mount
-
-echo "Test done, mount should have failed"
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/333.out b/tests/xfs/333.out
deleted file mode 100644
index b3c698750f8fb1..00000000000000
--- a/tests/xfs/333.out
+++ /dev/null
@@ -1,6 +0,0 @@
-QA output created by 333
-Format and mount
-Create some files
-Corrupt fs
-mount: Structure needs cleaning
-Test done, mount should have failed
diff --git a/tests/xfs/337 b/tests/xfs/337
index 2ba508044ba16b..64429347fcba70 100755
--- a/tests/xfs/337
+++ b/tests/xfs/337
@@ -51,7 +51,7 @@ echo "+ check fs"
 _scratch_xfs_repair -n >> $seqres.full 2>&1 || echo "xfs_repair should not fail"
 
 echo "+ corrupt image"
-_scratch_xfs_db -x -c "sb" -c "addr rrmapino" -c "addr u3.rtrmapbt.ptrs[1]" \
+_scratch_xfs_db -x -c "path -m /rtgroups/0.rmap" -c "addr u3.rtrmapbt.ptrs[1]" \
 	-c "stack" -c "blocktrash -x 4096 -y 4096 -n 8 -3 -z" \
 	>> $seqres.full 2>&1
 
diff --git a/tests/xfs/338 b/tests/xfs/338
index 9648c9df485223..713a808dc8e3da 100755
--- a/tests/xfs/338
+++ b/tests/xfs/338
@@ -27,13 +27,33 @@ $XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
 _scratch_unmount
 
 echo "Corrupt fs"
-_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
-	-c 'write core.nlinkv2 0' -c 'write core.mode 0' -c 'sb 0' \
-	-c 'write rrmapino 0' >> $seqres.full
-_try_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
+readarray -t rtrmap_path < <(_scratch_find_rt_metadir_entry 0.rmap)
+
+rtrmap_accessors=()
+rtrmap_path_len="${#rtrmap_path[@]}"
+for ((i = 0; i < rtrmap_path_len - 1; i++)); do
+	rtrmap_accessors+=(-c "${rtrmap_path[i]}")
+done
+rtrmap_entry="${rtrmap_path[rtrmap_path_len - 1]}"
+test -n "$rtrmap_entry" || _fail "Could not find rtrmap metadir entry?"
+
+_scratch_xfs_db -x -c 'path -m /rtgroups/0.rmap' \
+	-c 'write core.nlinkv2 0' -c 'write core.mode 0' \
+	"${rtrmap_accessors[@]}" \
+	-c "print $rtrmap_entry" \
+	-c "write -d $rtrmap_entry 0" >> $seqres.full
+if _try_scratch_mount >> $seqres.full 2>&1; then
+       echo "mount should have failed"
+       _scratch_unmount
+else
+	# If the verifiers are working properly, the mount will fail because
+	# we fuzzed the metadata root directory.  This causes loud complaints
+	# to dmesg, so we want to ignore those.
+	_disable_dmesg_check
+fi
 
 echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
+_scratch_unmount 2>&1 | _filter_scratch | _filter_ending_dot
 _repair_scratch_fs >> $seqres.full 2>&1
 
 echo "Try to create more files (again)"
diff --git a/tests/xfs/339 b/tests/xfs/339
index 4dabe43ff298fc..caadf87987e433 100755
--- a/tests/xfs/339
+++ b/tests/xfs/339
@@ -29,7 +29,8 @@ ln $SCRATCH_MNT/f3 $SCRATCH_MNT/f4
 _scratch_unmount
 
 echo "Corrupt fs"
-rrmapino=`_scratch_xfs_get_sb_field rrmapino`
+rrmapino=$(_scratch_metadir_lookup /rtgroups/0.rmap)
+test -n "$rrmapino" || _fail "Could not find rtrmap inode?"
 _scratch_xfs_set_metadata_field "u3.sfdir3.list[3].inumber.i4" $rrmapino \
 	'sb 0' 'addr rootino' >> $seqres.full
 _scratch_mount
@@ -41,7 +42,7 @@ echo "Try to create more files"
 $XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
 
 echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
+_scratch_unmount 2>&1 | _filter_scratch | _filter_ending_dot
 _repair_scratch_fs >> $seqres.full 2>&1
 
 echo "Try to create more files (again)"
diff --git a/tests/xfs/340 b/tests/xfs/340
index 248d3233c94ed3..c4a23bcb1cfe70 100755
--- a/tests/xfs/340
+++ b/tests/xfs/340
@@ -29,16 +29,31 @@ ino=$(stat -c '%i' $SCRATCH_MNT/f3)
 _scratch_unmount
 
 echo "Corrupt fs"
-rrmapino=$(_scratch_xfs_get_sb_field rrmapino)
-_scratch_xfs_db -x -c "inode $rrmapino" \
+readarray -t rtrmap_path < <(_scratch_find_rt_metadir_entry 0.rmap)
+
+rtrmap_accessors=()
+rtrmap_path_len="${#rtrmap_path[@]}"
+for ((i = 0; i < rtrmap_path_len - 1; i++)); do
+	rtrmap_accessors+=(-c "${rtrmap_path[i]}")
+done
+rtrmap_entry="${rtrmap_path[rtrmap_path_len - 1]}"
+test -n "$rtrmap_entry" || _fail "Could not find rtrmap metadir entry?"
+
+rrmapino=$(_scratch_metadir_lookup /rtgroups/0.rmap)
+test -n "$rrmapino" || _fail "Could not find rtrmap inode?"
+_scratch_xfs_db -x -c "path -m /rtgroups/0.rmap" \
 	-c 'write core.format 2' -c 'write core.size 0' \
-	-c 'write core.nblocks 0' -c 'sb 0' -c 'addr rootino' \
+	-c 'write core.nblocks 0' \
+	-c 'sb 0' -c 'addr rootino' \
+	-c "print u3.sfdir3.list[2].inumber" \
 	-c "write u3.sfdir3.list[2].inumber.i4 $rrmapino" \
-	-c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
+	"${rtrmap_accessors[@]}" \
+	-c "print $rtrmap_entry" \
+	-c "write $rtrmap_entry $ino" >> $seqres.full
 _try_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
 
 echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
+_scratch_unmount 2>&1 | _filter_scratch | _filter_ending_dot
 _repair_scratch_fs >> $seqres.full 2>&1
 
 echo "Try to create more files (again)"
diff --git a/tests/xfs/341 b/tests/xfs/341
index 9b12febf8d5c49..e9aea42f429ffd 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -51,7 +51,7 @@ echo "Corrupt fs"
 fsbno=$(_scratch_xfs_db -c "inode $ino" -c 'bmap' | grep 'flag 0' | head -n 1 | \
 	sed -e 's/^.*startblock \([0-9]*\) .*$/\1/g')
 
-_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
+_scratch_xfs_db -x -c 'path -m /rtgroups/0.rmap' \
 	-c "write u3.rtrmapbt.ptrs[1] $fsbno" -c 'p' >> $seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/342 b/tests/xfs/342
index 5c0e916dbe32ac..3bf353dd79b29b 100755
--- a/tests/xfs/342
+++ b/tests/xfs/342
@@ -45,9 +45,9 @@ ino=$(stat -c '%i' $SCRATCH_MNT/f3)
 _scratch_unmount
 
 echo "Corrupt fs"
-_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' -c 'p u3.rtrmapbt.ptrs[1]' >> $seqres.full
+_scratch_xfs_db -c 'path -m /rtgroups/0.rmap' -c 'p u3.rtrmapbt.ptrs[1]' >> $seqres.full
 
-fsbno=$(_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' \
+fsbno=$(_scratch_xfs_db -c 'path -m /rtgroups/0.rmap' \
 	-c 'p u3.rtrmapbt.ptrs[1]' | sed -e 's/^.*://g')
 _scratch_xfs_db -x -c "inode $ino" -c "write u3.bmx[0].startblock $fsbno" >> $seqres.full
 _scratch_mount


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

* [PATCH 02/13] xfs/336: port to common/metadump
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode Darrick J. Wong
@ 2025-02-19  1:04   ` Darrick J. Wong
  2025-02-19  7:24     ` Christoph Hellwig
  2025-02-19  1:04   ` [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file Darrick J. Wong
                     ` (10 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:04 UTC (permalink / raw)
  To: zlang, djwong; +Cc: fstests, hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

xfs/336 does this somewhat sketchy thing where it mdrestores into a
regular file, and then does this to validate the restored metadata:

SCRATCH_DEV=$TEST_DIR/image _scratch_mount

Unfortunately, commit 1a49022fab9b4d causes the following regression:

 --- /tmp/fstests/tests/xfs/336.out      2024-11-12 16:17:36.733447713 -0800
 +++ /var/tmp/fstests/xfs/336.out.bad    2025-01-04 19:10:39.861871114 -0800
 @@ -5,4 +5,5 @@ Create big file
  Explode the rtrmapbt
  Create metadump file
  Restore metadump
 -Check restored fs
 +Usage: _set_fs_sysfs_attr <mounted_device> <attr> <content>
 +(see /var/tmp/fstests/xfs/336.full for details)

This is due to the fact that SCRATCH_DEV is temporarily reassigned to
the regular file.  That path is passed straight through _scratch_mount
to _xfs_prepare_for_eio_shutdown, but that helper _fails because the
"dev" argument isn't actually a path to a block device.

Fix this by porting it to the new common/metadump code that we merged
last year.

Cc: <fstests@vger.kernel.org> # v2024.12.08
Fixes: 1a49022fab9b4d ("fstests: always use fail-at-unmount semantics for XFS")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/336     |   34 +++++++++++-----------------------
 tests/xfs/336.out |    4 +---
 2 files changed, 12 insertions(+), 26 deletions(-)


diff --git a/tests/xfs/336 b/tests/xfs/336
index 3f85429ea77ee6..61bc08d3cc818f 100755
--- a/tests/xfs/336
+++ b/tests/xfs/336
@@ -9,21 +9,22 @@
 . ./common/preamble
 _begin_fstest auto rmap realtime metadump prealloc
 
-# Override the default cleanup function.
 _cleanup()
 {
 	cd /
-	rm -rf "$tmp".* $metadump_file
+	rm -rf "$tmp".*
+	_xfs_cleanup_verify_metadump
 }
 
-# Import common functions.
 . ./common/filter
+. ./common/metadump
 
 _require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore"
 _require_realtime
 _require_xfs_scratch_rmapbt
 _require_test_program "punch-alternating"
 _require_xfs_io_command "falloc"
+_xfs_setup_verify_metadump
 
 rm -f "$seqres.full"
 
@@ -34,16 +35,13 @@ cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
 blksz="$(_get_file_block_size $SCRATCH_MNT)"
 
-metadump_file=$TEST_DIR/${seq}_metadump
-rm -rf $metadump_file
-
 echo "Create a three-level rtrmapbt"
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+# inode core size is at least 176 bytes; btree block header is 64 bytes;
+# rtrmap record is 24 bytes; and rtrmap key/pointer are 48 bytes.
 i_core_size="$(_xfs_get_inode_core_bytes $SCRATCH_MNT)"
-i_ptrs=$(( (isize - i_core_size) / 56 ))
-bt_ptrs=$(( (blksz - 56) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
+i_ptrs=$(( (isize - i_core_size) / 48 ))
+bt_ptrs=$(( (blksz - 64) / 48 ))
+bt_recs=$(( (blksz - 64) / 24 ))
 
 blocks=$((i_ptrs * bt_ptrs * bt_recs))
 _require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
@@ -56,20 +54,10 @@ $XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCR
 echo "Explode the rtrmapbt"
 $here/src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
 $here/src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-_scratch_cycle_mount
-
-echo "Create metadump file"
 _scratch_unmount
-_scratch_xfs_metadump $metadump_file -a -o
 
-# Now restore the obfuscated one back and take a look around
-echo "Restore metadump"
-SCRATCH_DEV=$TEST_DIR/image _scratch_xfs_mdrestore $metadump_file
-SCRATCH_DEV=$TEST_DIR/image _scratch_mount
-SCRATCH_DEV=$TEST_DIR/image _scratch_unmount
-
-echo "Check restored fs"
-_check_scratch_fs $TEST_DIR/image
+echo "Test metadump"
+_xfs_verify_metadumps '-a -o'
 
 # success, all done
 status=0
diff --git a/tests/xfs/336.out b/tests/xfs/336.out
index aa61973da3e844..aeaffcbbbbd13b 100644
--- a/tests/xfs/336.out
+++ b/tests/xfs/336.out
@@ -3,6 +3,4 @@ Format and mount
 Create a three-level rtrmapbt
 Create big file
 Explode the rtrmapbt
-Create metadump file
-Restore metadump
-Check restored fs
+Test metadump


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

* [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
  2025-02-19  1:03   ` [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode Darrick J. Wong
  2025-02-19  1:04   ` [PATCH 02/13] xfs/336: port to common/metadump Darrick J. Wong
@ 2025-02-19  1:04   ` Darrick J. Wong
  2025-02-19  7:25     ` Christoph Hellwig
  2025-02-19  1:04   ` [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair Darrick J. Wong
                     ` (9 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:04 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The fs population code creates a realtime rmap btree in /some/ realtime
group with at least two levels.  This rmapbt file isn't necessarily the
one for group 0, so we need to find it programmatically.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs    |   33 +++++++++++++++++++++++++++++++++
 tests/xfs/406 |    6 ++++--
 tests/xfs/407 |    6 ++++--
 tests/xfs/408 |    7 +++++--
 tests/xfs/409 |    7 +++++--
 tests/xfs/481 |    6 ++++--
 tests/xfs/482 |    7 +++++--
 7 files changed, 60 insertions(+), 12 deletions(-)


diff --git a/common/xfs b/common/xfs
index 1a0ececde39422..1be8cbf1c563d9 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1827,6 +1827,39 @@ _scratch_xfs_find_agbtree_height() {
 	return 1
 }
 
+# Find us the path to the inode containing a realtime btree with a specific
+# height.
+_scratch_xfs_find_rgbtree_height() {
+	local bt_type="$1"
+	local bt_height="$2"
+	local rgcount=$(_xfs_mount_rgcount $SCRATCH_DEV)
+	local path
+	local path_format
+	local bt_prefix
+
+	case "${bt_type}" in
+	"rmap")
+		path_format="/rtgroups/%u.rmap"
+		bt_prefix="u3.rtrmapbt"
+		;;
+	*)
+		_fail "Don't know about rt btree ${bt_type}"
+		;;
+	esac
+
+	for ((rgno = 0; rgno < rgcount; rgno++)); do
+		path="$(printf "${path_format}" "${rgno}")"
+		bt_level=$(_scratch_xfs_db -c "path -m ${path}" -c "p ${bt_prefix}.level" | awk '{print $3}')
+		# "level" is the actual level within the btree
+		if [ "${bt_level}" -eq "$((bt_height - 1))" ]; then
+			echo "${path}"
+			return 0
+		fi
+	done
+
+	return 1
+}
+
 _require_xfs_mkfs_atomicswap()
 {
 	# atomicswap can be activated on rmap or reflink filesystems.
diff --git a/tests/xfs/406 b/tests/xfs/406
index 7a6e8bdb535237..0219f4a2f2562e 100755
--- a/tests/xfs/406
+++ b/tests/xfs/406
@@ -24,10 +24,12 @@ _require_scratch_xfs_fuzz_fields
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
-inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'sb 0' 'addr rrmapino')
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
 
 echo "Fuzz rtrmapbt recs"
-_scratch_xfs_fuzz_metadata '' 'offline' 'sb 0' 'addr rrmapino' "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
+_scratch_xfs_fuzz_metadata '' 'offline' "path -m $path" "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
 echo "Done fuzzing rtrmapbt recs"
 
 # success, all done
diff --git a/tests/xfs/407 b/tests/xfs/407
index 035578b97b4793..1eff49218a86bf 100755
--- a/tests/xfs/407
+++ b/tests/xfs/407
@@ -24,10 +24,12 @@ _require_scratch_xfs_fuzz_fields
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
-inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'sb 0' 'addr rrmapino')
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 1)" || \
+	_fail "could not find two-level rtrmapbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
 
 echo "Fuzz rtrmapbt recs"
-_scratch_xfs_fuzz_metadata '' 'online' 'sb 0' 'addr rrmapino' "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
+_scratch_xfs_fuzz_metadata '' 'online' "path -m $path" "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
 echo "Done fuzzing rtrmapbt recs"
 
 # success, all done
diff --git a/tests/xfs/408 b/tests/xfs/408
index 3c7d16f0e6c6b7..1d41fd0923ae4a 100755
--- a/tests/xfs/408
+++ b/tests/xfs/408
@@ -4,7 +4,7 @@
 #
 # FS QA Test No. 408
 #
-# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
+# Populate a XFS filesystem and fuzz every rtrmapbt key/pointer field.
 # Use xfs_repair to fix the corruption.
 #
 . ./common/preamble
@@ -24,8 +24,11 @@ _require_scratch_xfs_fuzz_fields
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+
 echo "Fuzz rtrmapbt keyptrs"
-_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' 'sb 0' 'addr rrmapino' >> $seqres.full
+_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' "path -m $path" >> $seqres.full
 echo "Done fuzzing rtrmapbt keyptrs"
 
 # success, all done
diff --git a/tests/xfs/409 b/tests/xfs/409
index f3885e56010daa..f863b3bd4530ce 100755
--- a/tests/xfs/409
+++ b/tests/xfs/409
@@ -4,7 +4,7 @@
 #
 # FS QA Test No. 409
 #
-# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
+# Populate a XFS filesystem and fuzz every rtrmapbt key/pointer field.
 # Use xfs_scrub to fix the corruption.
 #
 . ./common/preamble
@@ -24,8 +24,11 @@ _require_scratch_xfs_fuzz_fields
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+
 echo "Fuzz rtrmapbt keyptrs"
-_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' 'sb 0' 'addr rrmapino' >> $seqres.full
+_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'online' "path -m $path" >> $seqres.full
 echo "Done fuzzing rtrmapbt keyptrs"
 
 # success, all done
diff --git a/tests/xfs/481 b/tests/xfs/481
index 43eb14aafb2903..a3010a76177957 100755
--- a/tests/xfs/481
+++ b/tests/xfs/481
@@ -25,10 +25,12 @@ _disable_dmesg_check
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
-inode_ver=$(_scratch_xfs_get_metadata_field "core.version" 'sb 0' 'addr rrmapino')
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
 
 echo "Fuzz rtrmapbt recs"
-_scratch_xfs_fuzz_metadata '' 'none' 'sb 0' 'addr rrmapino' "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
+_scratch_xfs_fuzz_metadata '' 'none' "path -m $path" "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
 echo "Done fuzzing rtrmapbt recs"
 
 # success, all done
diff --git a/tests/xfs/482 b/tests/xfs/482
index 2b08b9aab2bb01..d0386448564b7c 100755
--- a/tests/xfs/482
+++ b/tests/xfs/482
@@ -4,7 +4,7 @@
 #
 # FS QA Test No. 482
 #
-# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
+# Populate a XFS filesystem and fuzz every rtrmapbt key/pointer field.
 # Do not fix the filesystem, to test metadata verifiers.
 
 . ./common/preamble
@@ -25,8 +25,11 @@ _disable_dmesg_check
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+
 echo "Fuzz rtrmapbt keyptrs"
-_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' 'sb 0' 'addr rrmapino' >> $seqres.full
+_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' "path -m $path" >> $seqres.full
 echo "Done fuzzing rtrmapbt keyptrs"
 
 # success, all done


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

* [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  1:04   ` [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file Darrick J. Wong
@ 2025-02-19  1:04   ` Darrick J. Wong
  2025-02-19  7:26     ` Christoph Hellwig
  2025-02-19  1:04   ` [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device Darrick J. Wong
                     ` (8 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:04 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Race checking and rebuilding realtime rmap btrees with fsstress.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1817     |   39 +++++++++++++++++++++++++++++++++++++++
 tests/xfs/1817.out |    2 ++
 tests/xfs/1821     |   45 +++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1821.out |    2 ++
 tests/xfs/1857     |   39 +++++++++++++++++++++++++++++++++++++++
 tests/xfs/1857.out |    2 ++
 tests/xfs/1893     |    2 +-
 7 files changed, 130 insertions(+), 1 deletion(-)
 create mode 100755 tests/xfs/1817
 create mode 100644 tests/xfs/1817.out
 create mode 100755 tests/xfs/1821
 create mode 100644 tests/xfs/1821.out
 create mode 100755 tests/xfs/1857
 create mode 100644 tests/xfs/1857.out


diff --git a/tests/xfs/1817 b/tests/xfs/1817
new file mode 100755
index 00000000000000..501aa2c8611196
--- /dev/null
+++ b/tests/xfs/1817
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1817
+#
+# Race fsstress and rtrmapbt scrub for a while to see if we crash or livelock.
+#
+. ./common/preamble
+_begin_fstest scrub fsstress_scrub
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" rmapbt
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_scrub -s "scrub rtrmapbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1817.out b/tests/xfs/1817.out
new file mode 100644
index 00000000000000..525ec14ed0f057
--- /dev/null
+++ b/tests/xfs/1817.out
@@ -0,0 +1,2 @@
+QA output created by 1817
+Silence is golden
diff --git a/tests/xfs/1821 b/tests/xfs/1821
new file mode 100755
index 00000000000000..3104dc7d9e5f37
--- /dev/null
+++ b/tests/xfs/1821
@@ -0,0 +1,45 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1821
+#
+# Race fsstress and realtime bitmap repair for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+if _xfs_has_feature "$SCRATCH_MNT" rtgroups; then
+	_scratch_xfs_stress_online_repair -s "repair rtbitmap %rgno%"
+elif xfs_io -c 'help scrub' | grep -q rgsuper; then
+	_scratch_xfs_stress_online_repair -s "repair rtbitmap 0"
+else
+	_scratch_xfs_stress_online_repair -s "repair rtbitmap"
+fi
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1821.out b/tests/xfs/1821.out
new file mode 100644
index 00000000000000..0f18ad5d88ca70
--- /dev/null
+++ b/tests/xfs/1821.out
@@ -0,0 +1,2 @@
+QA output created by 1821
+Silence is golden
diff --git a/tests/xfs/1857 b/tests/xfs/1857
new file mode 100755
index 00000000000000..d07559f3974062
--- /dev/null
+++ b/tests/xfs/1857
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1857
+#
+# Race fsstress and rtrmapbt repair for a while to see if we crash or livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" rmapbt
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_online_repair -s "repair rtrmapbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1857.out b/tests/xfs/1857.out
new file mode 100644
index 00000000000000..b51ffd3f6cdd53
--- /dev/null
+++ b/tests/xfs/1857.out
@@ -0,0 +1,2 @@
+QA output created by 1857
+Silence is golden
diff --git a/tests/xfs/1893 b/tests/xfs/1893
index d06687fa2a1087..1f04da0028a12a 100755
--- a/tests/xfs/1893
+++ b/tests/xfs/1893
@@ -46,7 +46,7 @@ done
 
 # Metapath verbs that take a rt group number
 for ((rgno = 0; rgno < rgcount; rgno++)); do
-	for v in rtbitmap rtsummary; do
+	for v in rtbitmap rtsummary rtrmapbt; do
 		testio=$(try_verb "$v" "$rgno")
 		test -z "$testio" && verbs+=("$v $rgno")
 	done


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

* [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  1:04   ` [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair Darrick J. Wong
@ 2025-02-19  1:04   ` Darrick J. Wong
  2025-02-19  7:27     ` Christoph Hellwig
  2025-02-19  1:05   ` [PATCH 06/13] xfs/341: update test for rtgroup-based rmap Darrick J. Wong
                     ` (7 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:04 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Various tests of realtime rmap functionality assumed that the data
device could be picked out from the GETFSMAP output by looking for
static fs metadata.  This is no longer true, since rtgroups filesystems
write a superblock header at the start of the rt device, so update these
tests.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/272 |    2 +-
 tests/xfs/276 |    2 +-
 tests/xfs/277 |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/tests/xfs/272 b/tests/xfs/272
index 3e3ceec512421d..1d0edf67600aa5 100755
--- a/tests/xfs/272
+++ b/tests/xfs/272
@@ -55,7 +55,7 @@ cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total c
 done
 
 echo "Check device field of FS metadata and regular file"
-data_dev=$(grep 'static fs metadata' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
+data_dev=$(grep 'inode btree' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 rt_dev=$(grep "${ino}[[:space:]]*[0-9]*\.\.[0-9]*" $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 test "${data_dev}" = "${rt_dev}" || echo "data ${data_dev} realtime ${rt_dev}?"
 
diff --git a/tests/xfs/276 b/tests/xfs/276
index 69de69d86cda9c..b675e79b249a5b 100755
--- a/tests/xfs/276
+++ b/tests/xfs/276
@@ -59,7 +59,7 @@ cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total c
 done
 
 echo "Check device field of FS metadata and realtime file"
-data_dev=$(grep 'static fs metadata' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
+data_dev=$(grep 'inode btree' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 rt_dev=$(grep "${ino}[[:space:]]*[0-9]*\.\.[0-9]*[[:space:]]*[0-9]*$" $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 test "${data_dev}" != "${rt_dev}" || echo "data ${data_dev} realtime ${rt_dev}?"
 
diff --git a/tests/xfs/277 b/tests/xfs/277
index 5cb44c33e81570..87423b96454fa4 100755
--- a/tests/xfs/277
+++ b/tests/xfs/277
@@ -36,7 +36,7 @@ $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT >> $seqres.full
 $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT | tr '[]()' '    ' > $TEST_DIR/fsmap
 
 echo "Check device field of FS metadata and journalling log"
-data_dev=$(grep 'static fs metadata' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
+data_dev=$(grep 'inode btree' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 journal_dev=$(grep 'journalling log' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
 test "${data_dev}" = "${journal_dev}" || echo "data ${data_dev} journal ${journal_dev}?"
 


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

* [PATCH 06/13] xfs/341: update test for rtgroup-based rmap
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (4 preceding siblings ...)
  2025-02-19  1:04   ` [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device Darrick J. Wong
@ 2025-02-19  1:05   ` Darrick J. Wong
  2025-02-19  7:27     ` Christoph Hellwig
  2025-02-19  1:05   ` [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1 Darrick J. Wong
                     ` (6 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:05 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that we're sharding the realtime volume into multiple allocation
groups, update this test to reflect the new reality.  The realtime rmap
btree record and key sizes have shrunk, and we can't guarantee that a
quick file write actually hits the same rt group as the one we fuzzed,
so eliminate the file write test since we're really only curious if
xfs_repair will fix the problem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/341     |   10 +++-------
 tests/xfs/341.out |    1 -
 2 files changed, 3 insertions(+), 8 deletions(-)


diff --git a/tests/xfs/341 b/tests/xfs/341
index e9aea42f429ffd..fd450135b45de3 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -30,10 +30,10 @@ blksz="$(_get_block_size $SCRATCH_MNT)"
 rtextsz_blks=$((rtextsz / blksz))
 
 # inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+# rtrmap record is 24 bytes; and rtrmap key/pointer are 48 bytes.
 i_core_size="$(_xfs_get_inode_core_bytes $SCRATCH_MNT)"
-i_ptrs=$(( (isize - i_core_size) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
+i_ptrs=$(( (isize - i_core_size) / 48 ))
+bt_recs=$(( (blksz - 56) / 24 ))
 
 blocks=$((i_ptrs * bt_recs + 1))
 len=$((blocks * rtextsz))
@@ -55,10 +55,6 @@ _scratch_xfs_db -x -c 'path -m /rtgroups/0.rmap' \
 	-c "write u3.rtrmapbt.ptrs[1] $fsbno" -c 'p' >> $seqres.full
 _scratch_mount
 
-echo "Try to create more files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
-test -e $SCRATCH_MNT/f5 && echo "should not have been able to write f5"
-
 echo "Repair fs"
 _scratch_unmount 2>&1 | _filter_scratch
 _repair_scratch_fs >> $seqres.full 2>&1
diff --git a/tests/xfs/341.out b/tests/xfs/341.out
index 75a5bc6c61191a..580d78895417c9 100644
--- a/tests/xfs/341.out
+++ b/tests/xfs/341.out
@@ -2,6 +2,5 @@ QA output created by 341
 Format and mount
 Create some files
 Corrupt fs
-Try to create more files
 Repair fs
 Try to create more files (again)


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

* [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (5 preceding siblings ...)
  2025-02-19  1:05   ` [PATCH 06/13] xfs/341: update test for rtgroup-based rmap Darrick J. Wong
@ 2025-02-19  1:05   ` Darrick J. Wong
  2025-02-19  7:27     ` Christoph Hellwig
  2025-02-19  1:05   ` [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic Darrick J. Wong
                     ` (5 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:05 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Both of these tests for the realtime volume can fail when the rt extent
size is larger than a single block.

332 is a read-write functionality test that encodes md5sum in the
output, so we need to skip it if $blksz isn't congruent with the extent
size, because the fcollapse call will fail.

343 is a test of the rmap btree, so the fix here is simpler -- make
$blksz the file allocation unit, and get rid of the md5sum in the
golden output.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/332     |    6 +-----
 tests/xfs/332.out |    2 --
 tests/xfs/343     |    2 ++
 3 files changed, 3 insertions(+), 7 deletions(-)


diff --git a/tests/xfs/332 b/tests/xfs/332
index 93c94bcdccf07e..fd91ebab164f34 100755
--- a/tests/xfs/332
+++ b/tests/xfs/332
@@ -26,7 +26,7 @@ rm -f "$seqres.full"
 echo "Format and mount"
 _scratch_mkfs > "$seqres.full" 2>&1
 _scratch_mount
-blksz=65536
+blksz=$(_get_file_block_size $SCRATCH_MNT) # 65536
 blocks=16
 len=$((blocks * blksz))
 
@@ -43,10 +43,6 @@ $XFS_IO_PROG -c "fpunch $blksz $blksz" \
 	-c "fcollapse $((9 * blksz)) $blksz" \
 	-c "finsert $((10 * blksz)) $blksz" $SCRATCH_MNT/f1 >> $seqres.full
 
-echo "Check file"
-md5sum $SCRATCH_MNT/f1 | _filter_scratch
-od -tx1 -Ad -c $SCRATCH_MNT/f1 >> $seqres.full
-
 echo "Unmount"
 _scratch_unmount
 
diff --git a/tests/xfs/332.out b/tests/xfs/332.out
index 9beff7cc3704c0..3a7ca95b403e77 100644
--- a/tests/xfs/332.out
+++ b/tests/xfs/332.out
@@ -2,8 +2,6 @@ QA output created by 332
 Format and mount
 Create some files
 Manipulate file
-Check file
-e45c5707fcf6817e914ffb6ce37a0ac7  SCRATCH_MNT/f1
 Unmount
 Try a regular fsmap
 Try a bad fsmap
diff --git a/tests/xfs/343 b/tests/xfs/343
index a5834cab123e7d..d5ac96d085ee6b 100755
--- a/tests/xfs/343
+++ b/tests/xfs/343
@@ -29,6 +29,8 @@ blksz=65536
 blocks=16
 len=$((blocks * blksz))
 
+_require_congruent_file_oplen $SCRATCH_MNT $blksz
+
 echo "Create some files"
 $XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
 


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

* [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (6 preceding siblings ...)
  2025-02-19  1:05   ` [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1 Darrick J. Wong
@ 2025-02-19  1:05   ` Darrick J. Wong
  2025-02-19  7:28     ` Christoph Hellwig
  2025-02-19  1:05   ` [PATCH 09/13] xfs: skip tests if formatting small filesystem fails Darrick J. Wong
                     ` (4 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:05 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that _scratch_mkfs_xfs_sized accepts arbitrary mkfs arguments, this
test doesn't need to open-code the helper just to add the dir block and
log size arguments.  Clean this up, which will also help us to avoid
problems with rtrmap if the rt devices is large enough to cause format
failures with the 133M data device size.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/291 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/tests/xfs/291 b/tests/xfs/291
index 777968a9240df6..1a8cda4efb3357 100755
--- a/tests/xfs/291
+++ b/tests/xfs/291
@@ -26,7 +26,7 @@ _xfs_setup_verify_metadump
 
 _require_scratch
 logblks=$(_scratch_find_xfs_min_logblocks -n size=16k -d size=133m)
-_scratch_mkfs_xfs -n size=16k -l size=${logblks}b -d size=133m >> $seqres.full 2>&1
+_scratch_mkfs_sized $((133 * 1048576)) '' -n size=16k -l size=${logblks}b >> $seqres.full 2>&1
 _scratch_mount
 
 # First we cause very badly fragmented freespace, then


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

* [PATCH 09/13] xfs: skip tests if formatting small filesystem fails
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (7 preceding siblings ...)
  2025-02-19  1:05   ` [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic Darrick J. Wong
@ 2025-02-19  1:05   ` Darrick J. Wong
  2025-02-19  7:30     ` Christoph Hellwig
  2025-02-19 19:17     ` [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized Darrick J. Wong
  2025-02-19  1:06   ` [PATCH 10/13] xfs/443: use file allocation unit, not dbsize Darrick J. Wong
                     ` (3 subsequent siblings)
  12 siblings, 2 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:05 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

There are a few tests that try to exercise XFS functionality with an
unusually small (< 500MB) filesystem.  Formatting can fail if the test
configuration also specifies a very large realtime device because mkfs
hits ENOSPC when allocating the realtime metadata.  The test proceeds
anyway (which causes an immediate mount failure) so we might as well
skip these.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/104 |    1 +
 1 file changed, 1 insertion(+)


diff --git a/tests/xfs/104 b/tests/xfs/104
index cd625d6b74aaaf..e95a3b25c3e514 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -16,6 +16,7 @@ _create_scratch()
 {
 	echo "*** mkfs"
 	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	test "${PIPESTATUS[0]}" -eq 0 || _notrun "formatting small scratch fs failed"
 	. $tmp.mkfs
 
 	echo "*** mount"


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

* [PATCH 10/13] xfs/443: use file allocation unit, not dbsize
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (8 preceding siblings ...)
  2025-02-19  1:05   ` [PATCH 09/13] xfs: skip tests if formatting small filesystem fails Darrick J. Wong
@ 2025-02-19  1:06   ` Darrick J. Wong
  2025-02-19  7:31     ` Christoph Hellwig
  2025-02-19  1:06   ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong
                     ` (2 subsequent siblings)
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:06 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

We can only punch in units of file allocation boundaries, so update this
test to use that instead of the fs blocksize.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/443 |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


diff --git a/tests/xfs/443 b/tests/xfs/443
index 8db51a834d094e..0e3c6519a3c0f7 100755
--- a/tests/xfs/443
+++ b/tests/xfs/443
@@ -38,14 +38,15 @@ _scratch_mount
 
 file1=$SCRATCH_MNT/file1
 file2=$SCRATCH_MNT/file2
+file_blksz=$(_get_file_block_size $SCRATCH_MNT)
 
 # The goal is run an extent swap where one of the associated files has the
 # minimum number of extents to remain in btree format. First, create a couple
 # files with large enough extent counts (200 or so should be plenty) to ensure
 # btree format on the largest possible inode size filesystems.
-$XFS_IO_PROG -fc "falloc 0 $((400 * dbsize))" $file1
+$XFS_IO_PROG -fc "falloc 0 $((400 * file_blksz))" $file1
 $here/src/punch-alternating $file1
-$XFS_IO_PROG -fc "falloc 0 $((400 * dbsize))" $file2
+$XFS_IO_PROG -fc "falloc 0 $((400 * file_blksz))" $file2
 $here/src/punch-alternating $file2
 
 # Now run an extent swap at every possible extent count down to 0. Depending on
@@ -53,12 +54,12 @@ $here/src/punch-alternating $file2
 # btree format.
 for i in $(seq 1 2 399); do
 	# punch one extent from the tmpfile and swap
-	$XFS_IO_PROG -c "fpunch $((i * dbsize)) $dbsize" $file2
+	$XFS_IO_PROG -c "fpunch $((i * file_blksz)) $file_blksz" $file2
 	$XFS_IO_PROG -c "exchangerange $file2" $file1
 
 	# punch the same extent from the old fork (now in file2) to resync the
 	# extent counts and repeat
-	$XFS_IO_PROG -c "fpunch $((i * dbsize)) $dbsize" $file2
+	$XFS_IO_PROG -c "fpunch $((i * file_blksz)) $file_blksz" $file2
 done
 
 # sanity check that no extents are left over


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

* [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (9 preceding siblings ...)
  2025-02-19  1:06   ` [PATCH 10/13] xfs/443: use file allocation unit, not dbsize Darrick J. Wong
@ 2025-02-19  1:06   ` Darrick J. Wong
  2025-02-19  7:32     ` Christoph Hellwig
  2025-02-19  1:06   ` [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height Darrick J. Wong
  2025-02-19  1:07   ` [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees Darrick J. Wong
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:06 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Now that we've sharded the realtime volume and created per-group rmap
btrees, we need to adjust downward the size of rtrmapbt records since
the block counts are now 32-bit instead of 64-bit.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/common/populate b/common/populate
index ade3ace886f4d4..1741403fafd9aa 100644
--- a/common/populate
+++ b/common/populate
@@ -463,7 +463,7 @@ _scratch_xfs_populate() {
 	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 	if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then
 		echo "+ rtrmapbt btree"
-		nr="$((blksz * 2 / 32))"
+		nr="$((blksz * 2 / 24))"
 		$XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTRMAPBT"
 		__populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RTRMAPBT"
 	fi


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

* [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (10 preceding siblings ...)
  2025-02-19  1:06   ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong
@ 2025-02-19  1:06   ` Darrick J. Wong
  2025-02-19  7:32     ` Christoph Hellwig
  2025-02-19  1:07   ` [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees Darrick J. Wong
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:06 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Make sure that we actually create an rt rmap btree of the desired height
somewhere in the filesystem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)


diff --git a/common/populate b/common/populate
index 1741403fafd9aa..dd80f0796a4d36 100644
--- a/common/populate
+++ b/common/populate
@@ -766,6 +766,37 @@ __populate_check_xfs_agbtree_height() {
 	return 1
 }
 
+# Check that there's at least one rt btree with multiple levels
+__populate_check_xfs_rgbtree_height() {
+	local bt_type="$1"
+	local rgcount=$(_scratch_xfs_db -c 'sb 0' -c 'p rgcount' | awk '{print $3}')
+	local path
+	local path_format
+	local bt_prefix
+
+	case "${bt_type}" in
+	"rmap")
+		path_format="/rtgroups/%u.rmap"
+		bt_prefix="u3.rtrmapbt"
+		;;
+	*)
+		_fail "Don't know about rt btree ${bt_type}"
+		;;
+	esac
+
+	for ((rgno = 0; rgno < rgcount; rgno++)); do
+		path="$(printf "${path_format}" "${rgno}")"
+		bt_level=$(_scratch_xfs_db -c "path -m ${path}" -c "p ${bt_prefix}.level" | awk '{print $3}')
+		# "level" is the actual level within the btree
+		if [ "${bt_level}" -gt 0 ]; then
+			return 0
+		fi
+	done
+
+	__populate_fail "Failed to create rt ${bt_type} of sufficient height!"
+	return 1
+}
+
 # Check that populate created all the types of files we wanted
 _scratch_xfs_populate_check() {
 	_scratch_mount
@@ -789,6 +820,7 @@ _scratch_xfs_populate_check() {
 	is_finobt=$(_xfs_has_feature "$SCRATCH_MNT" finobt -v)
 	is_rmapbt=$(_xfs_has_feature "$SCRATCH_MNT" rmapbt -v)
 	is_reflink=$(_xfs_has_feature "$SCRATCH_MNT" reflink -v)
+	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 
 	blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 	dblksz="$(_xfs_get_dir_blocksize "$SCRATCH_MNT")"
@@ -819,6 +851,8 @@ _scratch_xfs_populate_check() {
 	test $is_finobt -ne 0 && __populate_check_xfs_agbtree_height "fino"
 	test $is_rmapbt -ne 0 && __populate_check_xfs_agbtree_height "rmap"
 	test $is_reflink -ne 0 && __populate_check_xfs_agbtree_height "refcnt"
+	test $is_rmapbt -ne 0 && test $is_rt -gt 0 && \
+		__populate_check_xfs_rgbtree_height "rmap"
 }
 
 # Check data fork format of ext4 file


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

* [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees
  2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
                     ` (11 preceding siblings ...)
  2025-02-19  1:06   ` [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height Darrick J. Wong
@ 2025-02-19  1:07   ` Darrick J. Wong
  2025-02-19  7:32     ` Christoph Hellwig
  12 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:07 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Back when I first created the fuzz tests for the realtime rmap btree, I
forgot a couple of things.  Add tests to fuzz rtrmap btree leaf records,
and node keys.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1528     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1528.out |    4 ++++
 tests/xfs/1529     |   37 +++++++++++++++++++++++++++++++++++++
 tests/xfs/1529.out |    4 ++++
 tests/xfs/407      |    2 +-
 5 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100755 tests/xfs/1528
 create mode 100644 tests/xfs/1528.out
 create mode 100755 tests/xfs/1529
 create mode 100644 tests/xfs/1529.out


diff --git a/tests/xfs/1528 b/tests/xfs/1528
new file mode 100755
index 00000000000000..15420555ed89ac
--- /dev/null
+++ b/tests/xfs/1528
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1528
+#
+# Populate a XFS filesystem and fuzz every rtrmapbt record field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrmapbt recs"
+_scratch_xfs_fuzz_metadata '' 'both' "path -m $path" "addr u${inode_ver}.rtrmapbt.ptrs[1]" >> $seqres.full
+echo "Done fuzzing rtrmapbt recs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1528.out b/tests/xfs/1528.out
new file mode 100644
index 00000000000000..b51b640c40a268
--- /dev/null
+++ b/tests/xfs/1528.out
@@ -0,0 +1,4 @@
+QA output created by 1528
+Format and populate
+Fuzz rtrmapbt recs
+Done fuzzing rtrmapbt recs
diff --git a/tests/xfs/1529 b/tests/xfs/1529
new file mode 100755
index 00000000000000..0a9cce43d831bc
--- /dev/null
+++ b/tests/xfs/1529
@@ -0,0 +1,37 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1529
+#
+# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
+	_fail "could not find two-level rtrmapbt"
+
+echo "Fuzz rtrmapbt keyptrs"
+_scratch_xfs_fuzz_metadata '(rtrmapbt)' 'offline' "path -m $path" >> $seqres.full
+echo "Done fuzzing rtrmapbt keyptrs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1529.out b/tests/xfs/1529.out
new file mode 100644
index 00000000000000..808fcc957f91e0
--- /dev/null
+++ b/tests/xfs/1529.out
@@ -0,0 +1,4 @@
+QA output created by 1529
+Format and populate
+Fuzz rtrmapbt keyptrs
+Done fuzzing rtrmapbt keyptrs
diff --git a/tests/xfs/407 b/tests/xfs/407
index 1eff49218a86bf..a46ecb0cd5eb93 100755
--- a/tests/xfs/407
+++ b/tests/xfs/407
@@ -24,7 +24,7 @@ _require_scratch_xfs_fuzz_fields
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1
 
-path="$(_scratch_xfs_find_rgbtree_height 'rmap' 1)" || \
+path="$(_scratch_xfs_find_rgbtree_height 'rmap' 2)" || \
 	_fail "could not find two-level rtrmapbt"
 inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
 


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

* [PATCH 1/7] common/populate: create realtime refcount btree
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
@ 2025-02-19  1:07   ` Darrick J. Wong
  2025-02-19  7:41     ` Christoph Hellwig
  2025-02-19  1:07   ` [PATCH 2/7] xfs: create fuzz tests for the " Darrick J. Wong
                     ` (5 subsequent siblings)
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:07 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Populate a realtime refcount btree when we're creating a sample fs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/populate |   26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)


diff --git a/common/populate b/common/populate
index dd80f0796a4d36..a1be26d5b24adf 100644
--- a/common/populate
+++ b/common/populate
@@ -451,16 +451,30 @@ _scratch_xfs_populate() {
 	local dir="${SCRATCH_MNT}/INOBT"
 	__populate_create_dir "${dir}" "${nr}" true --file-pct 100
 
-	# Reverse-mapping btree
+	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 	is_rmapbt="$(_xfs_has_feature "$SCRATCH_MNT" rmapbt -v)"
+	is_reflink="$(_xfs_has_feature "$SCRATCH_MNT" reflink -v)"
+
+	# Reverse-mapping btree
 	if [ $is_rmapbt -gt 0 ]; then
 		echo "+ rmapbt btree"
 		nr="$((blksz * 2 / 24))"
 		__populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RMAPBT"
 	fi
 
+	# Realtime Reference-count btree comes before the rtrmapbt so that
+	# the refcount entries are created in rtgroup 0.
+	if [ $is_reflink -gt 0 ] && [ $is_rt -gt 0 ]; then
+		echo "+ rtreflink btree"
+		rt_blksz=$(_xfs_get_rtextsize "$SCRATCH_MNT")
+		nr="$((rt_blksz * 2 / 12))"
+		$XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTREFCOUNTBT"
+		__populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RTREFCOUNTBT"
+		$XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTREFCOUNTBT2"
+		cp --reflink=always "${SCRATCH_MNT}/RTREFCOUNTBT" "${SCRATCH_MNT}/RTREFCOUNTBT2"
+	fi
+
 	# Realtime Reverse-mapping btree
-	is_rt="$(_xfs_get_rtextents "$SCRATCH_MNT")"
 	if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then
 		echo "+ rtrmapbt btree"
 		nr="$((blksz * 2 / 24))"
@@ -469,7 +483,6 @@ _scratch_xfs_populate() {
 	fi
 
 	# Reference-count btree
-	is_reflink="$(_xfs_has_feature "$SCRATCH_MNT" reflink -v)"
 	if [ $is_reflink -gt 0 ]; then
 		echo "+ reflink btree"
 		nr="$((blksz * 2 / 12))"
@@ -534,6 +547,7 @@ _scratch_xfs_populate() {
 	__populate_fragment_file "${SCRATCH_MNT}/RMAPBT"
 	__populate_fragment_file "${SCRATCH_MNT}/RTRMAPBT"
 	__populate_fragment_file "${SCRATCH_MNT}/REFCOUNTBT"
+	__populate_fragment_file "${SCRATCH_MNT}/RTREFCOUNTBT"
 
 	_scratch_unmount
 }
@@ -779,6 +793,10 @@ __populate_check_xfs_rgbtree_height() {
 		path_format="/rtgroups/%u.rmap"
 		bt_prefix="u3.rtrmapbt"
 		;;
+	"refcnt")
+		path_format="/rtgroups/%u.refcount"
+		bt_prefix="u3.rtrefcbt"
+		;;
 	*)
 		_fail "Don't know about rt btree ${bt_type}"
 		;;
@@ -853,6 +871,8 @@ _scratch_xfs_populate_check() {
 	test $is_reflink -ne 0 && __populate_check_xfs_agbtree_height "refcnt"
 	test $is_rmapbt -ne 0 && test $is_rt -gt 0 && \
 		__populate_check_xfs_rgbtree_height "rmap"
+	test $is_reflink -ne 0 && test $is_rt -gt 0 && \
+		__populate_check_xfs_rgbtree_height "refcnt"
 }
 
 # Check data fork format of ext4 file


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

* [PATCH 2/7] xfs: create fuzz tests for the realtime refcount btree
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
  2025-02-19  1:07   ` [PATCH 1/7] common/populate: create realtime refcount btree Darrick J. Wong
@ 2025-02-19  1:07   ` Darrick J. Wong
  2025-02-19  7:42     ` Christoph Hellwig
  2025-02-19  1:07   ` [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume Darrick J. Wong
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:07 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Create fuzz tests for the realtime refcount btree record and key/ptr
blocks.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs         |    4 ++++
 tests/xfs/1538     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1538.out |    4 ++++
 tests/xfs/1539     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1539.out |    4 ++++
 tests/xfs/1540     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1540.out |    4 ++++
 tests/xfs/1541     |   39 +++++++++++++++++++++++++++++++++++++++
 tests/xfs/1541.out |    4 ++++
 tests/xfs/1542     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1542.out |    4 ++++
 tests/xfs/1543     |   37 +++++++++++++++++++++++++++++++++++++
 tests/xfs/1543.out |    4 ++++
 tests/xfs/1544     |   37 +++++++++++++++++++++++++++++++++++++
 tests/xfs/1544.out |    4 ++++
 tests/xfs/1545     |   38 ++++++++++++++++++++++++++++++++++++++
 tests/xfs/1545.out |    4 ++++
 17 files changed, 339 insertions(+)
 create mode 100755 tests/xfs/1538
 create mode 100644 tests/xfs/1538.out
 create mode 100755 tests/xfs/1539
 create mode 100644 tests/xfs/1539.out
 create mode 100755 tests/xfs/1540
 create mode 100644 tests/xfs/1540.out
 create mode 100755 tests/xfs/1541
 create mode 100644 tests/xfs/1541.out
 create mode 100755 tests/xfs/1542
 create mode 100644 tests/xfs/1542.out
 create mode 100755 tests/xfs/1543
 create mode 100644 tests/xfs/1543.out
 create mode 100755 tests/xfs/1544
 create mode 100644 tests/xfs/1544.out
 create mode 100755 tests/xfs/1545
 create mode 100644 tests/xfs/1545.out


diff --git a/common/xfs b/common/xfs
index 1be8cbf1c563d9..2c903d71c9170b 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1842,6 +1842,10 @@ _scratch_xfs_find_rgbtree_height() {
 		path_format="/rtgroups/%u.rmap"
 		bt_prefix="u3.rtrmapbt"
 		;;
+	"refcnt")
+		path_format="/rtgroups/%u.refcount"
+		bt_prefix="u3.rtrefcbt"
+		;;
 	*)
 		_fail "Don't know about rt btree ${bt_type}"
 		;;
diff --git a/tests/xfs/1538 b/tests/xfs/1538
new file mode 100755
index 00000000000000..6b88ef4dcf3135
--- /dev/null
+++ b/tests/xfs/1538
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1538
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt record field.
+# Use xfs_scrub to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrefcountbt recs"
+_scratch_xfs_fuzz_metadata '' 'online' "path -m $path" "addr u${inode_ver}.rtrefcbt.ptrs[1]" >> $seqres.full
+echo "Done fuzzing rtrefcountbt recs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1538.out b/tests/xfs/1538.out
new file mode 100644
index 00000000000000..968cfd6ef98ff1
--- /dev/null
+++ b/tests/xfs/1538.out
@@ -0,0 +1,4 @@
+QA output created by 1538
+Format and populate
+Fuzz rtrefcountbt recs
+Done fuzzing rtrefcountbt recs
diff --git a/tests/xfs/1539 b/tests/xfs/1539
new file mode 100755
index 00000000000000..41a7707a111cf9
--- /dev/null
+++ b/tests/xfs/1539
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1539
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt record field.
+# Use xfs_repair to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrefcountbt recs"
+_scratch_xfs_fuzz_metadata '' 'offline' "path -m $path" "addr u${inode_ver}.rtrefcbt.ptrs[1]" >> $seqres.full
+echo "Done fuzzing rtrefcountbt recs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1539.out b/tests/xfs/1539.out
new file mode 100644
index 00000000000000..aa3a963dc2a612
--- /dev/null
+++ b/tests/xfs/1539.out
@@ -0,0 +1,4 @@
+QA output created by 1539
+Format and populate
+Fuzz rtrefcountbt recs
+Done fuzzing rtrefcountbt recs
diff --git a/tests/xfs/1540 b/tests/xfs/1540
new file mode 100755
index 00000000000000..ee94dcf0c6bae9
--- /dev/null
+++ b/tests/xfs/1540
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1540
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt record field.
+# Do not fix the filesystem, to test metadata verifiers.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrefcountbt recs"
+_scratch_xfs_fuzz_metadata '' 'none' "path -m $path" "addr u${inode_ver}.rtrefcbt.ptrs[1]" >> $seqres.full
+echo "Done fuzzing rtrefcountbt recs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1540.out b/tests/xfs/1540.out
new file mode 100644
index 00000000000000..37f3311837ad24
--- /dev/null
+++ b/tests/xfs/1540.out
@@ -0,0 +1,4 @@
+QA output created by 1540
+Format and populate
+Fuzz rtrefcountbt recs
+Done fuzzing rtrefcountbt recs
diff --git a/tests/xfs/1541 b/tests/xfs/1541
new file mode 100755
index 00000000000000..16c6e82eca3e5b
--- /dev/null
+++ b/tests/xfs/1541
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1541
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt record field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrefcountbt recs"
+_scratch_xfs_fuzz_metadata '' 'both' "path -m $path" "addr u${inode_ver}.rtrefcbt.ptrs[1]" >> $seqres.full
+echo "Done fuzzing rtrefcountbt recs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1541.out b/tests/xfs/1541.out
new file mode 100644
index 00000000000000..35a9b73471639e
--- /dev/null
+++ b/tests/xfs/1541.out
@@ -0,0 +1,4 @@
+QA output created by 1541
+Format and populate
+Fuzz rtrefcountbt recs
+Done fuzzing rtrefcountbt recs
diff --git a/tests/xfs/1542 b/tests/xfs/1542
new file mode 100755
index 00000000000000..08cad4f7584292
--- /dev/null
+++ b/tests/xfs/1542
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1542
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt key/ptr field.
+# Use xfs_scrub to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub fuzzers_online_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+inode_ver=$(_scratch_xfs_get_metadata_field "core.version" "path -m $path")
+
+echo "Fuzz rtrefcountbt keyptrs"
+_scratch_xfs_fuzz_metadata '(rtrefcbt)' 'online' "path -m $path" >> $seqres.full
+echo "Done fuzzing rtrefcountbt keyptrs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1542.out b/tests/xfs/1542.out
new file mode 100644
index 00000000000000..55d820b4b16778
--- /dev/null
+++ b/tests/xfs/1542.out
@@ -0,0 +1,4 @@
+QA output created by 1542
+Format and populate
+Fuzz rtrefcountbt keyptrs
+Done fuzzing rtrefcountbt keyptrs
diff --git a/tests/xfs/1543 b/tests/xfs/1543
new file mode 100755
index 00000000000000..47302787082a30
--- /dev/null
+++ b/tests/xfs/1543
@@ -0,0 +1,37 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1543
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt key/ptr field.
+# Use xfs_repair to fix the corruption.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers repair fuzzers_repair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+
+echo "Fuzz rtrefcountbt keyptrs"
+_scratch_xfs_fuzz_metadata '(rtrefcbt)' 'offline' "path -m $path" >> $seqres.full
+echo "Done fuzzing rtrefcountbt keyptrs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1543.out b/tests/xfs/1543.out
new file mode 100644
index 00000000000000..e7afa10744c5db
--- /dev/null
+++ b/tests/xfs/1543.out
@@ -0,0 +1,4 @@
+QA output created by 1543
+Format and populate
+Fuzz rtrefcountbt keyptrs
+Done fuzzing rtrefcountbt keyptrs
diff --git a/tests/xfs/1544 b/tests/xfs/1544
new file mode 100755
index 00000000000000..b61166e1bdc3ea
--- /dev/null
+++ b/tests/xfs/1544
@@ -0,0 +1,37 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1544
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt key/ptr field.
+# Do not fix the filesystem, to test metadata verifiers.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers fuzzers_norepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+
+echo "Fuzz rtrefcountbt keyptrs"
+_scratch_xfs_fuzz_metadata '(rtrefcbt)' 'none' "path -m $path" >> $seqres.full
+echo "Done fuzzing rtrefcountbt keyptrs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1544.out b/tests/xfs/1544.out
new file mode 100644
index 00000000000000..b39532c160dafe
--- /dev/null
+++ b/tests/xfs/1544.out
@@ -0,0 +1,4 @@
+QA output created by 1544
+Format and populate
+Fuzz rtrefcountbt keyptrs
+Done fuzzing rtrefcountbt keyptrs
diff --git a/tests/xfs/1545 b/tests/xfs/1545
new file mode 100755
index 00000000000000..6c1460d98ee4a2
--- /dev/null
+++ b/tests/xfs/1545
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1545
+#
+# Populate a XFS filesystem and fuzz every rtrefcountbt key/ptr field.
+# Try online repair and, if necessary, offline repair,
+# to test the most likely usage pattern.
+
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub repair fuzzers_bothrepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+. ./common/reflink
+
+_require_realtime
+_require_scratch_reflink
+_require_scratch_xfs_fuzz_fields
+_disable_dmesg_check
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+path="$(_scratch_xfs_find_rgbtree_height 'refcnt' 2)" || \
+	_fail "could not find two-level rtrefcountbt"
+
+echo "Fuzz rtrefcountbt keyptrs"
+_scratch_xfs_fuzz_metadata '(rtrefcbt)' 'both' "path -m $path" >> $seqres.full
+echo "Done fuzzing rtrefcountbt keyptrs"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1545.out b/tests/xfs/1545.out
new file mode 100644
index 00000000000000..982a0d64df4353
--- /dev/null
+++ b/tests/xfs/1545.out
@@ -0,0 +1,4 @@
+QA output created by 1545
+Format and populate
+Fuzz rtrefcountbt keyptrs
+Done fuzzing rtrefcountbt keyptrs


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

* [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
  2025-02-19  1:07   ` [PATCH 1/7] common/populate: create realtime refcount btree Darrick J. Wong
  2025-02-19  1:07   ` [PATCH 2/7] xfs: create fuzz tests for the " Darrick J. Wong
@ 2025-02-19  1:07   ` Darrick J. Wong
  2025-02-19  7:42     ` Christoph Hellwig
  2025-02-19  1:08   ` [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair Darrick J. Wong
                     ` (3 subsequent siblings)
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:07 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Adapt both tests to behave properly if the two files being tested are on
the realtime volume.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/272 |   40 +++++++++++++++++++++++++------------
 tests/xfs/274 |   62 ++++++++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 70 insertions(+), 32 deletions(-)


diff --git a/tests/xfs/272 b/tests/xfs/272
index 1d0edf67600aa5..0a7a7273ac92a0 100755
--- a/tests/xfs/272
+++ b/tests/xfs/272
@@ -38,26 +38,40 @@ $here/src/punch-alternating $SCRATCH_MNT/urk >> $seqres.full
 ino=$(stat -c '%i' $SCRATCH_MNT/urk)
 
 echo "Get fsmap" | tee -a $seqres.full
-$XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT >> $seqres.full
 $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT | tr '[]()' '    ' > $TEST_DIR/fsmap
+cat $TEST_DIR/fsmap >> $seqres.full
 
 echo "Get bmap" | tee -a $seqres.full
-$XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/urk >> $seqres.full
 $XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/urk | grep '^[[:space:]]*[0-9]*:' | grep -v 'hole' | tr '[]()' '    ' > $TEST_DIR/bmap
+cat $TEST_DIR/bmap >> $seqres.full
 
 echo "Check bmap and fsmap" | tee -a $seqres.full
-cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
-	qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total}(| [01]*)$"
-	echo "${qstr}" >> $seqres.full
-	grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
-	found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
-	test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
-done
+if $XFS_IO_PROG -c 'stat -v' $SCRATCH_MNT/urk | grep -q realtime; then
+	# file on rt volume
+	cat $TEST_DIR/bmap | while read ext offrange colon rtblockrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${rtblockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${total}(| [01]*)$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
 
-echo "Check device field of FS metadata and regular file"
-data_dev=$(grep 'inode btree' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
-rt_dev=$(grep "${ino}[[:space:]]*[0-9]*\.\.[0-9]*" $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
-test "${data_dev}" = "${rt_dev}" || echo "data ${data_dev} realtime ${rt_dev}?"
+	echo "Check device field of FS metadata and regular file"
+else
+	# file on data volume
+	cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total}(| [01]*)$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
+
+	echo "Check device field of FS metadata and regular file"
+	data_dev=$(grep 'inode btree' $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
+	rt_dev=$(grep "${ino}[[:space:]]*[0-9]*\.\.[0-9]*" $TEST_DIR/fsmap | head -n 1 | awk '{print $2}')
+	test "${data_dev}" = "${rt_dev}" || echo "data ${data_dev} realtime ${rt_dev}?"
+fi
 
 # success, all done
 status=0
diff --git a/tests/xfs/274 b/tests/xfs/274
index a6bdc7c032bb38..bb07ca7b58cf8a 100755
--- a/tests/xfs/274
+++ b/tests/xfs/274
@@ -38,34 +38,58 @@ _cp_reflink $SCRATCH_MNT/f1 $SCRATCH_MNT/f2
 ino=$(stat -c '%i' $SCRATCH_MNT/f1)
 
 echo "Get fsmap" | tee -a $seqres.full
-$XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT >> $seqres.full
 $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT | tr '[]()' '    ' > $TEST_DIR/fsmap
+cat $TEST_DIR/fsmap >> $seqres.full
 
 echo "Get f1 bmap" | tee -a $seqres.full
-$XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/f1 >> $seqres.full
 $XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/f1 | grep '^[[:space:]]*[0-9]*:' | grep -v 'hole' | tr '[]()' '    ' > $TEST_DIR/bmap
+cat $TEST_DIR/bmap >> $seqres.full
 
-echo "Check f1 bmap and fsmap" | tee -a $seqres.full
-cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
-	qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total} 010[01]{4}$"
-	echo "${qstr}" >> $seqres.full
-	grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
-	found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
-	test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
-done
+if _xfs_is_realtime_file $SCRATCH_MNT/f1 && ! _xfs_has_feature $SCRATCH_MNT rtgroups; then
+	# file on rt volume
+	echo "Check f1 bmap and fsmap" | tee -a $seqres.full
+	cat $TEST_DIR/bmap | while read ext offrange colon rtblockrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${rtblockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${total} 010[01]{4}$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
+else
+	# file on data volume
+	echo "Check f1 bmap and fsmap" | tee -a $seqres.full
+	cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total} 010[01]{4}$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
+fi
 
 echo "Get f2 bmap" | tee -a $seqres.full
-$XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/f2 >> $seqres.full
 $XFS_IO_PROG -c 'bmap -v' $SCRATCH_MNT/f2 | grep '^[[:space:]]*[0-9]*:' | grep -v 'hole' | tr '[]()' '    ' > $TEST_DIR/bmap
+cat $TEST_DIR/bmap >> $seqres.full
 
-echo "Check f2 bmap and fsmap" | tee -a $seqres.full
-cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
-	qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total} 010[01]{4}$"
-	echo "${qstr}" >> $seqres.full
-	grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
-	found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
-	test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
-done
+if _xfs_is_realtime_file $SCRATCH_MNT/f2 && ! _xfs_has_feature $SCRATCH_MNT rtgroups; then
+	echo "Check f2 bmap and fsmap" | tee -a $seqres.full
+	cat $TEST_DIR/bmap | while read ext offrange colon rtblockrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${rtblockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${total} 010[01]{4}$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
+else
+	echo "Check f2 bmap and fsmap" | tee -a $seqres.full
+	cat $TEST_DIR/bmap | while read ext offrange colon blockrange ag agrange total crap; do
+		qstr="^[[:space:]]*[0-9]*:[[:space:]]*[0-9]*:[0-9]*[[:space:]]*${blockrange} :[[:space:]]*${ino}[[:space:]]*${offrange}[[:space:]]*${ag}[[:space:]]*${agrange}[[:space:]]*${total} 010[01]{4}$"
+		echo "${qstr}" >> $seqres.full
+		grep "${qstr}" $TEST_DIR/fsmap >> $seqres.full
+		found=$(grep -E -c "${qstr}" $TEST_DIR/fsmap)
+		test $found -eq 1 || echo "Unexpected output for offset ${offrange}."
+	done
+fi
 
 # success, all done
 status=0


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

* [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  1:07   ` [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume Darrick J. Wong
@ 2025-02-19  1:08   ` Darrick J. Wong
  2025-02-19  7:43     ` Christoph Hellwig
  2025-02-19  1:08   ` [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes Darrick J. Wong
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:08 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Race checking and rebuilding realtime refcount btrees with fsstress.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1818     |   40 ++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1818.out |    2 ++
 tests/xfs/1819     |   40 ++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1819.out |    2 ++
 tests/xfs/1893     |    2 +-
 5 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100755 tests/xfs/1818
 create mode 100644 tests/xfs/1818.out
 create mode 100755 tests/xfs/1819
 create mode 100644 tests/xfs/1819.out


diff --git a/tests/xfs/1818 b/tests/xfs/1818
new file mode 100755
index 00000000000000..eb0b4a61722d81
--- /dev/null
+++ b/tests/xfs/1818
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1818
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest scrub fsstress_scrub
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_scrub
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_scrub -s "scrub rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1818.out b/tests/xfs/1818.out
new file mode 100644
index 00000000000000..700d301da1450c
--- /dev/null
+++ b/tests/xfs/1818.out
@@ -0,0 +1,2 @@
+QA output created by 1818
+Silence is golden
diff --git a/tests/xfs/1819 b/tests/xfs/1819
new file mode 100755
index 00000000000000..53cf18d5549ce9
--- /dev/null
+++ b/tests/xfs/1819
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2025 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 1819
+#
+# Race fsstress and rt refcount btree scrub for a while to see if we crash or
+# livelock.
+#
+. ./common/preamble
+_begin_fstest online_repair fsstress_online_repair
+
+_cleanup() {
+	_scratch_xfs_stress_scrub_cleanup &> /dev/null
+	cd /
+	rm -r -f $tmp.*
+}
+_register_cleanup "_cleanup" BUS
+
+. ./common/filter
+. ./common/fuzzy
+. ./common/inject
+. ./common/xfs
+
+_require_realtime
+_require_scratch
+_require_xfs_stress_online_repair
+
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+_require_xfs_has_feature "$SCRATCH_MNT" realtime
+_require_xfs_has_feature "$SCRATCH_MNT" reflink
+_xfs_force_bdev realtime $SCRATCH_MNT
+
+_scratch_xfs_stress_online_repair -s "repair rtrefcountbt %rgno%"
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1819.out b/tests/xfs/1819.out
new file mode 100644
index 00000000000000..041e17ab61eaef
--- /dev/null
+++ b/tests/xfs/1819.out
@@ -0,0 +1,2 @@
+QA output created by 1819
+Silence is golden
diff --git a/tests/xfs/1893 b/tests/xfs/1893
index 1f04da0028a12a..b0066b7e15e605 100755
--- a/tests/xfs/1893
+++ b/tests/xfs/1893
@@ -46,7 +46,7 @@ done
 
 # Metapath verbs that take a rt group number
 for ((rgno = 0; rgno < rgcount; rgno++)); do
-	for v in rtbitmap rtsummary rtrmapbt; do
+	for v in rtbitmap rtsummary rtrmapbt rtrefcbt; do
 		testio=$(try_verb "$v" "$rgno")
 		test -z "$testio" && verbs+=("$v $rgno")
 	done


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

* [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  1:08   ` [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair Darrick J. Wong
@ 2025-02-19  1:08   ` Darrick J. Wong
  2025-02-19  7:43     ` Christoph Hellwig
  2025-02-19  1:08   ` [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation Darrick J. Wong
  2025-02-19  1:08   ` [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section Darrick J. Wong
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:08 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Remove this test, since we now support reflink on the rt volume.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/131     |   46 ----------------------------------------------
 tests/xfs/131.out |    5 -----
 2 files changed, 51 deletions(-)
 delete mode 100755 tests/xfs/131
 delete mode 100644 tests/xfs/131.out


diff --git a/tests/xfs/131 b/tests/xfs/131
deleted file mode 100755
index c83a1d6eab9ef7..00000000000000
--- a/tests/xfs/131
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/bash
-# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2015, Oracle and/or its affiliates.  All Rights Reserved.
-#
-# FS QA Test No. 131
-#
-# Ensure that we can't reflink realtime files.
-#
-. ./common/preamble
-_begin_fstest auto quick clone realtime
-
-# Override the default cleanup function.
-_cleanup()
-{
-    cd /
-    umount $SCRATCH_MNT > /dev/null 2>&1
-    rm -rf $tmp.* $testdir $metadump_file
-}
-
-# Import common functions.
-. ./common/filter
-. ./common/reflink
-
-_require_realtime
-_require_scratch_reflink
-_require_cp_reflink
-
-echo "Format and mount scratch device"
-_scratch_mkfs >> $seqres.full
-_scratch_mount
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-
-echo "Create the original file blocks"
-blksz=65536
-$XFS_IO_PROG -R -f -c "truncate $blksz" $testdir/file1
-
-echo "Reflink every block"
-_cp_reflink $testdir/file1 $testdir/file2 2>&1 | _filter_scratch
-
-test -s $testdir/file2 && _fail "Should not be able to reflink a realtime file."
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/131.out b/tests/xfs/131.out
deleted file mode 100644
index 3c0186f0c7e9da..00000000000000
--- a/tests/xfs/131.out
+++ /dev/null
@@ -1,5 +0,0 @@
-QA output created by 131
-Format and mount scratch device
-Create the original file blocks
-Reflink every block
-cp: failed to clone 'SCRATCH_MNT/test-131/file2' from 'SCRATCH_MNT/test-131/file1': Invalid argument


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

* [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
                     ` (4 preceding siblings ...)
  2025-02-19  1:08   ` [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes Darrick J. Wong
@ 2025-02-19  1:08   ` Darrick J. Wong
  2025-02-19  7:44     ` Christoph Hellwig
  2025-02-19  1:08   ` [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section Darrick J. Wong
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:08 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

The goal of this test is to ensure that log recovery finishes a copy on
write operation in the event of temporary media errors.  It's important
that the test observe some sort of IO error once we switch the scratch
device to fail all IOs, but regrettably the test encoded the specific
behavior of XFS and btrfs when the test was written -- the aio write
to the page cache doesn't have to touch the disk and succeeds, and the
fdatasync flushes things to disk and hits the IO error.

However, this is not how things work on the XFS realtime device.  There
is no delalloc on realtime when the rt extent size > 1 fsblock (or on
any file with extent size hints), so the aio write allocates an
unwritten extent to stage the write.  The allocation fails due to EIO,
so it's the write call that fails.  Therefore, all we need to do is to
detect an IO error at any point between the write and the fdatasync call
to be satisfied that the test does what we want to do.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/generic/331     |   13 +++++++++++--
 tests/generic/331.out |    2 +-
 tests/xfs/240         |   12 ++++++++++--
 tests/xfs/240.out     |    2 +-
 4 files changed, 23 insertions(+), 6 deletions(-)


diff --git a/tests/generic/331 b/tests/generic/331
index 704bb1283ecb85..a079ba297c201b 100755
--- a/tests/generic/331
+++ b/tests/generic/331
@@ -58,10 +58,19 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 _scratch_sync
+
+# If the filesystem supports delalloc, then the fdatasync will report an IO
+# error.  If the write goes directly to disk, then aiocp will return nonzero.
+unset write_failed
 _dmerror_load_error_table
-$AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full 2>&1
+$AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full 2>&1 || \
+	write_failed=1
 $XFS_IO_PROG -c "fdatasync" $testdir/file2 |& \
-		_filter_flakey_EIO "fdatasync: Input/output error"
+		_filter_flakey_EIO "fdatasync: Input/output error" | \
+		grep -q 'Input.output error' && \
+		write_failed=1
+test -n $write_failed && echo "write failed"
+
 _dmerror_load_working_table
 _dmerror_unmount
 _dmerror_mount
diff --git a/tests/generic/331.out b/tests/generic/331.out
index adbf841d00c9d1..d8ccea704b8532 100644
--- a/tests/generic/331.out
+++ b/tests/generic/331.out
@@ -5,7 +5,7 @@ Compare files
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-331/file1
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-331/file2
 CoW and unmount
-fdatasync: Input/output error
+write failed
 Compare files
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-331/file1
 d94b0ab13385aba594411c174b1cc13c  SCRATCH_MNT/test-331/file2
diff --git a/tests/xfs/240 b/tests/xfs/240
index 8916828a8c1958..6b26620f883378 100755
--- a/tests/xfs/240
+++ b/tests/xfs/240
@@ -64,9 +64,17 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 _scratch_sync
 _dmerror_load_error_table
-$AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full 2>&1
+# If the filesystem supports delalloc, then the fdatasync will report an IO
+# error.  If the write goes directly to disk, then aiocp will return nonzero.
+unset write_failed
+$AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full 2>&1 || \
+	write_failed=1
 $XFS_IO_PROG -c "fdatasync" $testdir/file2 |& \
-		_filter_flakey_EIO "fdatasync: Input/output error"
+		_filter_flakey_EIO "fdatasync: Input/output error" | \
+		grep -q 'Input.output error' && \
+		write_failed=1
+test -n $write_failed && echo "write failed"
+
 _dmerror_load_working_table
 _dmerror_unmount
 _dmerror_mount
diff --git a/tests/xfs/240.out b/tests/xfs/240.out
index 1a22e8a389ffda..00bb116e5c1613 100644
--- a/tests/xfs/240.out
+++ b/tests/xfs/240.out
@@ -5,7 +5,7 @@ Compare files
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-240/file1
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-240/file2
 CoW and unmount
-fdatasync: Input/output error
+write failed
 Compare files
 1886e67cf8783e89ce6ddc5bb09a3944  SCRATCH_MNT/test-240/file1
 d94b0ab13385aba594411c174b1cc13c  SCRATCH_MNT/test-240/file2


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

* [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section
  2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
                     ` (5 preceding siblings ...)
  2025-02-19  1:08   ` [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation Darrick J. Wong
@ 2025-02-19  1:08   ` Darrick J. Wong
  2025-02-19  7:44     ` Christoph Hellwig
  6 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:08 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

It's possible for the sysadmin to set rtinherit on the directory tree
even if there isn't a realtime section attached to the filesystem.  When
this is the case, the realtime flag is /not/ passed to new files, and
file data is written to the data device.  The file allocation unit for
the file is the fs blocksize, and it is not correct to use the rt
extent.

fstests can be fooled into doing the incorrect thing if test runner puts
'-d rtinherit=1 -r extsize=28k' into MKFS_OPTIONS without configuring a
realtime device.  This causes many tests to do the wrong thing because
they think they must operate on units of 28k (and not 4k).  Fix this.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 common/xfs |   11 +++++++++++
 1 file changed, 11 insertions(+)


diff --git a/common/xfs b/common/xfs
index 2c903d71c9170b..93260fdb4599e2 100644
--- a/common/xfs
+++ b/common/xfs
@@ -213,6 +213,8 @@ _xfs_get_file_block_size()
 {
 	local path="$1"
 
+	# If rtinherit or realtime are not set on the path, then all files
+	# will be created on the data device.
 	if ! ($XFS_IO_PROG -c "stat -v" "$path" 2>&1 | grep -E -q '(rt-inherit|realtime)'); then
 		_get_block_size "$path"
 		return
@@ -223,6 +225,15 @@ _xfs_get_file_block_size()
 	while ! $XFS_INFO_PROG "$path" &>/dev/null && [ "$path" != "/" ]; do
 		path="$(dirname "$path")"
 	done
+
+	# If there's no realtime section, the rtinherit and rextsize settings
+	# are irrelevant -- all files are created on the data device.
+	if $XFS_INFO_PROG "$path" | grep -q 'realtime =none'; then
+		_get_block_size "$path"
+		return
+	fi
+
+	# Otherwise, report the rt extent size.
 	_xfs_get_rtextsize "$path"
 }
 


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

* [PATCH 1/1] xfs: test filesystem recovery with rdump
  2025-02-19  0:49 ` [PATCHSET 12/12] fstests: dump fs directory trees Darrick J. Wong
@ 2025-02-19  1:09   ` Darrick J. Wong
  2025-02-19  7:45     ` Christoph Hellwig
  0 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  1:09 UTC (permalink / raw)
  To: zlang, djwong; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Test how well we can dump a fully populated filesystem's contents.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 tests/xfs/1895     |  153 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/1895.out |    6 ++
 2 files changed, 159 insertions(+)
 create mode 100755 tests/xfs/1895
 create mode 100644 tests/xfs/1895.out


diff --git a/tests/xfs/1895 b/tests/xfs/1895
new file mode 100755
index 00000000000000..18b534d328e9fd
--- /dev/null
+++ b/tests/xfs/1895
@@ -0,0 +1,153 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Oracle, Inc.  All Rights Reserved.
+#
+# FS QA Test No. 1895
+#
+# Populate a XFS filesystem, ensure that rdump can "recover" the contents to
+# another directory, and compare the contents.
+#
+. ./common/preamble
+_begin_fstest auto scrub
+
+_cleanup()
+{
+	command -v _kill_fsstress &>/dev/null && _kill_fsstress
+	cd /
+	test -e "$testfiles" && rm -r -f $testfiles
+}
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
+. ./common/filter
+. ./common/populate
+. ./common/fuzzy
+
+_require_xfs_db_command "rdump"
+_require_test
+_require_scratch
+_require_scrub
+_require_populate_commands
+
+make_md5()
+{
+	(cd $1 ; find . -type f -print0 | xargs -0 md5sum) > $tmp.md5.$2
+}
+
+cmp_md5()
+{
+	(cd $1 ; md5sum --quiet -c $tmp.md5.$2)
+}
+
+make_stat()
+{
+	# columns:	raw mode in hex,
+	# 		major rdev for special
+	# 		minor rdev for special
+	# 		uid of owner
+	# 		gid of owner
+	# 		file type
+	# 		total size
+	# 		mtime
+	# 		name
+	# We can't directly control directory sizes so filter them.
+	# Too many things can bump (or not) atime so don't test that.
+	(cd $1 ; find . -print0 |
+		xargs -0 stat -c '%f %t:%T %u %g %F %s %Y %n' |
+		sed -e 's/ directory [1-9][0-9]* / directory SIZE /g' |
+		sort) > $tmp.stat.$2
+}
+
+cmp_stat()
+{
+	diff -u $tmp.stat.$1 $tmp.stat.$2
+}
+
+make_stat_files() {
+	for file in "${FILES[@]}"; do
+		find "$1/$file" -print0 | xargs -0 stat -c '%f %t:%T %u %g %F %s %Y %n'
+	done | sed \
+		-e 's/ directory [1-9][0-9]* / directory SIZE /g' \
+		-e "s| $1| DUMPDIR|g" \
+		| sort > $tmp.stat.files.$2
+}
+
+cmp_stat_files()
+{
+	diff -u $tmp.stat.files.$1 $tmp.stat.files.$2
+}
+
+make_stat_dir() {
+	find "$1" -print0 | \
+		xargs -0 stat -c '%f %t:%T %u %g %F %s %Y %n' | sed \
+		-e 's/ directory [1-9][0-9]* / directory SIZE /g' \
+		-e "s| $1| DUMPDIR|g" \
+		| sort > $tmp.stat.dir.$2
+}
+
+cmp_stat_dir()
+{
+	diff -u $tmp.stat.dir.$1 $tmp.stat.dir.$2
+}
+
+FILES=(
+	"/S_IFDIR.FMT_INLINE"
+	"/S_IFBLK"
+	"/S_IFCHR"
+	"/S_IFLNK.FMT_LOCAL"
+	"/S_IFIFO"
+	"/S_IFDIR.FMT_INLINE/00000001"
+	"/ATTR.FMT_EXTENTS_REMOTE3K"
+	"/S_IFREG.FMT_EXTENTS"
+	"/S_IFREG.FMT_BTREE"
+	"/BNOBT"
+	"/S_IFDIR.FMT_BLOCK"
+)
+DIR="/S_IFDIR.FMT_LEAF"
+
+testfiles=$TEST_DIR/$seq
+mkdir -p $testfiles
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+_scratch_mount
+
+_run_fsstress -n 500 -d $SCRATCH_MNT/newfiles
+
+make_stat $SCRATCH_MNT before
+make_md5 $SCRATCH_MNT before
+make_stat_files $SCRATCH_MNT before
+make_stat_dir $SCRATCH_MNT/$DIR before
+_scratch_unmount
+
+echo "Recover filesystem"
+dumpdir1=$testfiles/rdump
+dumpdir2=$testfiles/sdump
+dumpdir3=$testfiles/tdump
+rm -r -f $dumpdir1 $dumpdir2 $dumpdir3
+
+# as of linux 6.12 fchownat does not work on symlinks
+_scratch_xfs_db -c "rdump / $dumpdir1" | sed -e '/could not be set/d'
+_scratch_xfs_db -c "rdump ${FILES[*]} $dumpdir2" | sed -e '/could not be set/d'
+_scratch_xfs_db -c "rdump $DIR $dumpdir3" | sed -e '/could not be set/d'
+
+echo "Check file contents"
+make_stat $dumpdir1 after
+cmp_stat before after
+cmp_md5 $dumpdir1 before
+
+echo "Check selected files contents"
+make_stat_files $dumpdir2 after
+cmp_stat_files before after
+
+echo "Check single dir extraction contents"
+make_stat_dir $dumpdir3 after
+cmp_stat_dir before after
+
+# remount so we can check this fs
+_scratch_mount
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1895.out b/tests/xfs/1895.out
new file mode 100644
index 00000000000000..de639ed3fc7e38
--- /dev/null
+++ b/tests/xfs/1895.out
@@ -0,0 +1,6 @@
+QA output created by 1895
+Format and populate
+Recover filesystem
+Check file contents
+Check selected files contents
+Check single dir extraction contents


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

* Re: [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT
  2025-02-19  0:49   ` [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT Darrick J. Wong
@ 2025-02-19  5:50     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:50 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, fstests, linux-xfs

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size
  2025-02-19  0:49   ` [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size Darrick J. Wong
@ 2025-02-19  5:51     ` Christoph Hellwig
  2025-02-19  5:55       ` Darrick J. Wong
  0 siblings, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:51 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, fstests, hch, linux-xfs

On Tue, Feb 18, 2025 at 04:49:31PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> There's no need to align the memory buffer for the direcio write to the
> file allocation unit size; base page size will do.  This fixes the
> following error when generic/761 is run against an XFS rt filesystem
> with a 28k rtextsize:

Note that in theory even just the memory alignment reported by
statx / XFS_IOC_DIOINFO is enough, but I don't see how reducing the
alignment futher would benefit us much here.

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCHSET 02/12] fstests: fix logwrites zeroing
  2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
                     ` (2 preceding siblings ...)
  2025-02-19  0:50   ` [PATCH 3/3] logwrites: only use BLKDISCARD if we know discard zeroes data Darrick J. Wong
@ 2025-02-19  5:55   ` Christoph Hellwig
  2025-02-19  6:13     ` Darrick J. Wong
  3 siblings, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:55 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: zlang, linux-xfs, fstests, Alasdair Kergon, Mike Snitzer,
	Mikulas Patocka, dm-devel

I don't want to block this part as it's an improvement over the current
state, but all these games of trying to detect if discard zeroes all
data despite making no such guarantee whatsoever and being explicitly
allowed to zero some but not all data just feels wrong.

The right thing would be to use the BLKZEROOUT, but AFAIK the problem is
that dm-thin doesn't support that.  Given that the dm-thin discard
implementation seems do always zero, it should be able to just be
reusable for BLKZEROOUT.  Can the dm maintainers look into that as it
is a pretty glaring omission?


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

* Re: [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size
  2025-02-19  5:51     ` Christoph Hellwig
@ 2025-02-19  5:55       ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  5:55 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, fstests, hch, linux-xfs

On Tue, Feb 18, 2025 at 09:51:06PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 04:49:31PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > There's no need to align the memory buffer for the direcio write to the
> > file allocation unit size; base page size will do.  This fixes the
> > following error when generic/761 is run against an XFS rt filesystem
> > with a 28k rtextsize:
> 
> Note that in theory even just the memory alignment reported by
> statx / XFS_IOC_DIOINFO is enough, but I don't see how reducing the
> alignment futher would benefit us much here.

<nod> I guess its a bit fragile if there's hardware out there that
can't handle 4k alignment, but those probably don't live long on the
market.

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

--D

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

* Re: [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests
  2025-02-19  0:50   ` [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests Darrick J. Wong
@ 2025-02-19  5:56     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:56 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair
  2025-02-19  0:50   ` [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair Darrick J. Wong
@ 2025-02-19  5:56     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:56 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:50:50PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> xfs_repair has been stable for many years now, so I think it's time the
> fuzz tests for it stopped hiding behind the "dangerous" label.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair
  2025-02-19  0:51   ` [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair Darrick J. Wong
@ 2025-02-19  5:57     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:57 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair
  2025-02-19  0:51   ` [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair Darrick J. Wong
@ 2025-02-19  5:57     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:57 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:51:22PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Now that online fsck has been in the upstream kernel for 8 months, I
> think it's stabilized enough that the scrub + repair functionality tests
> don't need to hide behind the "dangerous" label anymore.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair
  2025-02-19  0:51   ` [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair Darrick J. Wong
@ 2025-02-19  5:58     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:58 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests
  2025-02-19  0:51   ` [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests Darrick J. Wong
@ 2025-02-19  5:58     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:58 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:51:53PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> All the tests in the "fuzzers_repair" group actually test xfs_repair,
> not scrub.  Therefore, we should remove them all from 'dangerous_scrub'
> and put them in the 'repair' group.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 07/12] misc: fix misclassification of xfs_scrub + xfs_repair fuzz tests
  2025-02-19  0:52   ` [PATCH 07/12] misc: fix misclassification of xfs_scrub + " Darrick J. Wong
@ 2025-02-19  5:59     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:59 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:52:09PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> All the tests in the "fuzzers_bothrepair" group actually test xfs_scrub
> and xfs_repair.  Therefore, we should put them in the 'repair' group.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 08/12] misc: fix misclassification of verifier fuzz tests
  2025-02-19  0:52   ` [PATCH 08/12] misc: fix misclassification of verifier " Darrick J. Wong
@ 2025-02-19  5:59     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:59 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:52:24PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> All the tests in the "fuzzers_norepair" group do not test xfs_scrub.
> Therefore, we should remove them all from 'dangerous_scrub' group.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups
  2025-02-19  0:52   ` [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups Darrick J. Wong
@ 2025-02-19  5:59     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  5:59 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:52:40PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> All the tests in the "fuzzers_bothrepair" group test xfs_scrub +
> xfs_repair, so they all should be in the 'scrub' and 'repair' groups.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 10/12] misc: remove the dangerous_scrub group
  2025-02-19  0:52   ` [PATCH 10/12] misc: remove the dangerous_scrub group Darrick J. Wong
@ 2025-02-19  6:00     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:00 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:52:56PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Now that online fsck has been in the upstream kernel for 8 months, I
> think it's stabilized enough that the scrub functionality tests don't
> need to hide behind the "dangerous" label anymore.  Move them all to the
> scrub group and delete the dangerous_scrub group.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  2025-02-19  0:53   ` [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group Darrick J. Wong
@ 2025-02-19  6:00     ` Christoph Hellwig
  2025-02-19  6:05       ` Darrick J. Wong
  0 siblings, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:00 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:53:11PM -0800, Darrick J. Wong wrote:
> fsstress tests and two fsx tests to the auto group.  At this time I
> don't have any plans to do the same for the other scrub stress tests.

Can you explain why only these four?


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

* Re: [PATCH 12/12] xfs/349: reclassify this test as not dangerous
  2025-02-19  0:53   ` [PATCH 12/12] xfs/349: reclassify this test as not dangerous Darrick J. Wong
@ 2025-02-19  6:01     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:01 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled
  2025-02-19  0:53   ` [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled Darrick J. Wong
@ 2025-02-19  6:02     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:02 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees
  2025-02-19  0:53   ` [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees Darrick J. Wong
@ 2025-02-19  6:03     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:03 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:53:58PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> The golden output for thests tests encode the xfs_repair output when we
> fuzz various parts of the filesystem.  With metadata directory trees
> enabled, however, the golden output changes dramatically to reflect
> reconstruction of the metadata directory tree.
> 
> To avoid regressions, add a helper to force metadata directories off via
> MKFS_OPTIONS.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 03/12] common/repair: patch up repair sb inode value complaints
  2025-02-19  0:54   ` [PATCH 03/12] common/repair: patch up repair sb inode value complaints Darrick J. Wong
@ 2025-02-19  6:03     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:03 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 04/12] xfs/206: update for metadata directory support
  2025-02-19  0:54   ` [PATCH 04/12] xfs/206: update for metadata directory support Darrick J. Wong
@ 2025-02-19  6:04     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:04 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:54:29PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Filter 'metadir=' out of the golden output so that metadata directories
> don't cause this test to regress.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees
  2025-02-19  0:54   ` [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees Darrick J. Wong
@ 2025-02-19  6:04     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:04 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  2025-02-19  6:00     ` Christoph Hellwig
@ 2025-02-19  6:05       ` Darrick J. Wong
  2025-02-19  6:08         ` Christoph Hellwig
  0 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  6:05 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 10:00:57PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 04:53:11PM -0800, Darrick J. Wong wrote:
> > fsstress tests and two fsx tests to the auto group.  At this time I
> > don't have any plans to do the same for the other scrub stress tests.
> 
> Can you explain why only these four?

The rest of the stress tests pick /one/ metadata type and race
scrub/repair of it against fsstress by invoking xfs_io repeatedly.
xfs/28[56] runs the whole xfs_scrub program repeatedly so we get to
exercise all of them in a single test.

(The more specific ones make it a lot easier to debug problems.)

--D

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

* Re: [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories
  2025-02-19  0:55   ` [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories Darrick J. Wong
@ 2025-02-19  6:05     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:05 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 07/12] xfs: create fuzz tests for metadata directories
  2025-02-19  0:55   ` [PATCH 07/12] xfs: create fuzz tests " Darrick J. Wong
@ 2025-02-19  6:05     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:05 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 08/12] xfs/163: bigger fs for metadir
  2025-02-19  0:55   ` [PATCH 08/12] xfs/163: bigger fs for metadir Darrick J. Wong
@ 2025-02-19  6:06     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:06 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:55:32PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Adjust filesystem size up so we can pass this test even with metadir
> and rtgroups enabled.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir
  2025-02-19  0:55   ` [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir Darrick J. Wong
@ 2025-02-19  6:06     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:06 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:55:47PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> All of the ondisk structure size checks from this test were copied to
> the build time checks in xfs_ondisk.h.  This means that the kernel and
> xfsprogs build processes check the structure sizes, which means that
> fstests no longer needs to do that.

Looks good;

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 10/12] common/populate: label newly created xfs filesystems
  2025-02-19  0:56   ` [PATCH 10/12] common/populate: label newly created xfs filesystems Darrick J. Wong
@ 2025-02-19  6:06     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:06 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:56:03PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> When we're creating fully populated filesystems, add an obviously weird
> label to the filesystem images so that it's obvious that it's a test
> filesystem.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 11/12] scrub: race metapath online fsck with fsstress
  2025-02-19  0:56   ` [PATCH 11/12] scrub: race metapath online fsck with fsstress Darrick J. Wong
@ 2025-02-19  6:07     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:07 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:56:19PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Add a pair of new tests to exercise fsstress vs. metapath repairs.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 12/12] xfs: test metapath repairs
  2025-02-19  0:56   ` [PATCH 12/12] xfs: test metapath repairs Darrick J. Wong
@ 2025-02-19  6:07     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:07 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  2025-02-19  6:05       ` Darrick J. Wong
@ 2025-02-19  6:08         ` Christoph Hellwig
  2025-02-19  6:13           ` Darrick J. Wong
  0 siblings, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:08 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 10:05:04PM -0800, Darrick J. Wong wrote:
> > Can you explain why only these four?
> 
> The rest of the stress tests pick /one/ metadata type and race
> scrub/repair of it against fsstress by invoking xfs_io repeatedly.
> xfs/28[56] runs the whole xfs_scrub program repeatedly so we get to
> exercise all of them in a single test.
> 
> (The more specific ones make it a lot easier to debug problems.)

Can you add this to the commit log?  With that:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 1/4] xfs/019: reduce _fail calls in test
  2025-02-19  0:56   ` [PATCH 1/4] xfs/019: reduce _fail calls in test Darrick J. Wong
@ 2025-02-19  6:08     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:08 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 2/4] xfs/019: test reserved file support
  2025-02-19  0:57   ` [PATCH 2/4] xfs/019: test reserved file support Darrick J. Wong
@ 2025-02-19  6:09     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:09 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 3/4] xfs: test filesystem creation with xfs_protofile
  2025-02-19  0:57   ` [PATCH 3/4] xfs: test filesystem creation with xfs_protofile Darrick J. Wong
@ 2025-02-19  6:09     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:09 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support
  2025-02-19  0:57   ` [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support Darrick J. Wong
@ 2025-02-19  6:09     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:09 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCHSET 02/12] fstests: fix logwrites zeroing
  2025-02-19  5:55   ` [PATCHSET 02/12] fstests: fix logwrites zeroing Christoph Hellwig
@ 2025-02-19  6:13     ` Darrick J. Wong
  2025-02-19  6:20       ` Christoph Hellwig
  0 siblings, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  6:13 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: zlang, linux-xfs, fstests, Alasdair Kergon, Mike Snitzer,
	Mikulas Patocka, dm-devel

On Tue, Feb 18, 2025 at 09:55:36PM -0800, Christoph Hellwig wrote:
> I don't want to block this part as it's an improvement over the current
> state, but all these games of trying to detect if discard zeroes all
> data despite making no such guarantee whatsoever and being explicitly
> allowed to zero some but not all data just feels wrong.
> 
> The right thing would be to use the BLKZEROOUT, but AFAIK the problem is
> that dm-thin doesn't support that.  Given that the dm-thin discard
> implementation seems do always zero, it should be able to just be
> reusable for BLKZEROOUT.  Can the dm maintainers look into that as it
> is a pretty glaring omission?

Alternately we could make the log replay program call
fallocate(PUNCH_HOLE) on the block device before trying
fallocate(ZERO_RANGE) because AFAICT punch-hole has always called
blkdev_issue_zeroout with NOFALLBACK.  The downside is that fallocate
for block devices came long after BLKDISCARD/BLKZEROOUT so we can't
remove the BLK* ioctl calls without losing some coverage.

--D

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

* Re: [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group
  2025-02-19  6:08         ` Christoph Hellwig
@ 2025-02-19  6:13           ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19  6:13 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 10:08:06PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 10:05:04PM -0800, Darrick J. Wong wrote:
> > > Can you explain why only these four?
> > 
> > The rest of the stress tests pick /one/ metadata type and race
> > scrub/repair of it against fsstress by invoking xfs_io repeatedly.
> > xfs/28[56] runs the whole xfs_scrub program repeatedly so we get to
> > exercise all of them in a single test.
> > 
> > (The more specific ones make it a lot easier to debug problems.)
> 
> Can you add this to the commit log?  With that:

Will do!

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

--D

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

* Re: [PATCHSET 02/12] fstests: fix logwrites zeroing
  2025-02-19  6:13     ` Darrick J. Wong
@ 2025-02-19  6:20       ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  6:20 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: zlang, linux-xfs, fstests, Alasdair Kergon, Mike Snitzer,
	Mikulas Patocka, dm-devel

On Tue, Feb 18, 2025 at 10:13:36PM -0800, Darrick J. Wong wrote:
> Alternately we could make the log replay program call
> fallocate(PUNCH_HOLE) on the block device before trying
> fallocate(ZERO_RANGE) because AFAICT punch-hole has always called
> blkdev_issue_zeroout with NOFALLBACK.  The downside is that fallocate
> for block devices came long after BLKDISCARD/BLKZEROOUT so we can't
> remove the BLK* ioctl calls without losing some coverage.

FALLOC_FL_ZERO_RANGE on block devices has been around since 2016, so I
don't think that's a problem.  The problem is more that it isn't
supported on dm-thin at all.


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

* Re: [PATCH 01/15] common/populate: refactor caching of metadumps to a helper
  2025-02-19  0:57   ` [PATCH 01/15] common/populate: refactor caching of metadumps to a helper Darrick J. Wong
@ 2025-02-19  7:12     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:12 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore
  2025-02-19  0:58   ` [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore Darrick J. Wong
@ 2025-02-19  7:12     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:12 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally
  2025-02-19  0:58   ` [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally Darrick J. Wong
@ 2025-02-19  7:13     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:13 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 04/15] fuzzy: run fsx on data and rt sections of xfs filesystems equally
  2025-02-19  0:58   ` [PATCH 04/15] fuzzy: run fsx on " Darrick J. Wong
@ 2025-02-19  7:13     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:13 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations
  2025-02-19  0:58   ` [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations Darrick J. Wong
@ 2025-02-19  7:14     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:14 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots
  2025-02-19  0:59   ` [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots Darrick J. Wong
@ 2025-02-19  7:14     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:14 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units
  2025-02-19  0:59   ` [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units Darrick J. Wong
@ 2025-02-19  7:14     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:14 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature
  2025-02-19  0:59   ` [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature Darrick J. Wong
@ 2025-02-19  7:15     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:15 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 09/15] common: pass the realtime device to xfs_db when possible
  2025-02-19  0:59   ` [PATCH 09/15] common: pass the realtime device to xfs_db when possible Darrick J. Wong
@ 2025-02-19  7:15     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:15 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 10/15] xfs/185: update for rtgroups
  2025-02-19  1:00   ` [PATCH 10/15] xfs/185: update for rtgroups Darrick J. Wong
@ 2025-02-19  7:16     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:16 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 11/15] xfs/449: update test to know about xfs_db -R
  2025-02-19  1:00   ` [PATCH 11/15] xfs/449: update test to know about xfs_db -R Darrick J. Wong
@ 2025-02-19  7:16     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:16 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands
  2025-02-19  1:00   ` [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands Darrick J. Wong
@ 2025-02-19  7:17     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore
  2025-02-19  1:01   ` [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore Darrick J. Wong
@ 2025-02-19  7:17     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups
  2025-02-19  1:01   ` [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups Darrick J. Wong
@ 2025-02-19  7:17     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files
  2025-02-19  1:01   ` [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files Darrick J. Wong
@ 2025-02-19  7:18     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:18 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCHSET v6.4 07/12] fstests: store quota files in the metadir
  2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
                     ` (3 preceding siblings ...)
  2025-02-19  1:02   ` [PATCH 4/4] xfs: fix tests for persistent qflags Darrick J. Wong
@ 2025-02-19  7:19   ` Christoph Hellwig
  2025-02-19 16:57     ` Darrick J. Wong
  4 siblings, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:19 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, hch, linux-xfs, fstests

On Tue, Feb 18, 2025 at 04:47:40PM -0800, Darrick J. Wong wrote:
> Hi all,
> 
> Store the quota files in the metadata directory tree instead of the superblock.
> Since we're introducing a new incompat feature flag, let's also make the mount
> process bring up quotas in whatever state they were when the filesystem was
> last unmounted, instead of requiring sysadmins to remember that themselves.

This sentence looks like it was erroneously copied from the kernel
series.


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

* Re: [PATCH 1/4] xfs: update tests for quota files in the metadir
  2025-02-19  1:01   ` [PATCH 1/4] xfs: update tests for " Darrick J. Wong
@ 2025-02-19  7:19     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:19 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 2/4] xfs: test persistent quota flags
  2025-02-19  1:02   ` [PATCH 2/4] xfs: test persistent quota flags Darrick J. Wong
@ 2025-02-19  7:20     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:20 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 3/4] xfs: fix quota detection in fuzz tests
  2025-02-19  1:02   ` [PATCH 3/4] xfs: fix quota detection in fuzz tests Darrick J. Wong
@ 2025-02-19  7:20     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:20 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 4/4] xfs: fix tests for persistent qflags
  2025-02-19  1:02   ` [PATCH 4/4] xfs: fix tests for persistent qflags Darrick J. Wong
@ 2025-02-19  7:20     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:20 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 1/3] common: enable testing of realtime quota when supported
  2025-02-19  1:02   ` [PATCH 1/3] common: enable testing of realtime quota when supported Darrick J. Wong
@ 2025-02-19  7:21     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:21 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota
  2025-02-19  1:03   ` [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota Darrick J. Wong
@ 2025-02-19  7:21     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:21 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 3/3] xfs: regression testing of quota on the realtime device
  2025-02-19  1:03   ` [PATCH 3/3] xfs: regression testing of quota on the realtime device Darrick J. Wong
@ 2025-02-19  7:21     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:21 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 1/1] common: test statfs reporting with project quota
  2025-02-19  1:03   ` [PATCH 1/1] common: test statfs reporting with project quota Darrick J. Wong
@ 2025-02-19  7:22     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:22 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode
  2025-02-19  1:03   ` [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode Darrick J. Wong
@ 2025-02-19  7:24     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:24 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 02/13] xfs/336: port to common/metadump
  2025-02-19  1:04   ` [PATCH 02/13] xfs/336: port to common/metadump Darrick J. Wong
@ 2025-02-19  7:24     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:24 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, fstests, linux-xfs

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file
  2025-02-19  1:04   ` [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file Darrick J. Wong
@ 2025-02-19  7:25     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:25 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair
  2025-02-19  1:04   ` [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair Darrick J. Wong
@ 2025-02-19  7:26     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:26 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device
  2025-02-19  1:04   ` [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device Darrick J. Wong
@ 2025-02-19  7:27     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:27 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 06/13] xfs/341: update test for rtgroup-based rmap
  2025-02-19  1:05   ` [PATCH 06/13] xfs/341: update test for rtgroup-based rmap Darrick J. Wong
@ 2025-02-19  7:27     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:27 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1
  2025-02-19  1:05   ` [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1 Darrick J. Wong
@ 2025-02-19  7:27     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:27 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic
  2025-02-19  1:05   ` [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic Darrick J. Wong
@ 2025-02-19  7:28     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:28 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 09/13] xfs: skip tests if formatting small filesystem fails
  2025-02-19  1:05   ` [PATCH 09/13] xfs: skip tests if formatting small filesystem fails Darrick J. Wong
@ 2025-02-19  7:30     ` Christoph Hellwig
  2025-02-19 17:13       ` Darrick J. Wong
  2025-02-19 19:17     ` [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized Darrick J. Wong
  1 sibling, 1 reply; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:30 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 05:05:59PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> There are a few tests that try to exercise XFS functionality with an
> unusually small (< 500MB) filesystem.  Formatting can fail if the test
> configuration also specifies a very large realtime device because mkfs
> hits ENOSPC when allocating the realtime metadata.  The test proceeds
> anyway (which causes an immediate mount failure) so we might as well
> skip these.

In this patch only a single test case is touched and not a few.  But
I remember hitting a few more with the zoned testing.


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

* Re: [PATCH 10/13] xfs/443: use file allocation unit, not dbsize
  2025-02-19  1:06   ` [PATCH 10/13] xfs/443: use file allocation unit, not dbsize Darrick J. Wong
@ 2025-02-19  7:31     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:31 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups
  2025-02-19  1:06   ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong
@ 2025-02-19  7:32     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:32 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height
  2025-02-19  1:06   ` [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height Darrick J. Wong
@ 2025-02-19  7:32     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:32 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees
  2025-02-19  1:07   ` [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees Darrick J. Wong
@ 2025-02-19  7:32     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:32 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 1/7] common/populate: create realtime refcount btree
  2025-02-19  1:07   ` [PATCH 1/7] common/populate: create realtime refcount btree Darrick J. Wong
@ 2025-02-19  7:41     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:41 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 2/7] xfs: create fuzz tests for the realtime refcount btree
  2025-02-19  1:07   ` [PATCH 2/7] xfs: create fuzz tests for the " Darrick J. Wong
@ 2025-02-19  7:42     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:42 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume
  2025-02-19  1:07   ` [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume Darrick J. Wong
@ 2025-02-19  7:42     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:42 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair
  2025-02-19  1:08   ` [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair Darrick J. Wong
@ 2025-02-19  7:43     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:43 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes
  2025-02-19  1:08   ` [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes Darrick J. Wong
@ 2025-02-19  7:43     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:43 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation
  2025-02-19  1:08   ` [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation Darrick J. Wong
@ 2025-02-19  7:44     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:44 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section
  2025-02-19  1:08   ` [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section Darrick J. Wong
@ 2025-02-19  7:44     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:44 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH 1/1] xfs: test filesystem recovery with rdump
  2025-02-19  1:09   ` [PATCH 1/1] xfs: test filesystem recovery with rdump Darrick J. Wong
@ 2025-02-19  7:45     ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-19  7:45 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 05:09:07PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Test how well we can dump a fully populated filesystem's contents.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

* Re: [PATCHSET v6.4 07/12] fstests: store quota files in the metadir
  2025-02-19  7:19   ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Christoph Hellwig
@ 2025-02-19 16:57     ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19 16:57 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, hch, linux-xfs, fstests

On Tue, Feb 18, 2025 at 11:19:11PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 04:47:40PM -0800, Darrick J. Wong wrote:
> > Hi all,
> > 
> > Store the quota files in the metadata directory tree instead of the superblock.
> > Since we're introducing a new incompat feature flag, let's also make the mount
> > process bring up quotas in whatever state they were when the filesystem was
> > last unmounted, instead of requiring sysadmins to remember that themselves.
> 
> This sentence looks like it was erroneously copied from the kernel
> series.

Oops, yeah.  Will change it to:

"These are the fstests adjustments to quota handling in metadir
filesystems, which means finding the quota inodes through paths, and
adjusting to quota options being persistent."

--D

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

* Re: [PATCH 09/13] xfs: skip tests if formatting small filesystem fails
  2025-02-19  7:30     ` Christoph Hellwig
@ 2025-02-19 17:13       ` Darrick J. Wong
  0 siblings, 0 replies; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19 17:13 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests

On Tue, Feb 18, 2025 at 11:30:57PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 18, 2025 at 05:05:59PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > There are a few tests that try to exercise XFS functionality with an
> > unusually small (< 500MB) filesystem.  Formatting can fail if the test
> > configuration also specifies a very large realtime device because mkfs
> > hits ENOSPC when allocating the realtime metadata.  The test proceeds
> > anyway (which causes an immediate mount failure) so we might as well
> > skip these.
> 
> In this patch only a single test case is touched and not a few.  But
> I remember hitting a few more with the zoned testing.

Originally there were a few more, but most of the others I fixed by
making _scratch_mkfs_sized constrict the size of both the data and rt
volumes.  The 2022 version of this patch changed both xfs/104 and
xfs/291.

Oh, wait, the xfs/291 change became its own patch.

Right.  _scratch_mkfs_sized takes arguments now.  So this patch should
make create_scratch() use that instead of plain _scratch_mkfs_xfs.

--D

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

* [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized
  2025-02-19  1:05   ` [PATCH 09/13] xfs: skip tests if formatting small filesystem fails Darrick J. Wong
  2025-02-19  7:30     ` Christoph Hellwig
@ 2025-02-19 19:17     ` Darrick J. Wong
  2025-02-20  6:17       ` Christoph Hellwig
  1 sibling, 1 reply; 178+ messages in thread
From: Darrick J. Wong @ 2025-02-19 19:17 UTC (permalink / raw)
  To: zlang; +Cc: hch, linux-xfs, fstests

From: Darrick J. Wong <djwong@kernel.org>

Use _scratch_mkfs_sized instead of opencoding the small fs creation
logic because the helper scales down the size of the rt volume to match
the data volume.  This means the format won't fail if SCRATCH_RTDEV is
quite large.

Also fix some incorrect bash usage of "$@" and remove the leading
underscore because it's a private test function.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
v6.4.1: use _scratch_mkfs_sized this time
---
 tests/xfs/104 |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/xfs/104 b/tests/xfs/104
index cd625d6b74aaaf..d4fc3ec136ae5f 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -12,10 +12,10 @@ _begin_fstest growfs ioctl prealloc auto stress
 # Import common functions.
 . ./common/filter
 
-_create_scratch()
+create_scratch_sized()
 {
 	echo "*** mkfs"
-	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_sized "$@" | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 
 	echo "*** mount"
@@ -61,7 +61,7 @@ size=`expr 125 \* 1048576`	# 120 megabytes initially
 sizeb=`expr $size / $dbsize`	# in data blocks
 echo "*** creating scratch filesystem"
 logblks=$(_scratch_find_xfs_min_logblocks -dsize=${size} -dagcount=${nags})
-_create_scratch -lsize=${logblks}b -dsize=${size} -dagcount=${nags}
+create_scratch_sized "${size}" '' -lsize=${logblks}b -dagcount=${nags}
 
 echo "*** using some initial space on scratch filesystem"
 for i in `seq 125 -1 90`; do

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

* Re: [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized
  2025-02-19 19:17     ` [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized Darrick J. Wong
@ 2025-02-20  6:17       ` Christoph Hellwig
  0 siblings, 0 replies; 178+ messages in thread
From: Christoph Hellwig @ 2025-02-20  6:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

end of thread, other threads:[~2025-02-20  6:17 UTC | newest]

Thread overview: 178+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19  0:43 [PATCHBOMB] fstests: catch us up to 6.12-6.14 changes Darrick J. Wong
2025-02-19  0:46 ` [PATCHSET 01/12] fstests: more random fixes for v2025.02.16 Darrick J. Wong
2025-02-19  0:49   ` [PATCH 1/2] dio-writeback-race: fix missing mode in O_CREAT Darrick J. Wong
2025-02-19  5:50     ` Christoph Hellwig
2025-02-19  0:49   ` [PATCH 2/2] dio_writeback_race: align the directio buffer to base page size Darrick J. Wong
2025-02-19  5:51     ` Christoph Hellwig
2025-02-19  5:55       ` Darrick J. Wong
2025-02-19  0:46 ` [PATCHSET 02/12] fstests: fix logwrites zeroing Darrick J. Wong
2025-02-19  0:49   ` [PATCH 1/3] logwrites: warn if we don't think read after discard returns zeroes Darrick J. Wong
2025-02-19  0:50   ` [PATCH 2/3] logwrites: use BLKZEROOUT if it's available Darrick J. Wong
2025-02-19  0:50   ` [PATCH 3/3] logwrites: only use BLKDISCARD if we know discard zeroes data Darrick J. Wong
2025-02-19  5:55   ` [PATCHSET 02/12] fstests: fix logwrites zeroing Christoph Hellwig
2025-02-19  6:13     ` Darrick J. Wong
2025-02-19  6:20       ` Christoph Hellwig
2025-02-19  0:46 ` [PATCHSET v32.1 03/12] fstests: fix online and offline fsck test groups Darrick J. Wong
2025-02-19  0:50   ` [PATCH 01/12] misc: drop the dangerous label from xfs_scrub fsstress tests Darrick J. Wong
2025-02-19  5:56     ` Christoph Hellwig
2025-02-19  0:50   ` [PATCH 02/12] misc: rename the dangerous_repair group to fuzzers_repair Darrick J. Wong
2025-02-19  5:56     ` Christoph Hellwig
2025-02-19  0:51   ` [PATCH 03/12] misc: rename the dangerous_online_repair group to fuzzers_online_repair Darrick J. Wong
2025-02-19  5:57     ` Christoph Hellwig
2025-02-19  0:51   ` [PATCH 04/12] misc: rename the dangerous_bothrepair group to fuzzers_bothrepair Darrick J. Wong
2025-02-19  5:57     ` Christoph Hellwig
2025-02-19  0:51   ` [PATCH 05/12] misc: rename the dangerous_norepair group to fuzzers_norepair Darrick J. Wong
2025-02-19  5:58     ` Christoph Hellwig
2025-02-19  0:51   ` [PATCH 06/12] misc: fix misclassification of xfs_repair fuzz tests Darrick J. Wong
2025-02-19  5:58     ` Christoph Hellwig
2025-02-19  0:52   ` [PATCH 07/12] misc: fix misclassification of xfs_scrub + " Darrick J. Wong
2025-02-19  5:59     ` Christoph Hellwig
2025-02-19  0:52   ` [PATCH 08/12] misc: fix misclassification of verifier " Darrick J. Wong
2025-02-19  5:59     ` Christoph Hellwig
2025-02-19  0:52   ` [PATCH 09/12] misc: add xfs_scrub + xfs_repair fuzz tests to the scrub and repair groups Darrick J. Wong
2025-02-19  5:59     ` Christoph Hellwig
2025-02-19  0:52   ` [PATCH 10/12] misc: remove the dangerous_scrub group Darrick J. Wong
2025-02-19  6:00     ` Christoph Hellwig
2025-02-19  0:53   ` [PATCH 11/12] xfs/28[56],xfs/56[56]: add to the auto group Darrick J. Wong
2025-02-19  6:00     ` Christoph Hellwig
2025-02-19  6:05       ` Darrick J. Wong
2025-02-19  6:08         ` Christoph Hellwig
2025-02-19  6:13           ` Darrick J. Wong
2025-02-19  0:53   ` [PATCH 12/12] xfs/349: reclassify this test as not dangerous Darrick J. Wong
2025-02-19  6:01     ` Christoph Hellwig
2025-02-19  0:46 ` [PATCHSET v6.4 04/12] fstests: enable metadir Darrick J. Wong
2025-02-19  0:53   ` [PATCH 01/12] various: fix finding metadata inode numbers when metadir is enabled Darrick J. Wong
2025-02-19  6:02     ` Christoph Hellwig
2025-02-19  0:53   ` [PATCH 02/12] xfs/{030,033,178}: forcibly disable metadata directory trees Darrick J. Wong
2025-02-19  6:03     ` Christoph Hellwig
2025-02-19  0:54   ` [PATCH 03/12] common/repair: patch up repair sb inode value complaints Darrick J. Wong
2025-02-19  6:03     ` Christoph Hellwig
2025-02-19  0:54   ` [PATCH 04/12] xfs/206: update for metadata directory support Darrick J. Wong
2025-02-19  6:04     ` Christoph Hellwig
2025-02-19  0:54   ` [PATCH 05/12] xfs/{050,144,153,299,330}: update quota reports to handle metadir trees Darrick J. Wong
2025-02-19  6:04     ` Christoph Hellwig
2025-02-19  0:55   ` [PATCH 06/12] xfs/509: adjust inumbers accounting for metadata directories Darrick J. Wong
2025-02-19  6:05     ` Christoph Hellwig
2025-02-19  0:55   ` [PATCH 07/12] xfs: create fuzz tests " Darrick J. Wong
2025-02-19  6:05     ` Christoph Hellwig
2025-02-19  0:55   ` [PATCH 08/12] xfs/163: bigger fs for metadir Darrick J. Wong
2025-02-19  6:06     ` Christoph Hellwig
2025-02-19  0:55   ` [PATCH 09/12] xfs/122: disable this test for any codebase that knows about metadir Darrick J. Wong
2025-02-19  6:06     ` Christoph Hellwig
2025-02-19  0:56   ` [PATCH 10/12] common/populate: label newly created xfs filesystems Darrick J. Wong
2025-02-19  6:06     ` Christoph Hellwig
2025-02-19  0:56   ` [PATCH 11/12] scrub: race metapath online fsck with fsstress Darrick J. Wong
2025-02-19  6:07     ` Christoph Hellwig
2025-02-19  0:56   ` [PATCH 12/12] xfs: test metapath repairs Darrick J. Wong
2025-02-19  6:07     ` Christoph Hellwig
2025-02-19  0:47 ` [PATCHSET v6.4 05/12] fstests: make protofiles less janky Darrick J. Wong
2025-02-19  0:56   ` [PATCH 1/4] xfs/019: reduce _fail calls in test Darrick J. Wong
2025-02-19  6:08     ` Christoph Hellwig
2025-02-19  0:57   ` [PATCH 2/4] xfs/019: test reserved file support Darrick J. Wong
2025-02-19  6:09     ` Christoph Hellwig
2025-02-19  0:57   ` [PATCH 3/4] xfs: test filesystem creation with xfs_protofile Darrick J. Wong
2025-02-19  6:09     ` Christoph Hellwig
2025-02-19  0:57   ` [PATCH 4/4] fstests: test mkfs.xfs protofiles with xattr support Darrick J. Wong
2025-02-19  6:09     ` Christoph Hellwig
2025-02-19  0:47 ` [PATCHSET v6.4 06/12] fstests: shard the realtime section Darrick J. Wong
2025-02-19  0:57   ` [PATCH 01/15] common/populate: refactor caching of metadumps to a helper Darrick J. Wong
2025-02-19  7:12     ` Christoph Hellwig
2025-02-19  0:58   ` [PATCH 02/15] common/{fuzzy,populate}: use _scratch_xfs_mdrestore Darrick J. Wong
2025-02-19  7:12     ` Christoph Hellwig
2025-02-19  0:58   ` [PATCH 03/15] fuzzy: stress data and rt sections of xfs filesystems equally Darrick J. Wong
2025-02-19  7:13     ` Christoph Hellwig
2025-02-19  0:58   ` [PATCH 04/15] fuzzy: run fsx on " Darrick J. Wong
2025-02-19  7:13     ` Christoph Hellwig
2025-02-19  0:58   ` [PATCH 05/15] common/ext4: reformat external logs during mdrestore operations Darrick J. Wong
2025-02-19  7:14     ` Christoph Hellwig
2025-02-19  0:59   ` [PATCH 06/15] common/populate: use metadump v2 format by default for fs metadata snapshots Darrick J. Wong
2025-02-19  7:14     ` Christoph Hellwig
2025-02-19  0:59   ` [PATCH 07/15] punch-alternating: detect xfs realtime files with large allocation units Darrick J. Wong
2025-02-19  7:14     ` Christoph Hellwig
2025-02-19  0:59   ` [PATCH 08/15] xfs/206: update mkfs filtering for rt groups feature Darrick J. Wong
2025-02-19  7:15     ` Christoph Hellwig
2025-02-19  0:59   ` [PATCH 09/15] common: pass the realtime device to xfs_db when possible Darrick J. Wong
2025-02-19  7:15     ` Christoph Hellwig
2025-02-19  1:00   ` [PATCH 10/15] xfs/185: update for rtgroups Darrick J. Wong
2025-02-19  7:16     ` Christoph Hellwig
2025-02-19  1:00   ` [PATCH 11/15] xfs/449: update test to know about xfs_db -R Darrick J. Wong
2025-02-19  7:16     ` Christoph Hellwig
2025-02-19  1:00   ` [PATCH 12/15] xfs/271,xfs/556: fix tests to deal with rtgroups output in bmap/fsmap commands Darrick J. Wong
2025-02-19  7:17     ` Christoph Hellwig
2025-02-19  1:01   ` [PATCH 13/15] common/xfs: capture realtime devices during metadump/mdrestore Darrick J. Wong
2025-02-19  7:17     ` Christoph Hellwig
2025-02-19  1:01   ` [PATCH 14/15] common/fuzzy: adapt the scrub stress tests to support rtgroups Darrick J. Wong
2025-02-19  7:17     ` Christoph Hellwig
2025-02-19  1:01   ` [PATCH 15/15] xfs: fix fuzz tests of rtgroups bitmap and summary files Darrick J. Wong
2025-02-19  7:18     ` Christoph Hellwig
2025-02-19  0:47 ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Darrick J. Wong
2025-02-19  1:01   ` [PATCH 1/4] xfs: update tests for " Darrick J. Wong
2025-02-19  7:19     ` Christoph Hellwig
2025-02-19  1:02   ` [PATCH 2/4] xfs: test persistent quota flags Darrick J. Wong
2025-02-19  7:20     ` Christoph Hellwig
2025-02-19  1:02   ` [PATCH 3/4] xfs: fix quota detection in fuzz tests Darrick J. Wong
2025-02-19  7:20     ` Christoph Hellwig
2025-02-19  1:02   ` [PATCH 4/4] xfs: fix tests for persistent qflags Darrick J. Wong
2025-02-19  7:20     ` Christoph Hellwig
2025-02-19  7:19   ` [PATCHSET v6.4 07/12] fstests: store quota files in the metadir Christoph Hellwig
2025-02-19 16:57     ` Darrick J. Wong
2025-02-19  0:47 ` [PATCHSET v6.4 08/12] fstests: enable quota for realtime volumes Darrick J. Wong
2025-02-19  1:02   ` [PATCH 1/3] common: enable testing of realtime quota when supported Darrick J. Wong
2025-02-19  7:21     ` Christoph Hellwig
2025-02-19  1:03   ` [PATCH 2/3] xfs: fix quota tests to adapt to realtime quota Darrick J. Wong
2025-02-19  7:21     ` Christoph Hellwig
2025-02-19  1:03   ` [PATCH 3/3] xfs: regression testing of quota on the realtime device Darrick J. Wong
2025-02-19  7:21     ` Christoph Hellwig
2025-02-19  0:48 ` [PATCHSET 09/12] fstests: check new 6.14 behaviors Darrick J. Wong
2025-02-19  1:03   ` [PATCH 1/1] common: test statfs reporting with project quota Darrick J. Wong
2025-02-19  7:22     ` Christoph Hellwig
2025-02-19  0:48 ` [PATCHSET v6.4 10/12] fstests: realtime reverse-mapping support Darrick J. Wong
2025-02-19  1:03   ` [PATCH 01/13] xfs: fix tests that try to access the realtime rmap inode Darrick J. Wong
2025-02-19  7:24     ` Christoph Hellwig
2025-02-19  1:04   ` [PATCH 02/13] xfs/336: port to common/metadump Darrick J. Wong
2025-02-19  7:24     ` Christoph Hellwig
2025-02-19  1:04   ` [PATCH 03/13] fuzz: for fuzzing the rtrmapbt, find the path to the rt rmap btree file Darrick J. Wong
2025-02-19  7:25     ` Christoph Hellwig
2025-02-19  1:04   ` [PATCH 04/13] xfs: race fsstress with realtime rmap btree scrub and repair Darrick J. Wong
2025-02-19  7:26     ` Christoph Hellwig
2025-02-19  1:04   ` [PATCH 05/13] xfs: fix various problems with fsmap detecting the data device Darrick J. Wong
2025-02-19  7:27     ` Christoph Hellwig
2025-02-19  1:05   ` [PATCH 06/13] xfs/341: update test for rtgroup-based rmap Darrick J. Wong
2025-02-19  7:27     ` Christoph Hellwig
2025-02-19  1:05   ` [PATCH 07/13] xfs/3{43,32}: adapt tests for rt extent size greater than 1 Darrick J. Wong
2025-02-19  7:27     ` Christoph Hellwig
2025-02-19  1:05   ` [PATCH 08/13] xfs/291: use _scratch_mkfs_sized instead of opencoding the logic Darrick J. Wong
2025-02-19  7:28     ` Christoph Hellwig
2025-02-19  1:05   ` [PATCH 09/13] xfs: skip tests if formatting small filesystem fails Darrick J. Wong
2025-02-19  7:30     ` Christoph Hellwig
2025-02-19 17:13       ` Darrick J. Wong
2025-02-19 19:17     ` [PATCH v6.4.1 09/13] xfs/104: use _scratch_mkfs_sized Darrick J. Wong
2025-02-20  6:17       ` Christoph Hellwig
2025-02-19  1:06   ` [PATCH 10/13] xfs/443: use file allocation unit, not dbsize Darrick J. Wong
2025-02-19  7:31     ` Christoph Hellwig
2025-02-19  1:06   ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong
2025-02-19  7:32     ` Christoph Hellwig
2025-02-19  1:06   ` [PATCH 12/13] populate: check that we created a realtime rmap btree of the given height Darrick J. Wong
2025-02-19  7:32     ` Christoph Hellwig
2025-02-19  1:07   ` [PATCH 13/13] fuzzy: create missing fuzz tests for rt rmap btrees Darrick J. Wong
2025-02-19  7:32     ` Christoph Hellwig
2025-02-19  0:48 ` [PATCHSET v6.4 11/12] fstests: reflink on the realtime device Darrick J. Wong
2025-02-19  1:07   ` [PATCH 1/7] common/populate: create realtime refcount btree Darrick J. Wong
2025-02-19  7:41     ` Christoph Hellwig
2025-02-19  1:07   ` [PATCH 2/7] xfs: create fuzz tests for the " Darrick J. Wong
2025-02-19  7:42     ` Christoph Hellwig
2025-02-19  1:07   ` [PATCH 3/7] xfs/27[24]: adapt for checking files on the realtime volume Darrick J. Wong
2025-02-19  7:42     ` Christoph Hellwig
2025-02-19  1:08   ` [PATCH 4/7] xfs: race fsstress with realtime refcount btree scrub and repair Darrick J. Wong
2025-02-19  7:43     ` Christoph Hellwig
2025-02-19  1:08   ` [PATCH 5/7] xfs: remove xfs/131 now that we allow reflink on realtime volumes Darrick J. Wong
2025-02-19  7:43     ` Christoph Hellwig
2025-02-19  1:08   ` [PATCH 6/7] generic/331,xfs/240: support files that skip delayed allocation Darrick J. Wong
2025-02-19  7:44     ` Christoph Hellwig
2025-02-19  1:08   ` [PATCH 7/7] common/xfs: fix _xfs_get_file_block_size when rtinherit is set and no rt section Darrick J. Wong
2025-02-19  7:44     ` Christoph Hellwig
2025-02-19  0:49 ` [PATCHSET 12/12] fstests: dump fs directory trees Darrick J. Wong
2025-02-19  1:09   ` [PATCH 1/1] xfs: test filesystem recovery with rdump Darrick J. Wong
2025-02-19  7:45     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-12-31 20:00 [PATCHSET v2.0 4/9] fstests: fixes for realtime rmap Darrick J. Wong
2023-12-27 14:00 ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong
2022-12-30 22:20 [PATCHSET v1.0 00/13] fstests: fixes for realtime rmap Darrick J. Wong
2022-12-30 22:20 ` [PATCH 11/13] populate: adjust rtrmap calculations for rtgroups Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox