浏览代码

blk-mq: ->timeout should be cleared in blk_mq_rq_ctx_init()

It'll be used in blk_mq_start_request() to set a potential timeout
for the request, so clear it to zero at alloc time to ensure that
we know if someone has set it or not.

Fixes random early timeouts on NVMe testing.

Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe 11 年之前
父节点
当前提交
f6be4fb4bc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      block/blk-mq.c

+ 2 - 0
block/blk-mq.c

@@ -204,6 +204,8 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx,
 	rq->sense = NULL;
 
 	INIT_LIST_HEAD(&rq->timeout_list);
+	rq->timeout = 0;
+
 	rq->end_io = NULL;
 	rq->end_io_data = NULL;
 	rq->next_rq = NULL;