diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2017-08-25 16:20:25 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-09-05 16:47:52 +0200 |
commit | f738cfc843055238ad969782db69156929873832 (patch) | |
tree | 7e4aa61dcd47de404fc6c157f2d20fae5e1948e4 /block/throttle-groups.c | |
parent | c61791fc23ecd96e6a1e038c379c4033ffd5f40c (diff) |
block: tidy ThrottleGroupMember initializations
Move the CoMutex and CoQueue inits inside throttle_group_register_tgm()
which is called whenever a ThrottleGroupMember is initialized. There's
no need for them to be separate.
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/throttle-groups.c')
-rw-r--r-- | block/throttle-groups.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c index 3b07b25f39..7749cf043f 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -508,6 +508,9 @@ void throttle_group_register_tgm(ThrottleGroupMember *tgm, read_timer_cb, write_timer_cb, tgm); + qemu_co_mutex_init(&tgm->throttled_reqs_lock); + qemu_co_queue_init(&tgm->throttled_reqs[0]); + qemu_co_queue_init(&tgm->throttled_reqs[1]); qemu_mutex_unlock(&tg->lock); } |