diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-09-14 08:56:33 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:17 -0400 |
commit | 581d4e28d9195aa8b2231383dbabc288988d615e (patch) | |
tree | 093bcac9a538ef67edcf91826f7532bdb88e6248 /block/blk-softirq.c | |
parent | 0a0d96b03a1f3bfd6bc3ea08008699e8e59fccd9 (diff) |
block: add fault injection mechanism for faking request timeouts
Only works for the generic request timer handling. Allows one to
sporadically ignore request completions, thus exercising the timeout
handling.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-softirq.c')
-rw-r--r-- | block/blk-softirq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-softirq.c b/block/blk-softirq.c index 7ab344afb16f..e660d26ca656 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c | |||
@@ -154,6 +154,8 @@ do_local: | |||
154 | **/ | 154 | **/ |
155 | void blk_complete_request(struct request *req) | 155 | void blk_complete_request(struct request *req) |
156 | { | 156 | { |
157 | if (unlikely(blk_should_fake_timeout(req->q))) | ||
158 | return; | ||
157 | if (!blk_mark_rq_complete(req)) | 159 | if (!blk_mark_rq_complete(req)) |
158 | __blk_complete_request(req); | 160 | __blk_complete_request(req); |
159 | } | 161 | } |