Add an obvious definition for default request timeout. Signed-off-by: Weiping Zhang <zhangweiping@xxxxxxxxxxxxxx> --- block/blk-mq.c | 2 +- block/blk.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 900550594651..53337d5c37af 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2845,7 +2845,7 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, goto err_hctxs; INIT_WORK(&q->timeout_work, blk_mq_timeout_work); - blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30 * HZ); + blk_queue_rq_timeout(q, set->timeout ? set->timeout : BLK_DEF_TIMEOUT); q->tag_set = set; diff --git a/block/blk.h b/block/blk.h index f0d0a18fb276..7905b952b7b3 100644 --- a/block/blk.h +++ b/block/blk.h @@ -7,6 +7,9 @@ #include <xen/xen.h> #include "blk-mq.h" +/* the default request timeout */ +#define BLK_DEF_TIMEOUT (30 * HZ) + #ifdef CONFIG_DEBUG_FS extern struct dentry *blk_debugfs_root; #endif -- 2.14.1