diff options
-rw-r--r-- | block/cfq-iosched.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 1bcbd8c79896..467981e19d7a 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -600,11 +600,15 @@ cfq_find_next_rq(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
600 | static unsigned long cfq_slice_offset(struct cfq_data *cfqd, | 600 | static unsigned long cfq_slice_offset(struct cfq_data *cfqd, |
601 | struct cfq_queue *cfqq) | 601 | struct cfq_queue *cfqq) |
602 | { | 602 | { |
603 | struct cfq_rb_root *service_tree; | ||
604 | |||
605 | service_tree = service_tree_for(cfqq_prio(cfqq), cfqq_type(cfqq), cfqd); | ||
606 | |||
603 | /* | 607 | /* |
604 | * just an approximation, should be ok. | 608 | * just an approximation, should be ok. |
605 | */ | 609 | */ |
606 | return (cfqd->busy_queues - 1) * (cfq_prio_slice(cfqd, 1, 0) - | 610 | return service_tree->count * (cfq_prio_slice(cfqd, 1, 0) - |
607 | cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio)); | 611 | cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio)); |
608 | } | 612 | } |
609 | 613 | ||
610 | /* | 614 | /* |