Re: [patch 4/5] fail-injection capability for disk IO

Jens Axboe
2006-08-23T12:08:12Z

On Wed, Aug 23 2006, Andi Kleen wrote:
> Akinobu Mita <mita@miraclelinux.com> writes:
> > * @bio: The bio describing the location in memory and on the device.
> > @@ -3077,6 +3093,9 @@ end_io:
> > if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
> > goto end_io;
> >
> > + if (should_fail(fail_make_request, bio->bi_size))
> > + goto end_io;
>
> AFAIK it is reasonably easy to write stacking block drivers.
> I think I would prefer a stackable driver instead of this hook.

But that makes it more tricky to setup a test, since you have to change
from using /dev/sda (for example) to /dev/stacked-driver.

--
Jens Axboe