summaryrefslogtreecommitdiffstats
path: root/Documentation/device-mapper/delay.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/device-mapper/delay.rst')
-rw-r--r--Documentation/device-mapper/delay.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/device-mapper/delay.rst b/Documentation/device-mapper/delay.rst
new file mode 100644
index 000000000000..917ba8c33359
--- /dev/null
+++ b/Documentation/device-mapper/delay.rst
@@ -0,0 +1,31 @@
1========
2dm-delay
3========
4
5Device-Mapper's "delay" target delays reads and/or writes
6and maps them to different devices.
7
8Parameters::
9
10 <device> <offset> <delay> [<write_device> <write_offset> <write_delay>
11 [<flush_device> <flush_offset> <flush_delay>]]
12
13With separate write parameters, the first set is only used for reads.
14Offsets are specified in sectors.
15Delays are specified in milliseconds.
16
17Example scripts
18===============
19
20::
21
22 #!/bin/sh
23 # Create device delaying rw operation for 500ms
24 echo "0 `blockdev --getsz $1` delay $1 0 500" | dmsetup create delayed
25
26::
27
28 #!/bin/sh
29 # Create device delaying only write operation for 500ms and
30 # splitting reads and writes to different devices $1 $2
31 echo "0 `blockdev --getsz $1` delay $1 0 0 $2 0 500" | dmsetup create delayed