Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-08 Thread Wen Congyang
On 09/08/2015 11:52 PM, Eric Blake wrote: > On 09/08/2015 03:10 AM, Wen Congyang wrote: > >>> Design-wise, I think we really want to have the add-child operation be >>> handed a pre-opened BDS, rather than the options dictionary to open the >>> BDS itself. That is, we should use the existing bloc

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-08 Thread Eric Blake
On 09/08/2015 03:10 AM, Wen Congyang wrote: >> Design-wise, I think we really want to have the add-child operation be >> handed a pre-opened BDS, rather than the options dictionary to open the >> BDS itself. That is, we should use the existing blockdev-add (and >> enhance it to support everything

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-08 Thread Wen Congyang
On 09/01/2015 11:30 PM, Eric Blake wrote: > On 08/31/2015 06:44 PM, 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,

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-01 Thread Eric Blake
On 08/31/2015 06:44 PM, 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 |

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> 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 >> Reviewed-by: Alberto

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> 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 >> Reviewed-by: Alberto

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > 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 > Reviewed-by: Alberto Garcia > --- > block.c | 43 ++

[Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-11 Thread Wen Congyang
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 Reviewed-by: Alberto Garcia --- block.c | 43 +++ include/block/block