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 <f...@redhat.com> > --- > 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 <js...@redhat.com>