summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-07-23 15:15:47 +0200
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:19 +0200
commita66a2a368383e627b929bf42d1b972822491404b (patch)
treefcec5bb544b797dcb2e7b40929bf304311e0c86a /blockdev.c
parentaeae883baf2377b714a41529f94905046fa058f3 (diff)
downloadqemu-a66a2a368383e627b929bf42d1b972822491404b.tar.gz
block: introduce BLOCK_JOB_READY event
Even for jobs that need to be manually completed, management may want to take care itself of the completion, not requiring the user to issue a command to terminate the job. In this case we want to avoid that they poll us continuously, waiting for completion to become available. Thus, add a new event that signals the phase switch and the availability of the block-job-complete command. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/blockdev.c b/blockdev.c
index 02d3e0b698..248d5f62c0 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1056,20 +1056,6 @@ void qmp_block_resize(const char *device, int64_t size, Error **errp)
}
}
-static QObject *qobject_from_block_job(BlockJob *job)
-{
- return qobject_from_jsonf("{ 'type': %s,"
- "'device': %s,"
- "'len': %" PRId64 ","
- "'offset': %" PRId64 ","
- "'speed': %" PRId64 " }",
- job->job_type->job_type,
- bdrv_get_device_name(job->bs),
- job->len,
- job->offset,
- job->speed);
-}
-
static void block_job_cb(void *opaque, int ret)
{
BlockDriverState *bs = opaque;