Il 27/09/2012 14:03, Kevin Wolf ha scritto: >> > /** >> > - * block_job_cancel: >> > + * block_job_cancel_sync: >> > * @job: The job to be canceled. >> > * >> > - * Asynchronously cancel the job and wait for it to reach a quiescent >> > + * Synchronously cancel the job and wait for it to reach a quiescent >> > * state. Note that the completion callback will still be called >> > * asynchronously, hence it is *not* valid to call #bdrv_delete >> > * immediately after #block_job_cancel_sync. Users of block jobs > I still don't agree with the s/Async/Sync/, in my opinion it contradicts > the rest of the comment. If it did cancel the job synchronously, then > the job would be immediately completed, and there would be no need to > wait for a quiescent state nor would the completion callback occur later.
Now that I read it again, the comment is obsolete. block_job_cancel_sync stalls until block_job_cancel_cb is called, and that calls the completion callback. Paolo