Back to home page

OSCL-LXR

 
 

    


0001 =========
0002 dm-flakey
0003 =========
0004 
0005 This target is the same as the linear target except that it exhibits
0006 unreliable behaviour periodically.  It's been found useful in simulating
0007 failing devices for testing purposes.
0008 
0009 Starting from the time the table is loaded, the device is available for
0010 <up interval> seconds, then exhibits unreliable behaviour for <down
0011 interval> seconds, and then this cycle repeats.
0012 
0013 Also, consider using this in combination with the dm-delay target too,
0014 which can delay reads and writes and/or send them to different
0015 underlying devices.
0016 
0017 Table parameters
0018 ----------------
0019 
0020 ::
0021 
0022   <dev path> <offset> <up interval> <down interval> \
0023     [<num_features> [<feature arguments>]]
0024 
0025 Mandatory parameters:
0026 
0027     <dev path>:
0028         Full pathname to the underlying block-device, or a
0029         "major:minor" device-number.
0030     <offset>:
0031         Starting sector within the device.
0032     <up interval>:
0033         Number of seconds device is available.
0034     <down interval>:
0035         Number of seconds device returns errors.
0036 
0037 Optional feature parameters:
0038 
0039   If no feature parameters are present, during the periods of
0040   unreliability, all I/O returns errors.
0041 
0042   drop_writes:
0043         All write I/O is silently ignored.
0044         Read I/O is handled correctly.
0045 
0046   error_writes:
0047         All write I/O is failed with an error signalled.
0048         Read I/O is handled correctly.
0049 
0050   corrupt_bio_byte <Nth_byte> <direction> <value> <flags>:
0051         During <down interval>, replace <Nth_byte> of the data of
0052         each matching bio with <value>.
0053 
0054     <Nth_byte>:
0055         The offset of the byte to replace.
0056         Counting starts at 1, to replace the first byte.
0057     <direction>:
0058         Either 'r' to corrupt reads or 'w' to corrupt writes.
0059         'w' is incompatible with drop_writes.
0060     <value>:
0061         The value (from 0-255) to write.
0062     <flags>:
0063         Perform the replacement only if bio->bi_opf has all the
0064         selected flags set.
0065 
0066 Examples:
0067 
0068 Replaces the 32nd byte of READ bios with the value 1::
0069 
0070   corrupt_bio_byte 32 r 1 0
0071 
0072 Replaces the 224th byte of REQ_META (=32) bios with the value 0::
0073 
0074   corrupt_bio_byte 224 w 0 32