qemu-devel
[Top][All Lists]
Advanced

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

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


From: Fam Zheng
Subject: [Qemu-devel] [PATCH v3 06/15] blockjob: Add .txn_commit and .txn_abort transaction actions
Date: Fri, 10 Jul 2015 11:46:43 +0800

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;
 
 /**
-- 
2.4.3




reply via email to

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