summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-11-28 17:24:35 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-11-28 17:24:35 -0800
commitc2beff99eb03866df6fdbd3a93b08fd27eb8bf5c (patch)
treec3d0a1f8b6b0750cc5549d0e2a7c749d7d4bc821 /fs/xfs/libxfs
parent7dd73802f97d2a1602b1cf5c1d6623fb08cb15c5 (diff)
downloadlinux-c2beff99eb03866df6fdbd3a93b08fd27eb8bf5c.tar.gz
linux-c2beff99eb03866df6fdbd3a93b08fd27eb8bf5c.tar.bz2
linux-c2beff99eb03866df6fdbd3a93b08fd27eb8bf5c.zip
xfs: add debug knob to slow down writeback for fun
Add a new error injection knob so that we can arbitrarily slow down writeback 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 745b3f76d1c8 ("xfs: maintain a sequence count for inode fork manipulations"). Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r--fs/xfs/libxfs/xfs_errortag.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_errortag.h b/fs/xfs/libxfs/xfs_errortag.h
index 580ccbd5aadc..f5f629174eca 100644
--- a/fs/xfs/libxfs/xfs_errortag.h
+++ b/fs/xfs/libxfs/xfs_errortag.h
@@ -61,7 +61,8 @@
#define XFS_ERRTAG_LARP 39
#define XFS_ERRTAG_DA_LEAF_SPLIT 40
#define XFS_ERRTAG_ATTR_LEAF_TO_NODE 41
-#define XFS_ERRTAG_MAX 42
+#define XFS_ERRTAG_WB_DELAY_MS 42
+#define XFS_ERRTAG_MAX 43
/*
* Random factors for above tags, 1 means always, 2 means 1/2 time, etc.
@@ -107,5 +108,6 @@
#define XFS_RANDOM_LARP 1
#define XFS_RANDOM_DA_LEAF_SPLIT 1
#define XFS_RANDOM_ATTR_LEAF_TO_NODE 1
+#define XFS_RANDOM_WB_DELAY_MS 3000
#endif /* __XFS_ERRORTAG_H_ */