diff options
author | Keith Busch <keith.busch@intel.com> | 2015-01-08 01:55:46 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-08 15:59:01 (GMT) |
commit | 5b3f25fc343690cafd3e27431a69a7bdaf9df001 (patch) | |
tree | 8892062d8290c520faf5daf355bcc303501919d5 /block/blk-mq.c | |
parent | 1885b24d23716e09b9c952822b05fd7f68099cdb (diff) | |
download | linux-5b3f25fc343690cafd3e27431a69a7bdaf9df001.tar.xz |
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-mq.c')
-rw-r--r-- | block/blk-mq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 261ccd8..78324a2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -619,7 +619,7 @@ void blk_mq_rq_timed_out(struct request *req, bool reserved) break; } } - + static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx, struct request *rq, void *priv, bool reserved) { @@ -627,6 +627,8 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx, if (!test_bit(REQ_ATOM_STARTED, &rq->atomic_flags)) return; + if (rq->cmd_flags & REQ_NO_TIMEOUT) + return; if (time_after_eq(jiffies, rq->deadline)) { if (!blk_mark_rq_complete(rq)) |