qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 06/15] blockjob: Add .txn_commit and .txn_abo


From: John Snow
Subject: Re: [Qemu-devel] [PATCH v3 06/15] blockjob: Add .txn_commit and .txn_abort transaction actions
Date: Mon, 13 Jul 2015 19:06:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0


On 07/09/2015 11:46 PM, Fam Zheng wrote:
> They will be called if the job is part of a transaction, after all jobs in a
> transaction are completed or cancelled, before calling job->cb().
> 
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  include/block/blockjob.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/block/blockjob.h b/include/block/blockjob.h
> index dd9d5e6..a7b7f66 100644
> --- a/include/block/blockjob.h
> +++ b/include/block/blockjob.h
> @@ -50,6 +50,18 @@ typedef struct BlockJobDriver {
>       * manually.
>       */
>      void (*complete)(BlockJob *job, Error **errp);
> +
> +    /**
> +     * Optional callback for job types that can be in a transaction. Called
> +     * when the transaction succeeds.
> +     */
> +    void (*txn_commit)(BlockJob *job);
> +
> +    /**
> +     * Optional callback for job types that can be in a transaction. Call 
> when
> +     * the transaction fails.
> +     */
> +    void (*txn_abort)(BlockJob *job);
>  } BlockJobDriver;
>  
>  /**
> 

Reviewed-by: John Snow <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]