Re: [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 04:49:12PM +0800, Wen Congyang wrote: > +void bdrv_connect(BlockDriverState *bs, Error **errp) > +{ > +BlockDriver *drv = bs->drv; > + > +if (drv && drv->bdrv_connect) { > +drv->bdrv_connect(bs, errp); > +} else if (bs->file) { > +bdrv_connect(bs-

[Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-06-18 Thread Wen Congyang
In some cases, we want to connect/disconnect the remote target when we need, not in bdrv_open()/bdrv_close(). Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 24 include/block/block.h | 3 +++ include