提交 d7ed538a 编写于 作者: J Jens Axboe 提交者: Linus Torvalds

[PATCH] cfq-iosched: fix problem with barriers and max_depth == 1

CFQ will currently stall when using write barriers and the default
max_depth setting of 1, since we artificially need a depth of 2 when
pre-pending the first flush. So never deny the barrier request going to
the device.

This is a regression since 2.6.12, it was found in SUSE testing.
Signed-off-by: NJens Axboe <axboe@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f7c80c9f
......@@ -1281,6 +1281,7 @@ static struct request *cfq_next_request(request_queue_t *q)
*/
if (!cfq_crq_in_driver(crq) &&
!cfq_cfqq_idle_window(cfqq) &&
!blk_barrier_rq(rq) &&
cfqd->rq_in_driver >= cfqd->cfq_max_depth)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册