diff options
author | Don Mullis <dwm@meer.net> | 2006-12-08 05:39:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:03 -0500 |
commit | 5d0ffa2b84e6f0fdc5bf96c0de6178f3d2779544 (patch) | |
tree | c1223cbe0a2f2be984281ed83dad556d3dce15d6 /Documentation/fault-injection/fault-injection.txt | |
parent | 83ba254688f0edd6fa29512e538c721f1f46a424 (diff) |
[PATCH] fault-injection: Correct, disambiguate, and reformat documentation
Correct, disambiguate, and reformat documentation.
Signed-off-by: Don Mullis <dwm@meer.net>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/fault-injection/fault-injection.txt')
-rw-r--r-- | Documentation/fault-injection/fault-injection.txt | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/Documentation/fault-injection/fault-injection.txt b/Documentation/fault-injection/fault-injection.txt index 6d6e5ac5ea92..b7ca560b9340 100644 --- a/Documentation/fault-injection/fault-injection.txt +++ b/Documentation/fault-injection/fault-injection.txt | |||
@@ -17,7 +17,7 @@ o fail_page_alloc | |||
17 | 17 | ||
18 | o fail_make_request | 18 | o fail_make_request |
19 | 19 | ||
20 | injects disk IO errors on permitted devices by | 20 | injects disk IO errors on devices permitted by setting |
21 | /sys/block/<device>/make-it-fail or | 21 | /sys/block/<device>/make-it-fail or |
22 | /sys/block/<device>/<partition>/make-it-fail. (generic_make_request()) | 22 | /sys/block/<device>/<partition>/make-it-fail. (generic_make_request()) |
23 | 23 | ||
@@ -29,16 +29,16 @@ o debugfs entries | |||
29 | fault-inject-debugfs kernel module provides some debugfs entries for runtime | 29 | fault-inject-debugfs kernel module provides some debugfs entries for runtime |
30 | configuration of fault-injection capabilities. | 30 | configuration of fault-injection capabilities. |
31 | 31 | ||
32 | - /debug/*/probability: | 32 | - /debug/fail*/probability: |
33 | 33 | ||
34 | likelihood of failure injection, in percent. | 34 | likelihood of failure injection, in percent. |
35 | Format: <percent> | 35 | Format: <percent> |
36 | 36 | ||
37 | Note that one-failure-per-handred is a very high error rate | 37 | Note that one-failure-per-hundred is a very high error rate |
38 | for some testcases. Please set probably=100 and configure | 38 | for some testcases. Consider setting probability=100 and configure |
39 | /debug/*/interval for such testcases. | 39 | /debug/fail*/interval for such testcases. |
40 | 40 | ||
41 | - /debug/*/interval: | 41 | - /debug/fail*/interval: |
42 | 42 | ||
43 | specifies the interval between failures, for calls to | 43 | specifies the interval between failures, for calls to |
44 | should_fail() that pass all the other tests. | 44 | should_fail() that pass all the other tests. |
@@ -46,37 +46,36 @@ configuration of fault-injection capabilities. | |||
46 | Note that if you enable this, by setting interval>1, you will | 46 | Note that if you enable this, by setting interval>1, you will |
47 | probably want to set probability=100. | 47 | probably want to set probability=100. |
48 | 48 | ||
49 | - /debug/*/times: | 49 | - /debug/fail*/times: |
50 | 50 | ||
51 | specifies how many times failures may happen at most. | 51 | specifies how many times failures may happen at most. |
52 | A value of -1 means "no limit". | 52 | A value of -1 means "no limit". |
53 | 53 | ||
54 | - /debug/*/space: | 54 | - /debug/fail*/space: |
55 | 55 | ||
56 | specifies an initial resource "budget", decremented by "size" | 56 | specifies an initial resource "budget", decremented by "size" |
57 | on each call to should_fail(,size). Failure injection is | 57 | on each call to should_fail(,size). Failure injection is |
58 | suppressed until "space" reaches zero. | 58 | suppressed until "space" reaches zero. |
59 | 59 | ||
60 | - /debug/*/verbose | 60 | - /debug/fail*/verbose |
61 | 61 | ||
62 | Format: { 0 | 1 | 2 } | 62 | Format: { 0 | 1 | 2 } |
63 | specifies the verbosity of the messages when failure is injected. | 63 | specifies the verbosity of the messages when failure is |
64 | We default to 0 (no extra messages), setting it to '1' will | 64 | injected. '0' means no messages; '1' will print only a single |
65 | print only to tell failure happened, '2' will print call trace too - | 65 | log line per failure; '2' will print a call trace too -- useful |
66 | it is useful to debug the problems revealed by fault injection | 66 | to debug the problems revealed by fault injection. |
67 | capabilities. | ||
68 | 67 | ||
69 | - /debug/*/task-filter: | 68 | - /debug/fail*/task-filter: |
70 | 69 | ||
71 | Format: { 0 | 1 } | 70 | Format: { 'Y' | 'N' } |
72 | A value of '0' disables filtering by process (default). | 71 | A value of 'N' disables filtering by process (default). |
73 | Any positive value limits failures to only processes indicated by | 72 | Any positive value limits failures to only processes indicated by |
74 | /proc/<pid>/make-it-fail==1. | 73 | /proc/<pid>/make-it-fail==1. |
75 | 74 | ||
76 | - /debug/*/require-start: | 75 | - /debug/fail*/require-start: |
77 | - /debug/*/require-end: | 76 | - /debug/fail*/require-end: |
78 | - /debug/*/reject-start: | 77 | - /debug/fail*/reject-start: |
79 | - /debug/*/reject-end: | 78 | - /debug/fail*/reject-end: |
80 | 79 | ||
81 | specifies the range of virtual addresses tested during | 80 | specifies the range of virtual addresses tested during |
82 | stacktrace walking. Failure is injected only if some caller | 81 | stacktrace walking. Failure is injected only if some caller |
@@ -85,22 +84,23 @@ configuration of fault-injection capabilities. | |||
85 | Default required range is [0,ULONG_MAX) (whole of virtual address space). | 84 | Default required range is [0,ULONG_MAX) (whole of virtual address space). |
86 | Default rejected range is [0,0). | 85 | Default rejected range is [0,0). |
87 | 86 | ||
88 | - /debug/*/stacktrace-depth: | 87 | - /debug/fail*/stacktrace-depth: |
89 | 88 | ||
90 | specifies the maximum stacktrace depth walked during search | 89 | specifies the maximum stacktrace depth walked during search |
91 | for a caller within [address-start,address-end). | 90 | for a caller within [require-start,require-end) OR |
91 | [reject-start,reject-end). | ||
92 | 92 | ||
93 | - /debug/fail_page_alloc/ignore-gfp-highmem: | 93 | - /debug/fail_page_alloc/ignore-gfp-highmem: |
94 | 94 | ||
95 | Format: { 0 | 1 } | 95 | Format: { 'Y' | 'N' } |
96 | default is 0, setting it to '1' won't inject failures into | 96 | default is 'N', setting it to 'Y' won't inject failures into |
97 | highmem/user allocations. | 97 | highmem/user allocations. |
98 | 98 | ||
99 | - /debug/failslab/ignore-gfp-wait: | 99 | - /debug/failslab/ignore-gfp-wait: |
100 | - /debug/fail_page_alloc/ignore-gfp-wait: | 100 | - /debug/fail_page_alloc/ignore-gfp-wait: |
101 | 101 | ||
102 | Format: { 0 | 1 } | 102 | Format: { 'Y' | 'N' } |
103 | default is 0, setting it to '1' will inject failures | 103 | default is 'N', setting it to 'Y' will inject failures |
104 | only into non-sleep allocations (GFP_ATOMIC allocations). | 104 | only into non-sleep allocations (GFP_ATOMIC allocations). |
105 | 105 | ||
106 | o Boot option | 106 | o Boot option |
@@ -124,22 +124,22 @@ o define the fault attributes | |||
124 | Please see the definition of struct fault_attr in fault-inject.h | 124 | Please see the definition of struct fault_attr in fault-inject.h |
125 | for details. | 125 | for details. |
126 | 126 | ||
127 | o provide the way to configure fault attributes | 127 | o provide a way to configure fault attributes |
128 | 128 | ||
129 | - boot option | 129 | - boot option |
130 | 130 | ||
131 | If you need to enable the fault injection capability from boot time, you can | 131 | If you need to enable the fault injection capability from boot time, you can |
132 | provide boot option to configure it. There is a helper function for it. | 132 | provide boot option to configure it. There is a helper function for it: |
133 | 133 | ||
134 | setup_fault_attr(attr, str); | 134 | setup_fault_attr(attr, str); |
135 | 135 | ||
136 | - debugfs entries | 136 | - debugfs entries |
137 | 137 | ||
138 | failslab, fail_page_alloc, and fail_make_request use this way. | 138 | failslab, fail_page_alloc, and fail_make_request use this way. |
139 | There is a helper function for it. | 139 | Helper functions: |
140 | 140 | ||
141 | init_fault_attr_entries(entries, attr, name); | 141 | init_fault_attr_entries(entries, attr, name); |
142 | void cleanup_fault_attr_entries(entries); | 142 | void cleanup_fault_attr_entries(entries); |
143 | 143 | ||
144 | - module parameters | 144 | - module parameters |
145 | 145 | ||
@@ -149,9 +149,9 @@ o provide the way to configure fault attributes | |||
149 | 149 | ||
150 | o add a hook to insert failures | 150 | o add a hook to insert failures |
151 | 151 | ||
152 | should_fail() returns 1 when failures should happen. | 152 | Upon should_fail() returning true, client code should inject a failure. |
153 | 153 | ||
154 | should_fail(attr,size); | 154 | should_fail(attr, size); |
155 | 155 | ||
156 | Application Examples | 156 | Application Examples |
157 | -------------------- | 157 | -------------------- |