On Mon, 2018-11-19 at 22:11 +-0800, Weiping Zhang wrote: +AD4 Give a interface to adjust io timeout by device. +AD4 +AD4 Signed-off-by: Weiping Zhang +ADw-zhangweiping+AEA-didiglobal.com+AD4 +AD4 --- +AD4 +AD4 Changes since v1: +AD4 +ACo make sure timeout +AD4 0 +AD4 +AD4 block/blk-sysfs.c +AHw 27 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +AD4 1 file changed, 27 insertions(+-) Documentation for new block layer sysfs attributes should be added in Documentation/ABI/testing/sysfs-block and also in Documentation/block/queue-sysfs.txt. Please add such documentation for this new attribute. +AD4 +-static ssize+AF8-t queue+AF8-io+AF8-timeout+AF8-store(struct request+AF8-queue +ACo-q, const char +ACo-page, +AD4 +- size+AF8-t count) +AD4 +-+AHs +AD4 +- unsigned int val+ADs +AD4 +- int err+ADs +AD4 +- +AD4 +- err +AD0 kstrtou32(page, 10, +ACY-val)+ADs +AD4 +- if (err +AHwAfA val +AD0APQ 0) +AD4 +- return -EINVAL+ADs +AD4 +- +AD4 +- blk+AF8-queue+AF8-rq+AF8-timeout(q, val)+ADs +AD4 +- +AD4 +- return count+ADs +AD4 +-+AH0 Setting the block layer timeout to a very high value (e.g. hours) may make it look like a request got stuck without users having an easy way of figuring out what is going on. I'm wondering whether this function should restrict the upper bound for block layer timeouts. How about limiting timeout values to ten minutes? Thanks, Bart.