From: Jan Kara <jack@suse.cz>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH] generic/347: Fix sporadic test failures
Date: Thu, 30 Jul 2026 17:18:17 +0200 [thread overview]
Message-ID: <20260730151817.4120874-1-jack@suse.cz> (raw)
generic/347 was occasionally failing on ext4 in our QA due to ext4
aborting its journal when the filesystem on thinp device was overfilled.
I have tracked the problem down to journal checkpointing failing to
write a metadata block to its final location due to ENOSPC failure from
the thinp device. Modify the test to first preallocate blocks for the
files and remount the filesystem which practically makes sure all
involved metadata blocks were written and so their further modifications
will not fail.
Signed-off-by: Jan Kara <jack@suse.cz>
---
tests/generic/347 | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/generic/347 b/tests/generic/347
index 06df0cf9eddc..56538c160392 100755
--- a/tests/generic/347
+++ b/tests/generic/347
@@ -38,7 +38,17 @@ _setup_thin()
_workout()
{
- # Overfill it by a bit
+ # Preallocate space to avoid failure for metadata writeback
+ for I in `seq 1 500`; do
+ $XFS_IO_PROG -f -c "falloc 0 1M" $SCRATCH_MNT/file$I &>/dev/null
+ done
+
+ # Unmount and check the device to make sure all metadata is written
+ _dmthin_check_fs
+ _dmthin_mount
+
+ # Write the data blocks to force thinp space allocation.
+ # Overfill it by a bit.
for I in `seq 1 500`; do
$XFS_IO_PROG -f -c "pwrite -W 0 1M" $SCRATCH_MNT/file$I &>/dev/null
done
--
2.51.0
next reply other threads:[~2026-07-30 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 15:18 Jan Kara [this message]
2026-08-03 8:27 ` [PATCH] generic/347: Fix sporadic test failures Zorro Lang
2026-08-03 11:20 ` Jan Kara
2026-08-04 10:12 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730151817.4120874-1-jack@suse.cz \
--to=jack@suse.cz \
--cc=fstests@vger.kernel.org \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.