summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2015-07-16 19:53:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 12:21:57 -0700
commit3425ebac158abf137ce7dcbe062baeb4c04e0097 (patch)
tree4e1e57c5c51b493be430e6f4f7a96f6bb0fddc51 /block
parentba3961ad681981dc74fcd519b8f98be8bc3ac381 (diff)
downloadlwn-3425ebac158abf137ce7dcbe062baeb4c04e0097.tar.gz
lwn-3425ebac158abf137ce7dcbe062baeb4c04e0097.zip
blk-mq: set default timeout as 30 seconds
commit e56f698bd0720e17f10f39e8b0b5b446ad0ab22c upstream. It is reasonable to set default timeout of request as 30 seconds instead of 30000 ticks, which may be 300 seconds if HZ is 100, for example, some arm64 based systems may choose 100 HZ. Signed-off-by: Ming Lei <ming.lei@canonical.com> Fixes: c76cbbcf4044 ("blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue()" Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 594eea04266e..2dc1fd6c5bdb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1968,7 +1968,7 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
goto err_hctxs;
setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q);
- blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30000);
+ blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30 * HZ);
q->nr_queues = nr_cpu_ids;
q->nr_hw_queues = set->nr_hw_queues;