diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-06-21 02:54:46 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-06-28 03:23:19 +0200 |
commit | 31965ef34802f49903bba06dd7c3b96a2e2ed4e4 (patch) | |
tree | e0198268750bf8679fbeff8a5ebd6c9c2b4c66d6 /fs/xfs/xfs_mount.h | |
parent | xfs: free uncommitted transactions during log recovery (diff) | |
download | linux-31965ef34802f49903bba06dd7c3b96a2e2ed4e4.tar.xz linux-31965ef34802f49903bba06dd7c3b96a2e2ed4e4.zip |
xfs: make errortag a per-mountpoint structure
Remove the xfs_etest structure in favor of a per-mountpoint structure.
This will give us the flexibility to set as many error injection points
as we want, and later enable us to set up sysfs knobs to set the trigger
frequency as we wish. This comes at a cost of higher memory use, but
unti we hit 1024 injection points (we're at 29) or a lot of mounts this
shouldn't be a huge issue.
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 '')
-rw-r--r-- | fs/xfs/xfs_mount.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 305d95394e2d..e002ac52a4e6 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -199,6 +199,13 @@ typedef struct xfs_mount { bool m_fail_unmount; #ifdef DEBUG /* + * Frequency with which errors are injected. Replaces xfs_etest; the + * value stored in here is the inverse of the frequency with which the + * error triggers. 1 = always, 2 = half the time, etc. + */ + unsigned int *m_errortag; + + /* * 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. |