aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-timeout.c
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2015-01-07 20:55:46 -0500
committerJens Axboe <axboe@fb.com>2015-01-08 10:59:01 -0500
commit5b3f25fc343690cafd3e27431a69a7bdaf9df001 (patch)
tree8892062d8290c520faf5daf355bcc303501919d5 /block/blk-timeout.c
parent1885b24d23716e09b9c952822b05fd7f68099cdb (diff)
blk-mq: Allow requests to never expire
Some types of requests may be started that are not gauranteed to ever complete. This adds a request flag that a driver can use so mark the request as such. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r--block/blk-timeout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 56c025894cdf..246dfb16c3d9 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -190,6 +190,9 @@ void blk_add_timer(struct request *req)
190 struct request_queue *q = req->q; 190 struct request_queue *q = req->q;
191 unsigned long expiry; 191 unsigned long expiry;
192 192
193 if (req->cmd_flags & REQ_NO_TIMEOUT)
194 return;
195
193 /* blk-mq has its own handler, so we don't need ->rq_timed_out_fn */ 196 /* blk-mq has its own handler, so we don't need ->rq_timed_out_fn */
194 if (!q->mq_ops && !q->rq_timed_out_fn) 197 if (!q->mq_ops && !q->rq_timed_out_fn)
195 return; 198 return;