diff options
author | John Snow <jsnow@redhat.com> | 2015-11-05 18:13:17 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-12 16:22:44 +0100 |
commit | 78f51fde88d1925b5ae51ba789339baa9ff72ad1 (patch) | |
tree | 5e50d2300ce5e92a1b94de2a61bf7b3dcfcd2ec3 /block | |
parent | c347b2c62a53b73cf6cc31225feb125d2f20f186 (diff) |
block: Add BlockJobTxn support to backup_run
Allow a BlockJobTxn to be passed into backup_run, which
will allow the job to join a transactional group if present.
Propagate this new parameter outward into new QMP helper
functions in blockdev.c to allow transaction commands to
pass forward their BlockJobTxn object in a forthcoming patch.
[split up from a patch originally by Stefan and Fam. --js]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1446765200-3054-12-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/backup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/backup.c b/block/backup.c index a80800f472..3b39119256 100644 --- a/block/backup.c +++ b/block/backup.c @@ -493,7 +493,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target, BlockdevOnError on_source_error, BlockdevOnError on_target_error, BlockCompletionFunc *cb, void *opaque, - Error **errp) + BlockJobTxn *txn, Error **errp) { int64_t len; @@ -575,6 +575,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target, sync_bitmap : NULL; job->common.len = len; job->common.co = qemu_coroutine_create(backup_run); + block_job_txn_add_job(txn, &job->common); qemu_coroutine_enter(job->common.co, job); return; |