readwrite: new error injection code

Signed-off-by: Joe Buck <jbbuck@gmail.com>