Since io_timeout was added to sysfs, the user can tune timeouts by that attribute, so kill this limitation. Signed-off-by: Weiping Zhang <zhangweiping@xxxxxxxxxxxxxx> --- block/blk-timeout.c | 13 +------------ block/blk.h | 4 ---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 124c26128bf6..6b2b0f7e5929 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -89,17 +89,6 @@ void blk_abort_request(struct request *req) } EXPORT_SYMBOL_GPL(blk_abort_request); -unsigned long blk_rq_timeout(unsigned long timeout) -{ - unsigned long maxt; - - maxt = round_jiffies_up(jiffies + BLK_MAX_TIMEOUT); - if (time_after(timeout, maxt)) - timeout = maxt; - - return timeout; -} - /** * blk_add_timer - Start timeout timer for a single request * @req: request that is about to start running. @@ -130,7 +119,7 @@ void blk_add_timer(struct request *req) * than an existing one, modify the timer. Round up to next nearest * second. */ - expiry = blk_rq_timeout(round_jiffies_up(expiry)); + expiry = round_jiffies_up(expiry); if (!timer_pending(&q->timeout) || time_before(expiry, q->timeout.expires)) { diff --git a/block/blk.h b/block/blk.h index 848278c52030..f0d0a18fb276 100644 --- a/block/blk.h +++ b/block/blk.h @@ -7,9 +7,6 @@ #include <xen/xen.h> #include "blk-mq.h" -/* Max future timer expiry for timeouts */ -#define BLK_MAX_TIMEOUT (5 * HZ) - #ifdef CONFIG_DEBUG_FS extern struct dentry *blk_debugfs_root; #endif @@ -151,7 +148,6 @@ static inline bool bio_integrity_endio(struct bio *bio) } #endif /* CONFIG_BLK_DEV_INTEGRITY */ -unsigned long blk_rq_timeout(unsigned long timeout); void blk_add_timer(struct request *req); bool bio_attempt_front_merge(struct request_queue *q, struct request *req, -- 2.14.1