forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New device-mapper target that can delay I/O (for testing). Reads can be separated from writes, redirected to different underlying devices and delayed by differing amounts of time. Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Milan Broz <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Heinz Mauelshagen
authored and
Linus Torvalds
committed
May 9, 2007
1 parent
0ba6993
commit 26b9f22
Showing
4 changed files
with
419 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dm-delay | ||
======== | ||
|
||
Device-Mapper's "delay" target delays reads and/or writes | ||
and maps them to different devices. | ||
|
||
Parameters: | ||
<device> <offset> <delay> [<write_device> <write_offset> <write_delay>] | ||
|
||
With separate write parameters, the first set is only used for reads. | ||
Delays are specified in milliseconds. | ||
|
||
Example scripts | ||
=============== | ||
[[ | ||
#!/bin/sh | ||
# Create device delaying rw operation for 500ms | ||
echo "0 `blockdev --getsize $1` delay $1 0 500" | dmsetup create delayed | ||
]] | ||
|
||
[[ | ||
#!/bin/sh | ||
# Create device delaying only write operation for 500ms and | ||
# splitting reads and writes to different devices $1 $2 | ||
echo "0 `blockdev --getsize $1` delay $1 0 0 $2 0 500" | dmsetup create delayed | ||
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.