Skip to contentSkip to conversation

xfs/656: rearrange directio pread/pwrite for zoned filesystems

PATCH In review Darrick J. Wong 3 participants 7 messages Jul 2 – Jul 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xfs/656: rearrange directio pread/pwrite for zoned filesystems

From: Darrick J. Wong <[email protected]>

On zoned filesystems, a write failure shuts down the filesystem, which makes this test fail with:

--- /run/fstests/bin/tests/xfs/656.out 2026-03-13 16:19:08.152939212 -0700
+++ /run/fstests/logs/xfs/656.out.bad 2026-06-30 18:16:43.847849604 -0700
@@ -1,10 +1,9 @@
QA output created by 656
Format and mount
pwrite: Input/output error
-pread: Input/output error
+stat: Input/output error
pread: Input/output error
fsync: Input/output error
VICTIM pos NUM len NUM: directio_write: Input/output error
-VICTIM pos NUM len NUM: directio_read: Input/output error
VICTIM pos NUM len NUM: buffered_read: Input/output error VICTIM pos NUM len NUM: buffered_write: Input/output error

Reorder the directio pread and pwrite to avoid this unnecessary failure. Note that we cycle the mount between the direct and buffered io tests, which is why we only need to fix the directio test.

---
 tests/xfs/656     |    2 +-
 tests/xfs/656.out |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
tests/xfs/656 +1 -1
index 3a867692502134..df91bbdacea222 100755
@@ -65,8 +65,8 @@ $XFS_IO_PROG -c 'healthmon -c -v' $SCRATCH_MNT >> $tmp.healthmon &
 healer_pid=$!
 sleep 1	# wait for program to start up
 _dmerror_load_error_table
-$XFS_IO_PROG -d -c 'pwrite -b 256k 12k 16k' $testfile >> $seqres.full
 $XFS_IO_PROG -d -c 'pread -b 256k 10g 16k' $testfile >> $seqres.full
+$XFS_IO_PROG -d -c 'pwrite -b 256k 12k 16k' $testfile >> $seqres.full
 _dmerror_load_working_table
 
 _dmerror_unmount
tests/xfs/656.out +2 -2
index 83b2f5948a772b..4d6633060acdd0 100644
@@ -1,10 +1,10 @@
 QA output created by 656
 Format and mount
+pread: Input/output error
 pwrite: Input/output error
 pread: Input/output error
-pread: Input/output error
 fsync: Input/output error
-VICTIM pos NUM len NUM: directio_write: Input/output error
 VICTIM pos NUM len NUM: directio_read: Input/output error
+VICTIM pos NUM len NUM: directio_write: Input/output error
 VICTIM pos NUM len NUM: buffered_read: Input/output error
 VICTIM pos NUM len NUM: buffered_write: Input/output error
#1 lore raw

PATCH 2/2 xfs/65[56]: don't unset SCRATCH_RTDEV here

From: Darrick J. Wong <[email protected]>

Both of these tests claim that they have to unset SCRATCH_RTDEV to avoid formatting failures due to the rt bitmap consuming all the space in the "small" data device. However, the format doesn't constrain the size of the data device, so the justification doesn't apply. Remove the whole thing.

---
 tests/xfs/655 |    4 ----
 tests/xfs/656 |    4 ----
 2 files changed, 8 deletions(-)
tests/xfs/655 +0 -4
index a4162d70b321f9..9d09cc00053138 100755
@@ -24,10 +24,6 @@ _require_scratch_nocheck
 _require_scratch_xfs_crc # can't detect minor corruption w/o crc
 _require_xfs_io_command healthmon
 
-# Disable the scratch rt device to avoid test failures relating to the rt
-# bitmap consuming all the free space in our small data device.
-unset SCRATCH_RTDEV
-
 echo "Format and mount"
 _scratch_mkfs -d agcount=1 | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
 . $tmp.mkfs
tests/xfs/656 +0 -4
index df91bbdacea222..5d2d2e55c3d21c 100755
@@ -40,10 +40,6 @@ filter_healer_errors() {
 		uniq
 }
 
-# Disable the scratch rt device to avoid test failures relating to the rt
-# bitmap consuming all the free space in our small data device.
-unset SCRATCH_RTDEV
-
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
 _dmerror_init no_log
#4 lore raw
In reply to Darrick J. Wong
Quoted 4 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

On zoned filesystems, a write failure shuts down the filesystem, which makes this test fail with:

Looks good an increases the test coverage. This also makes half of "common: skip data write EIO survival tests on fatal configs" obsolete.

Darrick, Yao, Zorro: I think we need to arrange all the tests in this area into a coherent series. Should I do that?

#2 lore raw

Re: [PATCH 2/2] xfs/65[56]: don't unset SCRATCH_RTDEV here

In reply to Darrick J. Wong
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Both of these tests claim that they have to unset SCRATCH_RTDEV to avoid formatting failures due to the rt bitmap consuming all the space in the "small" data device. However, the format doesn't constrain the size of the data device, so the justification doesn't apply. Remove the whole thing.

Looks good, but as-is clashes with my
"formalize and fix disabling the RT subvolume" patch. It might make sense to take these two patches first, and then modified version of

"formalize and fix disabling the RT subvolume"

and

"common: skip data write EIO survival tests on fatal configs"

on top of that.

#5 lore raw
In reply to Christoph Hellwig
Quoted 11 lines · Christoph Hellwig
Quoted 4 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

On zoned filesystems, a write failure shuts down the filesystem, which makes this test fail with:

Looks good an increases the test coverage. This also makes half of "common: skip data write EIO survival tests on fatal configs" obsolete.

Darrick, Yao, Zorro: I think we need to arrange all the tests in this area into a coherent series. Should I do that?

Yes please :)

--D

#3 lore raw

Re: [PATCH 2/2] xfs/65[56]: don't unset SCRATCH_RTDEV here

In reply to Christoph Hellwig
Quoted 14 lines · Christoph Hellwig
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Both of these tests claim that they have to unset SCRATCH_RTDEV to avoid formatting failures due to the rt bitmap consuming all the space in the "small" data device. However, the format doesn't constrain the size of the data device, so the justification doesn't apply. Remove the whole thing.

Looks good, but as-is clashes with my
"formalize and fix disabling the RT subvolume" patch. It might make sense to take these two patches first, and then modified version of

Quoted 7 lines

"formalize and fix disabling the RT subvolume"

and

"common: skip data write EIO survival tests on fatal configs"

on top of that.

Whatever order's most convenient for you is 100% ok with me. That said, yes, let's remove the braindamage from xfs/65[56] first.

--D

#6 lore raw
In reply to Christoph Hellwig
Quoted 11 lines · Christoph Hellwig
Quoted 4 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

On zoned filesystems, a write failure shuts down the filesystem, which makes this test fail with:

Looks good an increases the test coverage. This also makes half of "common: skip data write EIO survival tests on fatal configs" obsolete.

Darrick, Yao, Zorro: I think we need to arrange all the tests in this area into a coherent series. Should I do that?

Yes, please.

The ordering makes sense to me. Please feel free to fold my patch into the series as needed.

Thanks,
Yao