Enforce a minimum SG_IO timeout
commit5c7c64831c51516034a7099ba25718f7aaed19e4
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Dec 2008 22:49:18 +0000 (5 14:49 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:14 +0000 (13 15:29 -0800)
treebcb8ea06253c5f990c5bf6cde4379c0244b0c4c7
parentfc27e1db48a5b3d551a50bbe6770577ce4e64d51
Enforce a minimum SG_IO timeout

commit f2f1fa78a155524b849edf359e42a3001ea652c0 upstream.

There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.

As a result, shorter timeouts than a few seconds simply do not make
sense, as the recovery would be longer than the timeout itself.

Add a BLK_MIN_SG_TIMEOUT to match the existign BLK_DEFAULT_SG_TIMEOUT.

Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/bsg.c
block/scsi_ioctl.c
include/linux/blkdev.h