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.h | |
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.h')
-rw-r--r-- | block/blk.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index a4f4a50aefaa..e5c579769963 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -42,6 +42,18 @@ static inline void blk_clear_rq_complete(struct request *rq) | |||
42 | clear_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags); | 42 | clear_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags); |
43 | } | 43 | } |
44 | 44 | ||
45 | #ifdef CONFIG_FAIL_IO_TIMEOUT | ||
46 | int blk_should_fake_timeout(struct request_queue *); | ||
47 | ssize_t part_timeout_show(struct device *, struct device_attribute *, char *); | ||
48 | ssize_t part_timeout_store(struct device *, struct device_attribute *, | ||
49 | const char *, size_t); | ||
50 | #else | ||
51 | static inline int blk_should_fake_timeout(struct request_queue *q) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | #endif | ||
56 | |||
45 | struct io_context *current_io_context(gfp_t gfp_flags, int node); | 57 | struct io_context *current_io_context(gfp_t gfp_flags, int node); |
46 | 58 | ||
47 | int ll_back_merge_fn(struct request_queue *q, struct request *req, | 59 | int ll_back_merge_fn(struct request_queue *q, struct request *req, |