aboutsummaryrefslogtreecommitdiff
path: root/block/backup.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2016-07-05 17:28:58 +0300
committerKevin Wolf <kwolf@redhat.com>2016-07-13 13:26:02 +0200
commit70559d499c84b9c7b1874821f970a15d52460d64 (patch)
tree4d9a9b555f22598fe650e1fd6280d4c36913f5ec /block/backup.c
parent71aa98678c2b5616de5453d55e12f8ea810fbefb (diff)
downloadqemu-70559d499c84b9c7b1874821f970a15d52460d64.zip
qemu-70559d499c84b9c7b1874821f970a15d52460d64.tar.gz
qemu-70559d499c84b9c7b1874821f970a15d52460d64.tar.bz2
backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'
This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/backup.c')
-rw-r--r--block/backup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/backup.c b/block/backup.c
index 19c587c..dce6614 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -474,9 +474,9 @@ static void coroutine_fn backup_run(void *opaque)
block_job_defer_to_main_loop(&job->common, backup_complete, data);
}
-void backup_start(BlockDriverState *bs, BlockDriverState *target,
- int64_t speed, MirrorSyncMode sync_mode,
- BdrvDirtyBitmap *sync_bitmap,
+void backup_start(const char *job_id, BlockDriverState *bs,
+ BlockDriverState *target, int64_t speed,
+ MirrorSyncMode sync_mode, BdrvDirtyBitmap *sync_bitmap,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
BlockCompletionFunc *cb, void *opaque,
@@ -541,7 +541,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
goto error;
}
- job = block_job_create(NULL, &backup_job_driver, bs, speed,
+ job = block_job_create(job_id, &backup_job_driver, bs, speed,
cb, opaque, errp);
if (!job) {
goto error;