aboutsummaryrefslogtreecommitdiff
path: root/block/stream.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2016-10-27 12:06:58 -0400
committerJeff Cody <jcody@redhat.com>2016-11-01 07:55:57 -0400
commit8254b6d9534ba6a7d078a717e777fefe75ec27b6 (patch)
treeddecba3c1b7004fa8bc8428128668da1f7497e57 /block/stream.c
parent47970dfb0a611f6468a0ba44781b4610525d1af1 (diff)
downloadqemu-8254b6d9534ba6a7d078a717e777fefe75ec27b6.zip
qemu-8254b6d9534ba6a7d078a717e777fefe75ec27b6.tar.gz
qemu-8254b6d9534ba6a7d078a717e777fefe75ec27b6.tar.bz2
blockjob: centralize QMP event emissions
There's no reason to leave this to blockdev; we can do it in blockjobs directly and get rid of an extra callback for most users. All non-internal events, even those created outside of QMP, will consistently emit events. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-id: 1477584421-1399-5-git-send-email-jsnow@redhat.com Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'block/stream.c')
-rw-r--r--block/stream.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/stream.c b/block/stream.c
index 09ce9ef..152c1be 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -222,15 +222,14 @@ static const BlockJobDriver stream_job_driver = {
void stream_start(const char *job_id, BlockDriverState *bs,
BlockDriverState *base, const char *backing_file_str,
- int64_t speed, BlockdevOnError on_error,
- BlockCompletionFunc *cb, void *opaque, Error **errp)
+ int64_t speed, BlockdevOnError on_error, Error **errp)
{
StreamBlockJob *s;
BlockDriverState *iter;
int orig_bs_flags;
s = block_job_create(job_id, &stream_job_driver, bs, speed,
- BLOCK_JOB_DEFAULT, cb, opaque, errp);
+ BLOCK_JOB_DEFAULT, NULL, NULL, errp);
if (!s) {
return;
}
@@ -256,6 +255,6 @@ void stream_start(const char *job_id, BlockDriverState *bs,
s->on_error = on_error;
s->common.co = qemu_coroutine_create(stream_run, s);
- trace_stream_start(bs, base, s, s->common.co, opaque);
+ trace_stream_start(bs, base, s, s->common.co);
qemu_coroutine_enter(s->common.co);
}