Lines Matching +full:fault +full:- +full:q
1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/fault-inject.h>
11 #include "blk-mq.h"
23 bool __blk_should_fake_timeout(struct request_queue *q) in __blk_should_fake_timeout() argument
43 int set = test_bit(QUEUE_FLAG_FAIL_IO, &disk->queue->queue_flags); in part_timeout_show()
55 struct request_queue *q = disk->queue; in part_timeout_store() local
60 blk_queue_flag_set(QUEUE_FLAG_FAIL_IO, q); in part_timeout_store()
62 blk_queue_flag_clear(QUEUE_FLAG_FAIL_IO, q); in part_timeout_store()
71 * blk_abort_request - Request recovery for the specified command
75 * request by deleting the timer and calling the q's timeout function.
86 WRITE_ONCE(req->deadline, jiffies); in blk_abort_request()
87 kblockd_schedule_work(&req->q->timeout_work); in blk_abort_request()
95 blk_timeout_mask = roundup_pow_of_two(HZ) - 1; in blk_timeout_init()
121 * blk_add_timer - Start timeout timer for a single request
130 struct request_queue *q = req->q; in blk_add_timer() local
137 if (!req->timeout) in blk_add_timer()
138 req->timeout = q->rq_timeout; in blk_add_timer()
140 req->rq_flags &= ~RQF_TIMED_OUT; in blk_add_timer()
142 expiry = jiffies + req->timeout; in blk_add_timer()
143 WRITE_ONCE(req->deadline, expiry); in blk_add_timer()
152 if (!timer_pending(&q->timeout) || in blk_add_timer()
153 time_before(expiry, q->timeout.expires)) { in blk_add_timer()
154 unsigned long diff = q->timeout.expires - expiry; in blk_add_timer()
163 if (!timer_pending(&q->timeout) || (diff >= HZ / 2)) in blk_add_timer()
164 mod_timer(&q->timeout, expiry); in blk_add_timer()