From: Brian Foster <bfoster@redhat.com>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, djwong@kernel.org,
josef@toxicpanda.com, david@fromorbit.com
Subject: [PATCH 0/3] fstests/fsx: test coverage for eof zeroing
Date: Thu, 22 Aug 2024 10:44:19 -0400 [thread overview]
Message-ID: <20240822144422.188462-1-bfoster@redhat.com> (raw)
Hi all,
One of the questions that came up on the last round of review on dealing
with the iomap zeroing problem [1] was having some proper test coverage.
When looking back at some of my custom tests, I realized some relied on
delay injection hacks, and otherwise felt like a random collection of
command sequences and whatnot that were probably somewhat duplicative.
Rather than adding fstests that continuously add random sequences of
xfs_io commands to try and test for zeroing problems, I started playing
around with fsx and came up with this series. In a nutshell, this does
intentional post-eof writes (to the eof page, via mapped writes) for
operations that are otherwise expected to perform partial page zeroing.
This allows the existing post-eof and unexpected data checks in fsx to
detect problems as normal. In my initial tests, this reproduces both the
truncate (already fixed) and write extension problems related to iomap
zero range fairly quickly on XFS.
It also produces zeroing issues on other non-iomap filesystems (ext4,
btrfs, bcachefs), which I suspect is something that probably needs to be
fixed on a per-fs basis. To test fsx itself, this so far seems to run
reliably longer term on XFS with the corresponding iomap zero range fix
in place.
Patch 1 is refactoring prep, patch 2 enables the eof data write
mechanism, and patch 3 adds a new fstests test to use it. The test
currently only supports XFS due to the aforementioned issues, but the
idea is to remove the restriction as other fs' are fixed. Thoughts,
reviews, flames appreciated.
Brian
[1] https://lore.kernel.org/linux-fsdevel/20240718130212.23905-1-bfoster@redhat.com/
Brian Foster (3):
fsx: factor out a file size update helper
fsx: support eof page pollution for eof zeroing test coverage
generic: test to run fsx eof pollution
ltp/fsx.c | 129 +++++++++++++++++++++++++++++++-----------
tests/generic/362 | 27 +++++++++
tests/generic/362.out | 2 +
3 files changed, 126 insertions(+), 32 deletions(-)
create mode 100755 tests/generic/362
create mode 100644 tests/generic/362.out
--
2.45.0
next reply other threads:[~2024-08-22 14:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 14:44 Brian Foster [this message]
2024-08-22 14:44 ` [PATCH 1/3] fsx: factor out a file size update helper Brian Foster
2024-08-22 20:50 ` Darrick J. Wong
2024-08-26 14:03 ` Brian Foster
2024-08-26 17:10 ` Brian Foster
2024-08-22 14:44 ` [PATCH 2/3] fsx: support eof page pollution for eof zeroing test coverage Brian Foster
2024-08-22 20:52 ` Darrick J. Wong
2024-08-26 14:04 ` Brian Foster
2024-08-22 14:44 ` [PATCH 3/3] generic: test to run fsx eof pollution Brian Foster
2024-08-22 20:54 ` Darrick J. Wong
2024-08-26 14:07 ` Brian Foster
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=20240822144422.188462-1-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-xfs@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox