All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] generic: disable dmlogwrites tests on XFS
@ 2020-08-27 14:53 Brian Foster
  2020-08-29  6:48 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Foster @ 2020-08-27 14:53 UTC (permalink / raw)
  To: fstests; +Cc: linux-xfs

Several generic fstests use dm-log-writes to test the filesystem for
consistency at various crash recovery points. dm-log-writes and the
associated replay mechanism rely on discard to clear stale blocks
when moving to various points in time of the fs. If the storage
doesn't provide discard zeroing or the discard requests exceed the
hardcoded maximum (128MB) of the fallback solution to physically
write zeroes, stale blocks are left around in the target fs. This
causes issues on XFS if recovery observes metadata from a future
version of an fs that has been replayed to an older point in time.
This corrupts the filesystem and leads to spurious test failures
that are nontrivial to diagnose.

Disable the generic dmlogwrites tests on XFS for the time being.
This is intended to be a temporary change until a solution is found
that allows these tests to predictably clear stale data while still
allowing them to run in a reasonable amount of time.

Signed-off-by: Brian Foster <bfoster@redhat.com>
---

v2:
- Drop all dmthinp changes. Unconditionally disable tests on XFS.
v1: https://lore.kernel.org/fstests/20200826143815.360002-2-bfoster@redhat.com/

 common/dmlogwrites | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/common/dmlogwrites b/common/dmlogwrites
index 573f4b8a..b0a28ce8 100644
--- a/common/dmlogwrites
+++ b/common/dmlogwrites
@@ -9,6 +9,14 @@ _require_log_writes()
 	[ -z "$LOGWRITES_DEV" -o ! -b "$LOGWRITES_DEV" ] && \
 		_notrun "This test requires a valid \$LOGWRITES_DEV"
 
+	# The logwrites mechanism relies on discard to provide zeroing behavior
+	# to clear out stale filesystem content. Discard doesn't reliably
+	# provide this behavior, and this leads to spurious corruptions on XFS
+	# filesystems by leaving out of order metadata in the fs. We must
+	# disable dmlogwrites on XFS until it implements a predictable mechanism
+	# to clear stale data.
+	[ $FSTYP == "xfs" ] && _notrun "dmlogwrites not supported on XFS"
+
 	_exclude_scratch_mount_option dax
 	_require_dm_target log-writes
 	_require_test_program "log-writes/replay-log"
@@ -39,6 +47,8 @@ _require_log_writes_dax_mountopt()
 	[ -z "$LOGWRITES_DEV" -o ! -b "$LOGWRITES_DEV" ] && \
 		_notrun "This test requires a valid \$LOGWRITES_DEV"
 
+	[ $FSTYP == "xfs" ] && _notrun "dmlogwrites not supported on XFS"
+
 	_require_dm_target log-writes
 	_require_test_program "log-writes/replay-log"
 
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-01 14:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 14:53 [PATCH v2] generic: disable dmlogwrites tests on XFS Brian Foster
2020-08-29  6:48 ` Christoph Hellwig
2020-08-31 13:37   ` Brian Foster
2020-08-31 16:02     ` Christoph Hellwig
2020-09-01  6:25     ` Amir Goldstein
2020-09-01 12:31       ` Brian Foster
2020-09-01 14:04         ` Amir Goldstein

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.