Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-08 Thread Stefan Hajnoczi
On Thu, Dec 8, 2011 at 2:55 PM, Adam Litke wrote: > On Wed, Dec 07, 2011 at 04:01:58PM -0700, Eric Blake wrote: >> On 12/07/2011 03:35 PM, Adam Litke wrote: >> > Stefan's qemu tree has a block_job_cancel command that always acts >> > asynchronously.  In order to provide the synchronous behavior in

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-08 Thread Adam Litke
On Wed, Dec 07, 2011 at 04:01:58PM -0700, Eric Blake wrote: > On 12/07/2011 03:35 PM, Adam Litke wrote: > > Stefan's qemu tree has a block_job_cancel command that always acts > > asynchronously. In order to provide the synchronous behavior in libvirt > > (when > > flags is 0), I need to wait for

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-08 Thread Stefan Hajnoczi
On Wed, Dec 7, 2011 at 11:01 PM, Eric Blake wrote: > On 12/07/2011 03:35 PM, Adam Litke wrote: > 4) Ask Stefan to make the HMP monitor command synchronous, but only > expose the JSON command as asynchronous.  After all, it is only HMP > where we can't wait for an event. QEMU cannot do async comma

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-07 Thread Eric Blake
On 12/07/2011 03:35 PM, Adam Litke wrote: > Stefan's qemu tree has a block_job_cancel command that always acts > asynchronously. In order to provide the synchronous behavior in libvirt (when > flags is 0), I need to wait for the block job to go away. I see two options: > > 1) Use the event: > To

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-12-07 Thread Adam Litke
On Thu, Nov 24, 2011 at 09:21:42AM +, Stefan Hajnoczi wrote: > On Thu, Nov 24, 2011 at 5:31 AM, Daniel Veillard wrote: > > On Wed, Nov 23, 2011 at 09:04:50AM -0700, Eric Blake wrote: > >> On 11/23/2011 07:48 AM, Stefan Hajnoczi wrote: > >> > This means that virDomainBlockJobAbort() returns to

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-11-24 Thread Stefan Hajnoczi
On Thu, Nov 24, 2011 at 5:31 AM, Daniel Veillard wrote: > On Wed, Nov 23, 2011 at 09:04:50AM -0700, Eric Blake wrote: >> On 11/23/2011 07:48 AM, Stefan Hajnoczi wrote: >> > This means that virDomainBlockJobAbort() returns to the client without >> > a guarantee that the job has completed.  If the c

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-11-23 Thread Daniel Veillard
On Wed, Nov 23, 2011 at 09:04:50AM -0700, Eric Blake wrote: > On 11/23/2011 07:48 AM, Stefan Hajnoczi wrote: > > This means that virDomainBlockJobAbort() returns to the client without > > a guarantee that the job has completed. If the client enumerates jobs > > it may still see a job that has not

Re: [Qemu-devel] [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-11-23 Thread Eric Blake
On 11/23/2011 07:48 AM, Stefan Hajnoczi wrote: > This means that virDomainBlockJobAbort() returns to the client without > a guarantee that the job has completed. If the client enumerates jobs > it may still see a job that has not finished cancelling. The client > must register a handler for the B