summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf2016-05-12 15:35:20 +0200
committerKevin Wolf2016-05-12 15:35:20 +0200
commitefc2645f714aae1bcf22e8165cad51c57f34fdf3 (patch)
treeb7f6c7ceae0977dc2cc569d0de1e6942d5aa6fb0 /include
parentblock: Inactivate all children (diff)
parentqemu-iotests: iotests: fail hard if not run via "check" (diff)
downloadqemu-efc2645f714aae1bcf22e8165cad51c57f34fdf3.tar.gz
qemu-efc2645f714aae1bcf22e8165cad51c57f34fdf3.tar.xz
qemu-efc2645f714aae1bcf22e8165cad51c57f34fdf3.zip
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-05-12' into queue-block
Block patches for 2.7 # gpg: Signature made Thu May 12 15:34:13 2016 CEST using RSA key ID E838ACAD # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" * mreitz/tags/pull-block-for-kevin-2016-05-12: qemu-iotests: iotests: fail hard if not run via "check" block: enable testing of LUKS driver with block I/O tests block: add support for encryption secrets in block I/O tests block: add support for --image-opts in block I/O tests qemu-io: Add 'write -z -u' to test MAY_UNMAP flag qemu-io: Add 'write -f' to test FUA flag qemu-io: Allow unaligned access by default qemu-io: Use bool for command line flags qemu-io: Make 'open' subcommand more like command line qemu-io: Add missing option documentation qmp: add monitor command to add/remove a child quorum: implement bdrv_add_child() and bdrv_del_child() Add new block driver interface to add/delete a BDS's child qemu-img: check block status of backing file when converting. iotests: fix the redirection order in 083 Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h8
-rw-r--r--include/block/block_int.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 0e8b4d1341..b210832778 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -476,6 +476,10 @@ void bdrv_disable_copy_on_read(BlockDriverState *bs);
void bdrv_ref(BlockDriverState *bs);
void bdrv_unref(BlockDriverState *bs);
void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child);
+BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs,
+ BlockDriverState *child_bs,
+ const char *child_name,
+ const BdrvChildRole *child_role);
bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp);
void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason);
@@ -542,4 +546,8 @@ void bdrv_drained_begin(BlockDriverState *bs);
*/
void bdrv_drained_end(BlockDriverState *bs);
+void bdrv_add_child(BlockDriverState *parent, BlockDriverState *child,
+ Error **errp);
+void bdrv_del_child(BlockDriverState *parent, BdrvChild *child, Error **errp);
+
#endif
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 2709488ff1..a029c2003f 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -314,6 +314,11 @@ struct BlockDriver {
*/
void (*bdrv_drain)(BlockDriverState *bs);
+ void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *child,
+ Error **errp);
+ void (*bdrv_del_child)(BlockDriverState *parent, BdrvChild *child,
+ Error **errp);
+
QLIST_ENTRY(BlockDriver) list;
};