Commit a6032710 authored by Gui Jianfeng's avatar Gui Jianfeng Committed by Jens Axboe

cfq-iosched: Fix update_vdisktime logic

The update_vdisktime logic is broken since commit
b54ce60e, st->min_vdisktime never makes
a progress. Fix it.

Thanks Vivek for pointing it out.
Signed-off-by: default avatarGui Jianfeng <guijianfen@cn.fujitsu.com>
Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent ef8a41df
......@@ -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);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment