aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2006-10-31 08:21:55 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-31 11:12:45 -0500
commit5fccbf61be2a7f32d2002b04afca4c5009612a58 (patch)
tree1a7a09dcbf4b518cf5d695fa8dbe41e21a1ab413 /block
parenteafa6cb18ec7e5424ce54017b5ce6d11dff58b79 (diff)
[PATCH] CFQ: request <-> request merging rr_list fixup
In very rare circumstances would we be pruning a merged request and at the same time delete the implicated cfqq from the rr_list, and not readd it when the merged request got added. This could cause io stalls until that process issued io again. Fix it up by putting the rr_list add handling into cfq_add_rq_rb(), identical to how pruning is handled in cfq_del_rq_rb(). This fixes a hang reproducible with fsx-linux. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 25c4e7ed0d00..1d9c3c70a9a0 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -456,6 +456,9 @@ static void cfq_add_rq_rb(struct request *rq)
456 */ 456 */
457 while ((__alias = elv_rb_add(&cfqq->sort_list, rq)) != NULL) 457 while ((__alias = elv_rb_add(&cfqq->sort_list, rq)) != NULL)
458 cfq_dispatch_insert(cfqd->queue, __alias); 458 cfq_dispatch_insert(cfqd->queue, __alias);
459
460 if (!cfq_cfqq_on_rr(cfqq))
461 cfq_add_cfqq_rr(cfqd, cfqq);
459} 462}
460 463
461static inline void 464static inline void
@@ -1652,9 +1655,6 @@ static void cfq_insert_request(request_queue_t *q, struct request *rq)
1652 1655
1653 cfq_add_rq_rb(rq); 1656 cfq_add_rq_rb(rq);
1654 1657
1655 if (!cfq_cfqq_on_rr(cfqq))
1656 cfq_add_cfqq_rr(cfqd, cfqq);
1657
1658 list_add_tail(&rq->queuelist, &cfqq->fifo); 1658 list_add_tail(&rq->queuelist, &cfqq->fifo);
1659 1659
1660 cfq_rq_enqueued(cfqd, cfqq, rq); 1660 cfq_rq_enqueued(cfqd, cfqq, rq);