Skip to content
Commit 30abb3a6 authored by Howard McLauchlan's avatar Howard McLauchlan Committed by Jens Axboe
Browse files

block: Add should_fail_bio() for bpf error injection



The classic error injection mechanism, should_fail_request() does not
support use cases where more information is required (from the entire
struct bio, for example).

To that end, this patch introduces should_fail_bio(), which calls
should_fail_request() under the hood but provides a convenient
place for kprobes to hook into if they require the entire struct bio.
This patch also replaces some existing calls to should_fail_request()
with should_fail_bio() with no degradation in performance.

Signed-off-by: default avatarHoward McLauchlan <hmclauchlan@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5235553d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment