[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/44] blockjob: Add .commit and .abort block job act
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 15/44] blockjob: Add .commit and .abort block job actions |
Date: |
Tue, 10 Nov 2015 14:14:10 +0000 |
From: Fam Zheng <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: John Snow <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
include/block/blockjob.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index b649a40..ed856d7 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -50,6 +50,26 @@ typedef struct BlockJobDriver {
* manually.
*/
void (*complete)(BlockJob *job, Error **errp);
+
+ /**
+ * If the callback is not NULL, it will be invoked when all the jobs
+ * belonging to the same transaction complete; or upon this job's
+ * completion if it is not in a transaction. Skipped if NULL.
+ *
+ * All jobs will complete with a call to either .commit() or .abort() but
+ * never both.
+ */
+ void (*commit)(BlockJob *job);
+
+ /**
+ * If the callback is not NULL, it will be invoked when any job in the
+ * same transaction fails; or upon this job's failure (due to error or
+ * cancellation) if it is not in a transaction. Skipped if NULL.
+ *
+ * All jobs will complete with a call to either .commit() or .abort() but
+ * never both.
+ */
+ void (*abort)(BlockJob *job);
} BlockJobDriver;
/**
--
2.5.0
- [Qemu-devel] [PULL 07/44] block: Drop BlockDriver.bdrv_ioctl, (continued)
- [Qemu-devel] [PULL 07/44] block: Drop BlockDriver.bdrv_ioctl, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 08/44] block: Introduce BlockDriver.bdrv_drain callback, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 10/44] qapi: Add transaction support to block-dirty-bitmap operations, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 11/44] iotests: add transactional incremental backup test, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 13/44] backup: Extract dirty bitmap handling as a separate function, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 12/44] block: rename BlkTransactionState and BdrvActionOps, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 14/44] blockjob: Introduce reference count and fix reference to job->bs, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 16/44] blockjob: Add "completed" and "ret" in BlockJob, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 18/44] block: Add block job transactions, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 17/44] blockjob: Simplify block_job_finish_sync, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 15/44] blockjob: Add .commit and .abort block job actions,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 19/44] block/backup: Rely on commit/abort for cleanup, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 20/44] block: Add BlockJobTxn support to backup_run, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 22/44] iotests: 124 - transactional failure test, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 21/44] block: add transactional properties, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 23/44] tests: add BlockJobTxn unit test, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 25/44] ide: Account for write operations correctly, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 24/44] xen_disk: Account for flush operations, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 26/44] block: define 'clock_type' for the accounting code, Stefan Hajnoczi, 2015/11/10
- [Qemu-devel] [PULL 27/44] util: Infrastructure for computing recent averages, Stefan Hajnoczi, 2015/11/10