On 06/18/2013 03:24 AM, Gerd Hoffmann wrote: >>>> >> > We have a job API in the block layer. Would it make sense to have a >>>> >> > QMP-level job interface? >> > I'd agree with this. > Something like the attached patch? Which is just the bare minimum I'll > need for screendump. Basically a one-off bottom half with some monitor > infrastructure (job id, error handling). So it isn't for big jobs, but > for small jobs which have to wait for something before they execute > (spice-server, guest action, whatever). > > If you wanna some more context: screendump on top of that is here: > https://www.kraxel.org/cgit/qemu/log/?h=rebase/pixman >
> + > +void monitor_job_cancel(monitor_job *job) > +{ > + monitor_job_event(job, "canceled", NULL); > + if (job->bh) { > + qemu_bh_delete(job->bh); > + } > + g_free(job); > +} What calls this command? > diff --git a/qapi-schema.json b/qapi-schema.json > index aced724..a449a43 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2515,6 +2515,16 @@ > 'str': 'str' } } > > ## > +# @MonitorJob > +# > +# Monitor job id. > +# No mention of @job-id? > +# Since 1.6 > +## > +{ 'type': 'MonitorJob', > + 'data': { 'job-id': 'int' } } For a type, this looks okay; but where are the commands that use this type? I take it new commands (like screendump) would return a MonitorJob, and that we need a query-monitor-jobs as well as a monitor-job-cancel. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature