From 71aa98678c2b5616de5453d55e12f8ea810fbefb Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 5 Jul 2016 17:28:57 +0300 Subject: 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 Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- include/block/block_int.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/block') 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, -- cgit v1.2.3-55-g7522