On 08/10/2015 04:19 PM, Alberto Garcia wrote:
> On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote:
>
>> +static const char *bdrv_get_id_or_node_name(BlockDriverState *bs)
>> +{
>> +if (bs->blk) {
>> +return blk_name(bs->blk);
>> +}
>> +
>> +return bs->node_name ? bs->node
On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote:
> +static const char *bdrv_get_id_or_node_name(BlockDriverState *bs)
> +{
> +if (bs->blk) {
> +return blk_name(bs->blk);
> +}
> +
> +return bs->node_name ? bs->node_name : "";
> +}
You don't need to add this function, yo
On Fri 07 Aug 2015 03:03:07 AM CEST, Wen Congyang wrote:
>>> +void bdrv_add_child(BlockDriverState *bs, QDict *options, Error **errp)
>>> +{
>>> +
>>> +if (!bs->drv || !bs->drv->bdrv_add_child) {
>>> +error_setg(errp, "The BDS %s doesn't support adding a child",
>>> +
On 08/06/2015 10:33 PM, Alberto Garcia wrote:
> On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote:
>
>> +/*
>> + * Hot add/remove a BDS's child. So the user can take a child offline when
>> + * it is broken and take a new child online
>> + */
>> +void bdrv_add_child(BlockDriverState *bs, QDi
On Fri 31 Jul 2015 11:19:12 AM CEST, Wen Congyang wrote:
> +/*
> + * Hot add/remove a BDS's child. So the user can take a child offline when
> + * it is broken and take a new child online
> + */
> +void bdrv_add_child(BlockDriverState *bs, QDict *options, Error **errp)
> +{
> +
> +if (!bs->drv
In some cases, we want to take a quorum child offline, and take
another child online.
Signed-off-by: Wen Congyang
Signed-off-by: zhanghailiang
Signed-off-by: Gonglei
---
block.c | 52 +++
include/block/block.h | 4
include