summaryrefslogtreecommitdiffstats
path: root/include/block/block_int.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-04-17 19:49:58 -0400
committerKevin Wolf <kwolf@redhat.com>2015-04-28 15:36:10 +0200
commitd58d84539784d27c826924a79d9436178b07ff69 (patch)
treedfc10d7edcb62f28355eab4d7b6ab3eb9bc0bca6 /include/block/block_int.h
parent9bd2b08f27b9c27bb40d73b6466321b8c635086e (diff)
downloadhqemu-d58d84539784d27c826924a79d9436178b07ff69.zip
hqemu-d58d84539784d27c826924a79d9436178b07ff69.tar.gz
qmp: Add support of "dirty-bitmap" sync mode for drive-backup
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1429314609-29776-11-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 'include/block/block_int.h')
-rw-r--r--include/block/block_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index fb9e100..e0d5561 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -602,6 +602,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target,
* @target: Block device to write to.
* @speed: The maximum speed, in bytes per second, or 0 for unlimited.
* @sync_mode: What parts of the disk image should be copied to the destination.
+ * @sync_bitmap: The dirty bitmap if sync_mode is MIRROR_SYNC_MODE_DIRTY_BITMAP.
* @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.
* @cb: Completion function for the job.
@@ -612,6 +613,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target,
*/
void backup_start(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,
OpenPOWER on IntegriCloud