[PATCH 1/8] generic/427: try to ensure there's some free space before we do the aio test

Darrick J. Wong
2025-10-15T16:36:58Z

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

On a filesystem configured like this:
MKFS_OPTIONS="-m metadir=1,autofsck=1,uquota,gquota,pquota -d rtinherit=1 -r zoned=1"

This test fails like this:

--- a/tests/generic/427.out 2025-04-30 16:20:44.584246582 -0700
+++ b/tests/generic/427.out.bad 2025-07-14 10:47:07.605377287 -0700
@@ -1,2 +1,2 @@
QA output created by 427
-Success, all done.
+pwrite: No space left on device

The pwrite failure comes from the aio-dio-eof-race.c program because the
filesystem ran out of space. There are no speculative posteof
preallocations on a zoned filesystem, so let's skip this test on those
setups.

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

diff --git a/tests/generic/427 b/tests/generic/427
index bddfdb8714e9a7..bb20d9f44a2b5a 100755
--- a/tests/generic/427
+++ b/tests/generic/427
@@ -28,6 +28,9 @@ _require_no_compress
_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount

+# Zoned filesystems don't support speculative preallocations
+_require_inplace_writes $SCRATCH_MNT
+
# try to write more bytes than filesystem size to fill the filesystem,
# then remove all these data. If we still can find these stale data in
# a file' eofblock, then it's a bug