Skip to contentSkip to conversation

dm flakey: document corrupt_bio_byte and optional feature precedence

PATCH In review Mike Snitzer 1 participant 2 messages Jun 29, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm flakey: document corrupt_bio_byte and optional feature precedence

---
 Documentation/device-mapper/dm-flakey.txt |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
Documentation/device-mapper/dm-flakey.txt +14 -1
index 6b40f79..6b4df49 100644
@@ -27,7 +27,20 @@ Mandatory parameters:
 
 Optional feature parameters:
   If no feature parameters are present, during the periods of
-  unreliability, all I/O returns errors.
+  unreliability, all I/O returns errors.  Optional features may be
+  combined (e.g. corrupt_bio_byte on READ and drop_writes).  Conflicting
+  features (e.g. corrupt_bio_byte on WRITE and drop_writes) are resolved
+  according to the following feature precedence (descending order):
+
+  corrupt_bio_byte <Nth byte> <bio_flags> <value>:
+	Corrupt bios that have specific bi_rw flag(s), e.g.: READ=0 or
+	REQ_WRITE=1|REQ_META=32, by writing <value> to the <Nth byte> of
+	bios that have data.
+	Examples:
+	1) corrupt 32nd byte in READ bios with the value 1:
+	   corrupt_bio_byte 32 0 1
+	2) corrupt 224th byte in WRITE|REQ_META bios with the value 0:
+	   corrupt_bio_byte 224 33 0
 
   drop_writes:
 	All write I/O is silently ignored.
#1 lore raw
Quoted 13 lines · Mike Snitzer
---
 Documentation/device-mapper/dm-flakey.txt |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
Documentation/device-mapper/dm-flakey.txt +0 -0
index 6b40f79..6b4df49 100644
@@ -27,7 +27,20 @@ Mandatory parameters:
 
 Optional feature parameters:
   If no feature parameters are present, during the periods of

Documentation/device-mapper/dm-flakey.txt Mandatory parameters: · line 38

Quoted 10 lines
Documentation/device-mapper/dm-flakey.txt +9 -1
-  unreliability, all I/O returns errors.
+  unreliability, all I/O returns errors.  Optional features may be
+  combined (e.g. corrupt_bio_byte on READ and drop_writes).  Conflicting
+  features (e.g. corrupt_bio_byte on WRITE and drop_writes) are resolved
+  according to the following feature precedence (descending order):
+
+  corrupt_bio_byte <Nth byte> <bio_flags> <value>:
+	Corrupt bios that have specific bi_rw flag(s), e.g.: READ=0 or
+	REQ_WRITE=1|REQ_META=32, by writing <value> to the <Nth byte> of
+	bios that have data.

Gah, we should also add:

<value> may be 0 or 1. Bios that don't match <bio_flags> fall through to the other optional feature(s) or the default of returning I/O error.

Quoted 13 lines
Documentation/device-mapper/dm-flakey.txt +5 -1
+	Examples:
+	1) corrupt 32nd byte in READ bios with the value 1:
+	   corrupt_bio_byte 32 0 1
+	2) corrupt 224th byte in WRITE|REQ_META bios with the value 0:
+	   corrupt_bio_byte 224 33 0
 
   drop_writes:
 	All write I/O is silently ignored.
 
--

dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel