From 0fc9f8ea2800b76eaea20a8a3a91fbeeb4bfa81b Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Mon, 8 Jun 2015 13:56:08 +0800 Subject: qmp: Add optional bool "unmap" to drive-mirror If specified as "true", it allows discarding on target sectors where source is not allocated. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- include/block/block_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/block/block_int.h b/include/block/block_int.h index 44a5cf7..83ed1a5 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -612,6 +612,7 @@ void commit_active_start(BlockDriverState *bs, BlockDriverState *base, * @mode: Whether to collapse all images in the chain to the target. * @on_source_error: The action to take upon error reading from the source. * @on_target_error: The action to take upon error writing to the target. + * @unmap: Whether to unmap target where source sectors only contain zeroes. * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. * @errp: Error object. @@ -626,6 +627,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target, int64_t speed, uint32_t granularity, int64_t buf_size, MirrorSyncMode mode, BlockdevOnError on_source_error, BlockdevOnError on_target_error, + bool unmap, BlockCompletionFunc *cb, void *opaque, Error **errp); -- cgit v1.1