summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2016-07-05 17:28:57 +0300
committerKevin Wolf <kwolf@redhat.com>2016-07-13 13:26:02 +0200
commit71aa98678c2b5616de5453d55e12f8ea810fbefb (patch)
treebcf3632bc94a62a9dd3a821ea945c480d53bd605 /include
parent7f0317cfc8da620cdb38cb5cfec5f82b8dd05403 (diff)
downloadqemu-71aa98678c2b5616de5453d55e12f8ea810fbefb.tar.gz
mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'
This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', allowing the user to specify the ID of the block job to be created. The HMP 'drive_mirror' 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 'include')
-rw-r--r--include/block/block_int.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 2a27a1946b..ad44fb959e 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -697,6 +697,8 @@ void commit_active_start(BlockDriverState *bs, BlockDriverState *base,
void *opaque, Error **errp);
/*
* mirror_start:
+ * @job_id: The id of the newly-created job, or %NULL to use the
+ * device name of @bs.
* @bs: Block device to operate on.
* @target: Block device to write to.
* @replaces: Block graph node name to replace once the mirror is done. Can
@@ -718,8 +720,8 @@ void commit_active_start(BlockDriverState *bs, BlockDriverState *base,
* manually completed. At the end of a successful mirroring job,
* @bs will be switched to read from @target.
*/
-void mirror_start(BlockDriverState *bs, BlockDriverState *target,
- const char *replaces,
+void mirror_start(const char *job_id, BlockDriverState *bs,
+ BlockDriverState *target, const char *replaces,
int64_t speed, uint32_t granularity, int64_t buf_size,
MirrorSyncMode mode, BlockMirrorBackingMode backing_mode,
BlockdevOnError on_source_error,