[RFC PATCH 0/2] use larger max_request_size for virtio_blk

2018-04-05 Thread Weiping Zhang
blk_queue_max_hw_sectors_no_limit to set a proper max reqeust size. Weiping Zhang (2): blk-setting: add new helper blk_queue_max_hw_sectors_no_limit virtio_blk: add new module parameter to set max request size block/blk-settings.c | 20 drivers/block/virtio_blk.c | 32

Re: [PATCH v3] block: add documentation for io_timeout

2018-12-05 Thread Weiping Zhang
enum blk_eh_timer_return ret; ret = req->q->mq_ops->timeout(req, reserved); if (ret == BLK_EH_DONE) return; WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER); } blk_add_timer(req); } > On Wed, Dec 05, 2018 at 10:1

[PATCH 0/2] get rid of BLK_MAX_TIMEOUT

2018-12-05 Thread Weiping Zhang
Get rid of BLK_MAX_TIMEOUT, since we want use io_timeout to control the maximun timeouts of a request, so remove this limitation. Weiping Zhang (2): block: get rid of BLK_MAX_TIMEOUT block: add BLK_DEF_TIMEOUT block/blk-mq.c | 2 +- block/blk-timeout.c | 13 + block/blk.h

[PATCH v3] block: add documentation for io_timeout

2018-12-05 Thread Weiping Zhang
Add documentation for /sys/block//queue/io_timeout. Signed-off-by: Weiping Zhang --- Documentation/ABI/testing/sysfs-block | 10 ++ Documentation/block/queue-sysfs.txt | 7 +++ 2 files changed, 17 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation

Re: [PATCH v3] block: add documentation for io_timeout

2018-12-05 Thread Weiping Zhang
Weiping Zhang 于2018年12月5日周三 下午10:49写道: > > Christoph Hellwig 于2018年12月5日周三 下午10:40写道: > > > > Can you please also send a patch to not show this attribute for > > drivers without a timeout handler? Thanks! > > Is there a simple way do that ? Shall we return

[PATCH 1/2] block: get rid of BLK_MAX_TIMEOUT

2018-12-05 Thread Weiping Zhang
Since io_timeout was added to sysfs, the user can tune timeouts by that attribute, so kill this limitation. Signed-off-by: Weiping Zhang --- block/blk-timeout.c | 13 + block/blk.h | 4 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/block/blk-timeout.c

[PATCH 2/2] block: add BLK_DEF_TIMEOUT

2018-12-05 Thread Weiping Zhang
Add an obvious definition for default request timeout. Signed-off-by: Weiping Zhang --- 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

Re: [PATCH 1/2] block: get rid of BLK_MAX_TIMEOUT

2018-12-06 Thread Weiping Zhang
Bart Van Assche 于2018年12月5日周三 下午11:59写道: > > On Wed, 2018-12-05 at 23:37 +0800, Weiping Zhang wrote: > > @@ -130,7 +119,7 @@ void blk_add_timer(struct request *req) > >* than an existing one, modify the timer. Round up to next nearest > >* second. > &

[PATCH] block: add documentation for io_timeout

2018-11-28 Thread Weiping Zhang
add documentation for /sys/block//queue/io_timeout Signed-off-by: Weiping Zhang --- Documentation/ABI/testing/sysfs-block | 9 + Documentation/block/queue-sysfs.txt | 6 ++ 2 files changed, 15 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI

Re: [RFC PATCH v2] block: add io timeout to sysfs

2018-11-28 Thread Weiping Zhang
Hi Jens, It's useful if user want a short timeout when a disk doesn't work normally. Would you give some comments for this patch, Thanks a lot Weiping Zhang 于2018年11月19日周一 下午10:30写道: > > Give a interface to adjust io timeout by device. > > Signed-off-by: Weiping Zhang > --- &g

[PATCH v3] block: add io timeout to sysfs

2018-11-28 Thread Weiping Zhang
Give a interface to adjust io timeout(ms) by device. Signed-off-by: Weiping Zhang --- Changes since v2: * use msecs_to_jiffies and jiffies_to_msecs Changes since v1: * make sure timeout > 0 block/blk-sysfs.c | 27 +++ 1 file changed, 27 insertions(+) diff --

[RFC] block: add io timeout to sysfs

2018-11-17 Thread Weiping Zhang
Give a interface to adjust io timeout by device. Signed-off-by: Weiping Zhang --- block/blk-sysfs.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 80eef48fddc8..0cabfb935e71 100644 --- a/block/blk-sysfs.c +++ b/block

[RFC PATCH v2] block: add io timeout to sysfs

2018-11-19 Thread Weiping Zhang
Give a interface to adjust io timeout by device. Signed-off-by: Weiping Zhang --- Changes since v1: * make sure timeout > 0 block/blk-sysfs.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 80eef48fddc8..90a927514

<    1   2