On 09/26/2012 01:10 PM, Eric Blake wrote: >> +Emitted when a block job encounters an error. >> + >> +Data: >> + >> +- "device": device name (json-string) >> +- "operation": I/O operation (json-string, "read" or "write") > > For symmetry with BLOCK_JOB_{CANCELLED,COMPLETED}, you also need: > - "type": Job type ("stream" for image streaming, json-string) > > Libvirt would like to key off of the 'type' field for all three events. > Besides, if management issues several block commands in a row, and only > then starts processing the pending event queue, it would be nice to know > whether the error stemmed from a 'stream', 'mirror', or (when combined > with Jeff's patches) 'commit' job.
For that matter, maybe qapi-schema.json should define an enum: { 'enum': 'BlockJobType', 'data': [ 'stream', 'mirror', 'commit' ] } and have the job type listed throughout the various QMP calls as a member of that enum, rather than open-coded strings, to make it easier the next time we add a job type. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature