xfs: add debug knob to slow down write for fun
authorDarrick J. Wong <djwong@kernel.org>
Tue, 29 Nov 2022 01:24:36 +0000 (17:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 29 Nov 2022 01:54:49 +0000 (17:54 -0800)
commit254e3459285cbf2174350bbc0051e475e1bc5196
treeb67e276af1fbba40cfc3c62803e60aa7a42bdb06
parentc2beff99eb03866df6fdbd3a93b08fd27eb8bf5c
xfs: add debug knob to slow down write for fun

Add a new error injection knob so that we can arbitrarily slow down
pagecache writes to test for race conditions and aberrant reclaim
behavior if the writeback mechanisms are slow to issue writeback.  This
will enable functional testing for the ifork sequence counters
introduced in commit 304a68b9c63b ("xfs: use iomap_valid method to
detect stale cached iomaps") that fixes write racing with reclaim
writeback.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_errortag.h
fs/xfs/xfs_error.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_trace.h