diff options
author | Gui Jianfeng <guijianfeng@cn.fujitsu.com> | 2011-03-07 03:28:09 -0500 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-07 03:28:09 -0500 |
commit | a60327107b56573c305ecc78e471dbdbb4d2f426 (patch) | |
tree | 239521730642bc2f263d1daa9c49737467d6c1b9 /block | |
parent | ef8a41df8c140f10108de75b01b6369d6e49113c (diff) |
cfq-iosched: Fix update_vdisktime logic
The update_vdisktime logic is broken since commit
b54ce60eb7f61f8e314b8b241b0469eda3bb1d42, st->min_vdisktime never makes
a progress. Fix it.
Thanks Vivek for pointing it out.
Signed-off-by: Gui Jianfeng <guijianfen@cn.fujitsu.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 135b1a48da23..938ae52aa927 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -557,15 +557,13 @@ static inline u64 min_vdisktime(u64 min_vdisktime, u64 vdisktime) | |||
557 | 557 | ||
558 | static void update_min_vdisktime(struct cfq_rb_root *st) | 558 | static void update_min_vdisktime(struct cfq_rb_root *st) |
559 | { | 559 | { |
560 | u64 vdisktime = st->min_vdisktime; | ||
561 | struct cfq_group *cfqg; | 560 | struct cfq_group *cfqg; |
562 | 561 | ||
563 | if (st->left) { | 562 | if (st->left) { |
564 | cfqg = rb_entry_cfqg(st->left); | 563 | cfqg = rb_entry_cfqg(st->left); |
565 | vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime); | 564 | st->min_vdisktime = max_vdisktime(st->min_vdisktime, |
565 | cfqg->vdisktime); | ||
566 | } | 566 | } |
567 | |||
568 | st->min_vdisktime = max_vdisktime(st->min_vdisktime, vdisktime); | ||
569 | } | 567 | } |
570 | 568 | ||
571 | /* | 569 | /* |