aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2016-05-10 15:36:37 +0800
committerMax Reitz <mreitz@redhat.com>2016-05-12 15:33:23 +0200
commite06018ad28874703c65dbdcfa4a5cb8aed4550ec (patch)
treedfb39b5774d12176e07e154d26fbad68ec0be5d9 /include
parent263a6f4c3aa9b6cd9f58d1368b318d948156a4e8 (diff)
Add new block driver interface to add/delete a BDS's child
In some cases, we want to take a quorum child offline, and take another child online. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 1462865799-19402-2-git-send-email-xiecl.fnst@cn.fujitsu.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h4
-rw-r--r--include/block/block_int.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 0e8b4d1341..c44d0a065c 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -542,4 +542,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;
};