aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fault-inject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fault-inject.h')
-rw-r--r--include/linux/fault-inject.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index c6f996f2abb6..798fad9e420d 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -5,6 +5,7 @@
5 5
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/debugfs.h> 7#include <linux/debugfs.h>
8#include <linux/ratelimit.h>
8#include <linux/atomic.h> 9#include <linux/atomic.h>
9 10
10/* 11/*
@@ -25,14 +26,18 @@ struct fault_attr {
25 unsigned long reject_end; 26 unsigned long reject_end;
26 27
27 unsigned long count; 28 unsigned long count;
29 struct ratelimit_state ratelimit_state;
30 struct dentry *dname;
28}; 31};
29 32
30#define FAULT_ATTR_INITIALIZER { \ 33#define FAULT_ATTR_INITIALIZER { \
31 .interval = 1, \ 34 .interval = 1, \
32 .times = ATOMIC_INIT(1), \ 35 .times = ATOMIC_INIT(1), \
33 .require_end = ULONG_MAX, \ 36 .require_end = ULONG_MAX, \
34 .stacktrace_depth = 32, \ 37 .stacktrace_depth = 32, \
35 .verbose = 2, \ 38 .ratelimit_state = RATELIMIT_STATE_INIT_DISABLED, \
39 .verbose = 2, \
40 .dname = NULL, \
36 } 41 }
37 42
38#define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER 43#define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER