diff options
author | BenoƮt Canet <benoit.canet@irqsave.net> | 2014-06-27 18:25:25 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-06-27 20:00:00 +0200 |
commit | 09158f00e0fdb506dcbf36f67c615b7f6c604c5a (patch) | |
tree | f7a4f03efed4ae74d92c1dc3d1b9d4bef51a6780 /include/block/block.h | |
parent | 823c686356e6758bacb46d3a316b841536d6d707 (diff) | |
download | qemu-09158f00e0fdb506dcbf36f67c615b7f6c604c5a.tar.gz qemu-09158f00e0fdb506dcbf36f67c615b7f6c604c5a.tar.bz2 qemu-09158f00e0fdb506dcbf36f67c615b7f6c604c5a.zip |
block: Add replaces argument to drive-mirror
drive-mirror will bdrv_swap the new BDS named node-name with the one
pointed by replaces when the mirroring is finished.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index d0baf4fb83..b53833d1d6 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -175,6 +175,7 @@ typedef enum BlockOpType { BLOCK_OP_TYPE_MIRROR, BLOCK_OP_TYPE_RESIZE, BLOCK_OP_TYPE_STREAM, + BLOCK_OP_TYPE_REPLACE, BLOCK_OP_TYPE_MAX, } BlockOpType; @@ -314,6 +315,9 @@ bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs, BlockDriverState *candidate); bool bdrv_is_first_non_filter(BlockDriverState *candidate); +/* check if a named node can be replaced when doing drive-mirror */ +BlockDriverState *check_to_replace_node(const char *node_name, Error **errp); + /* async block I/O */ typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, int sector_num); |