diff options
-rw-r--r-- | block/bsg.c | 2 | ||||
-rw-r--r-- | block/scsi_ioctl.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/block/bsg.c b/block/bsg.c index 0aae8d7ba99c..9cfbea8f2b83 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -202,6 +202,8 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq, rq->timeout = q->sg_timeout; if (!rq->timeout) rq->timeout = BLK_DEFAULT_SG_TIMEOUT; + if (rq->timeout < BLK_MIN_SG_TIMEOUT) + rq->timeout = BLK_MIN_SG_TIMEOUT; return 0; } diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index ec4b7f234626..dd3281a5fb5f 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -208,6 +208,8 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, rq->timeout = q->sg_timeout; if (!rq->timeout) rq->timeout = BLK_DEFAULT_SG_TIMEOUT; + if (rq->timeout < BLK_MIN_SG_TIMEOUT) + rq->timeout = BLK_MIN_SG_TIMEOUT; return 0; } diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 53ea933cf60b..73f4532373b8 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -623,6 +623,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; * default timeout for SG_IO if none specified */ #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) +#define BLK_MIN_SG_TIMEOUT (7 * HZ) #ifdef CONFIG_BOUNCE extern int init_emergency_isa_pool(void); |