Skip to content

Commit

Permalink
[PATCH] cfq-iosched: fix problem with barriers and max_depth == 1
Browse files Browse the repository at this point in the history
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: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jens Axboe authored and Linus Torvalds committed Aug 2, 2005
1 parent f7c80c9 commit d7ed538
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d7ed538

Please sign in to comment.