summaryrefslogtreecommitdiff
path: root/block/throttle-groups.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-09-27 16:48:39 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-27 16:48:39 +0100
commitcfe4cade054c0e0d00d0185cdc433a9e3ce3e2e4 (patch)
treefb6658177a90773b24ec9ca6fd00f4142fb9887e /block/throttle-groups.c
parentd666cacaeab904fb6e8361ee791b6e8ab8448577 (diff)
parentb156d51b62e6970753e1f9f36f7c4d5fdbf4c619 (diff)
downloadqemu-cfe4cade054c0e0d00d0185cdc433a9e3ce3e2e4.tar.gz
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches # gpg: Signature made Tue 26 Sep 2017 14:52:32 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (24 commits) block/qcow2-bitmap: fix use of uninitialized pointer qemu-iotests: add shrinking image test qcow2: add shrink image support qcow2: add qcow2_cache_discard qemu-img: add --shrink flag for resize iotests: fix 181: enable postcopy-ram capability on target qemu-iotests: Test change-backing-file command block: Fix permissions after bdrv_reopen() block: reopen: Queue children after their parents block: Base permissions on rw state after reopen block: Add reopen queue to bdrv_check_perm() block: Add reopen_queue to bdrv_child_perm() qemu-io: Drop write permissions before read-only reopen block: Clean up some bad code in the vvfat driver block/throttle-groups.c: allocate RestartData on the heap throttle: Assert that bkt->max is valid in throttle_compute_wait() iotests: Print full path of bad output if mismatch iotests: use virtio aliases for 067 iotests: use -ccw on s390x for 051 iotests: use -ccw on s390x for 040, 139, and 182 ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/throttle-groups.c')
-rw-r--r--block/throttle-groups.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index 6ba992c8d7..b291a88481 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -403,17 +403,19 @@ static void coroutine_fn throttle_group_restart_queue_entry(void *opaque)
schedule_next_request(tgm, is_write);
qemu_mutex_unlock(&tg->lock);
}
+
+ g_free(data);
}
static void throttle_group_restart_queue(ThrottleGroupMember *tgm, bool is_write)
{
Coroutine *co;
- RestartData rd = {
- .tgm = tgm,
- .is_write = is_write
- };
+ RestartData *rd = g_new0(RestartData, 1);
+
+ rd->tgm = tgm;
+ rd->is_write = is_write;
- co = qemu_coroutine_create(throttle_group_restart_queue_entry, &rd);
+ co = qemu_coroutine_create(throttle_group_restart_queue_entry, rd);
aio_co_enter(tgm->aio_context, co);
}