From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THeon-0003Vy-V2 for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THeom-0007iK-Ia for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THeom-0007hq-AY for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:40 -0400 From: Kevin Wolf Date: Fri, 28 Sep 2012 19:56:58 +0200 Message-Id: <1348855033-17174-16-git-send-email-kwolf@redhat.com> In-Reply-To: <1348855033-17174-1-git-send-email-kwolf@redhat.com> References: <1348855033-17174-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 15/30] block: fix documentation of block_job_cancel_sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Paolo Bonzini Do this in a separate commit before we move the functions to blockjob.h. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block_int.h | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/block_int.h b/block_int.h index 56164a7..6b6b3ab 100644 --- a/block_int.h +++ b/block_int.h @@ -425,15 +425,13 @@ void block_job_cancel(BlockJob *job); bool block_job_is_cancelled(BlockJob *job); /** - * 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 - * 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 - * will usually protect the BlockDriverState objects with a reference - * count, should this be a concern. + * Synchronously cancel the job. The completion callback is called + * before the function returns. The job may actually complete + * instead of canceling itself; the circumstances under which this + * happens depend on the kind of job that is active. * * Returns the return value from the job if the job actually completed * during the call, or -ECANCELED if it was canceled. -- 1.7.6.5