]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic/331,xfs/240: support files that skip delayed allocation
authorDarrick J. Wong <djwong@kernel.org>
Tue, 6 Feb 2024 00:06:50 +0000 (16:06 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:42:00 +0000 (13:42 -0700)
commitcaa2a9b671131b3eb7d81c58502814726d896d20
tree0e9fabd4197d4dbcdfb8e8972e936c5f7c510ddc
parentdf1fa208d4b0a21dda3450be27a978bc40ec9a70
generic/331,xfs/240: support files that skip delayed allocation

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, 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
tests/generic/331.out
tests/xfs/240
tests/xfs/240.out