diff options
author | Gui Jianfeng <guijianfeng@cn.fujitsu.com> | 2011-03-07 09:28:09 +0100 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-07 09:28:09 +0100 |
commit | a60327107b56573c305ecc78e471dbdbb4d2f426 (patch) | |
tree | 239521730642bc2f263d1daa9c49737467d6c1b9 /block | |
parent | ef8a41df8c140f10108de75b01b6369d6e49113c (diff) | |
download | linux-a60327107b56573c305ecc78e471dbdbb4d2f426.tar.gz linux-a60327107b56573c305ecc78e471dbdbb4d2f426.tar.bz2 linux-a60327107b56573c305ecc78e471dbdbb4d2f426.zip |
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) static void update_min_vdisktime(struct cfq_rb_root *st) { - u64 vdisktime = st->min_vdisktime; struct cfq_group *cfqg; if (st->left) { cfqg = rb_entry_cfqg(st->left); - vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime); + st->min_vdisktime = max_vdisktime(st->min_vdisktime, + cfqg->vdisktime); } - - st->min_vdisktime = max_vdisktime(st->min_vdisktime, vdisktime); } /* |