diff options
Diffstat (limited to 'Documentation/device-mapper/dm-flakey.txt')
-rw-r--r-- | Documentation/device-mapper/dm-flakey.txt | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/Documentation/device-mapper/dm-flakey.txt b/Documentation/device-mapper/dm-flakey.txt index c8efdfd19a65..6ff5c2327227 100644 --- a/Documentation/device-mapper/dm-flakey.txt +++ b/Documentation/device-mapper/dm-flakey.txt | |||
@@ -1,17 +1,53 @@ | |||
1 | dm-flakey | 1 | dm-flakey |
2 | ========= | 2 | ========= |
3 | 3 | ||
4 | This target is the same as the linear target except that it returns I/O | 4 | This target is the same as the linear target except that it exhibits |
5 | errors periodically. It's been found useful in simulating failing | 5 | unreliable behaviour periodically. It's been found useful in simulating |
6 | devices for testing purposes. | 6 | failing devices for testing purposes. |
7 | 7 | ||
8 | Starting from the time the table is loaded, the device is available for | 8 | Starting from the time the table is loaded, the device is available for |
9 | <up interval> seconds, then returns errors for <down interval> seconds, | 9 | <up interval> seconds, then exhibits unreliable behaviour for <down |
10 | and then this cycle repeats. | 10 | interval> seconds, and then this cycle repeats. |
11 | 11 | ||
12 | Parameters: <dev path> <offset> <up interval> <down interval> | 12 | Also, consider using this in combination with the dm-delay target too, |
13 | which can delay reads and writes and/or send them to different | ||
14 | underlying devices. | ||
15 | |||
16 | Table parameters | ||
17 | ---------------- | ||
18 | <dev path> <offset> <up interval> <down interval> \ | ||
19 | [<num_features> [<feature arguments>]] | ||
20 | |||
21 | Mandatory parameters: | ||
13 | <dev path>: Full pathname to the underlying block-device, or a | 22 | <dev path>: Full pathname to the underlying block-device, or a |
14 | "major:minor" device-number. | 23 | "major:minor" device-number. |
15 | <offset>: Starting sector within the device. | 24 | <offset>: Starting sector within the device. |
16 | <up interval>: Number of seconds device is available. | 25 | <up interval>: Number of seconds device is available. |
17 | <down interval>: Number of seconds device returns errors. | 26 | <down interval>: Number of seconds device returns errors. |
27 | |||
28 | Optional feature parameters: | ||
29 | If no feature parameters are present, during the periods of | ||
30 | unreliability, all I/O returns errors. | ||
31 | |||
32 | drop_writes: | ||
33 | All write I/O is silently ignored. | ||
34 | Read I/O is handled correctly. | ||
35 | |||
36 | corrupt_bio_byte <Nth_byte> <direction> <value> <flags>: | ||
37 | During <down interval>, replace <Nth_byte> of the data of | ||
38 | each matching bio with <value>. | ||
39 | |||
40 | <Nth_byte>: The offset of the byte to replace. | ||
41 | Counting starts at 1, to replace the first byte. | ||
42 | <direction>: Either 'r' to corrupt reads or 'w' to corrupt writes. | ||
43 | 'w' is incompatible with drop_writes. | ||
44 | <value>: The value (from 0-255) to write. | ||
45 | <flags>: Perform the replacement only if bio->bi_rw has all the | ||
46 | selected flags set. | ||
47 | |||
48 | Examples: | ||
49 | corrupt_bio_byte 32 r 1 0 | ||
50 | - replaces the 32nd byte of READ bios with the value 1 | ||
51 | |||
52 | corrupt_bio_byte 224 w 0 32 | ||
53 | - replaces the 224th byte of REQ_META (=32) bios with the value 0 | ||