diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-06-20 17:54:48 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-06-27 18:23:20 -0700 |
commit | f8c47250ba46eb221d1ac537266ac65bcf2866d5 (patch) | |
tree | 34b722bde56dd32d002993116f97a433013720f5 /fs/xfs/xfs_error.h | |
parent | 9e24cfd044853e0e46e7149b91b7bb09effb0a79 (diff) | |
download | linux-stable-f8c47250ba46eb221d1ac537266ac65bcf2866d5.tar.gz linux-stable-f8c47250ba46eb221d1ac537266ac65bcf2866d5.tar.bz2 linux-stable-f8c47250ba46eb221d1ac537266ac65bcf2866d5.zip |
xfs: convert drop_writes to use the errortag mechanism
We now have enhanced error injection that can control the frequency
with which errors happen, so convert drop_writes to use this.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_error.h')
-rw-r--r-- | fs/xfs/xfs_error.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index ae8935b90a93..e0e4cf776fac 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h @@ -96,7 +96,16 @@ extern void xfs_verifier_error(struct xfs_buf *bp); #define XFS_ERRTAG_REFCOUNT_FINISH_ONE 25 #define XFS_ERRTAG_BMAP_FINISH_ONE 26 #define XFS_ERRTAG_AG_RESV_CRITICAL 27 -#define XFS_ERRTAG_MAX 28 +/* + * DEBUG mode instrumentation to test and/or trigger delayed allocation + * block killing in the event of failed writes. When enabled, all + * buffered writes are silenty dropped and handled as if they failed. + * All delalloc blocks in the range of the write (including pre-existing + * delalloc blocks!) are tossed as part of the write failure error + * handling sequence. + */ +#define XFS_ERRTAG_DROP_WRITES 28 +#define XFS_ERRTAG_MAX 29 /* * Random factors for above tags, 1 means always, 2 means 1/2 time, etc. @@ -129,6 +138,7 @@ extern void xfs_verifier_error(struct xfs_buf *bp); #define XFS_RANDOM_REFCOUNT_FINISH_ONE 1 #define XFS_RANDOM_BMAP_FINISH_ONE 1 #define XFS_RANDOM_AG_RESV_CRITICAL 4 +#define XFS_RANDOM_DROP_WRITES 1 #ifdef DEBUG extern int xfs_errortag_init(struct xfs_mount *mp); |