5a441a6d97225cbdc67dad7bdd80de3c7bfedaab |
|
16-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Added "randomfail" driver.
Using this in front of fs drivers allows randomly injecting failures. For
example:
mail_attachment_fs = randomfail:all=10,read=30,read-range=2000-3000:sis posix
This means that all FS operations have a 10% chance of failing, except reads
have a 30% chance of failing. If the read fails, it'll fail somewhere
between offsets 2000-3000 (the default is 0, so it'll fail at the start of
file).
The supported operations are: wait metadata prefetch read write lock exists
stat copy rename delete iter. "all" applies to all of them.
The supported ranges are: read-range, write-range, iter-range. |