summaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-31 10:42:51 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-31 10:42:51 +0100
commitf563a5d7a820424756f358e747238f03e866838a (patch)
treef78fa474b1933bd395af401a6d745150f4ecd15e /block_int.h
parenta27365265cc2fed1178bf25a205e8ee02a9c0caf (diff)
parentaee0bf7d8d7564f8f2c40e4501695c492b7dd8d1 (diff)
downloadqemu-f563a5d7a820424756f358e747238f03e866838a.tar.gz
Merge remote-tracking branch 'origin/master' into threadpool
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index cedabbdd13..9deedb811a 100644
--- a/block_int.h
+++ b/block_int.h
@@ -333,4 +333,28 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockdevOnError on_error, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp);
+/*
+ * mirror_start:
+ * @bs: Block device to operate on.
+ * @target: Block device to write to.
+ * @speed: The maximum speed, in bytes per second, or 0 for unlimited.
+ * @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.
+ * @cb: Completion function for the job.
+ * @opaque: Opaque pointer value passed to @cb.
+ * @errp: Error object.
+ *
+ * Start a mirroring operation on @bs. Clusters that are allocated
+ * in @bs will be written to @bs until the job is cancelled or
+ * 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,
+ int64_t speed, MirrorSyncMode mode,
+ BlockdevOnError on_source_error,
+ BlockdevOnError on_target_error,
+ BlockDriverCompletionFunc *cb,
+ void *opaque, Error **errp);
+
#endif /* BLOCK_INT_H */