Re: [Qemu-block] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) > { > BDRVBlkverifyState *s = bs->opaque; > > -bdrv_unref(s->test_file); > +bdrv_unref_child(bs, s->test_file); > s->test_file = NULL; > } You are

Re: [Qemu-block] [PATCH 02/16] vmdk: Use BdrvChild instead of BDS for references to extents

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:06 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/vmdk.c | 99 > +++- > 1 file changed, 51 insertions(+), 48 deletions(-) Reviewed-by: Alberto Garcia

Re: [Qemu-block] [PATCH 04/16] quorum: Convert to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:08 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/quorum.c | 63 > ++ Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH 05/16] block: Convert bs->file to BdrvChild

2015-09-23 Thread Kevin Wolf
Am 22.09.2015 um 20:36 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > This patch removes the temporary duplication between bs->file and > > bs->file_child by converting everything to BdrvChild. > > > > Signed-off-by: Kevin Wolf > > --- > > block.c

Re: [Qemu-block] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Wed 23 Sep 2015 03:58:23 PM CEST, Kevin Wolf wrote: >> > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) >> > { >> > BDRVBlkverifyState *s = bs->opaque; >> > >> > -bdrv_unref(s->test_file); >> > +bdrv_unref_child(bs, s->test_file); >> > s->test_file =

Re: [Qemu-block] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/blkverify.c | 41 + > 1 file changed, 21 insertions(+), 20 deletions(-) > Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH 01/16] block: Introduce BDS.file_child

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:05 PM CEST, Kevin Wolf wrote: > Store the BdrvChild for bs->file. At this point, bs->file_child->bs just > duplicates the bs->file pointer. Later, it will completely replace it. > > Signed-off-by: Kevin Wolf > --- Reviewed-by: Alberto Garcia

Re: [Qemu-block] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Kevin Wolf
Am 23.09.2015 um 15:01 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > > > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) > > { > > BDRVBlkverifyState *s = bs->opaque; > > > > -bdrv_unref(s->test_file); > > +

Re: [Qemu-block] [PATCH 10/16] block/io: Make bdrv_requests_pending() public

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/io.c| 2 +- > include/block/block_int.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz In addition: Shouldn't we iterate over

Re: [Qemu-block] [PATCH 14/16] blockjob: Store device name at job creation

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Some block jobs change the block device graph on completion. This means > that the device that owns the job and originally was addressed with its > device name may no longer be what the corresponding BlockBackend points > to. > > Previously, the effects of

Re: [Qemu-block] [PATCH 16/16] block: Remove bdrv_swap()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > bdrv_swap() is unused now. Remove it and all functions that have > no other users than bdrv_swap(). In particular, this removes the > .bdrv_rebind callbacks from block drivers. > > Signed-off-by: Kevin Wolf > --- > block.c

Re: [Qemu-block] [PATCH 11/16] block-backend: Add blk_set_bs()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > It allows changing the BlockDriverState that a BlockBackend points to. > > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 16 > include/block/block_int.h | 2 ++ > 2 files changed, 18 insertions(+) > >

Re: [Qemu-block] [PATCH 09/16] block: Split bdrv_move_feature_fields()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > After bdrv_swap(), some fields must be moved back to their original BDS > to compensate for the effects that a swap of the contents of the objects > has while keeping the old addresses. Other fields must be moved back > because they should logically be

Re: [Qemu-block] [PATCH 12/16] block: Introduce parents list

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block.c | 3 +++ > include/block/block_int.h | 2 ++ > 2 files changed, 5 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Remember all parent nodes and just change the pointers there instead of > swapping the contents of the BlockDriverState. > > Handling of snapshot=on must be moved further down in bdrv_open() > because *pbs (which is the bs pointer in the BlockBackend) must

Re: [Qemu-block] [PATCH 15/16] block: Add and use bdrv_replace_in_backing_chain()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > This cleans up the mess we left behind in the mirror code after the > previous patch. Instead of using bdrv_swap(), just change pointers. > > The interface change of the mirror job that callers must consider is > that after job completion, their local BDS

Re: [Qemu-block] [PATCH v5 00/38] blockdev: BlockBackend and media

2015-09-23 Thread Wen Congyang
On 09/22/2015 11:09 PM, Max Reitz wrote: > On 22.09.2015 16:45, Kevin Wolf wrote: >> Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: >>> This series reworks a lot regarding BlockBackend and media. Basically, >>> it allows empty BlockBackends, that is BBs without a BDS tree. >>> >>> Before this

Re: [Qemu-block] [PATCH v6 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-23 Thread Alberto Garcia
On Tue 22 Sep 2015 06:38:27 PM CEST, Max Reitz wrote: >> +.name = "blockdev-snapshot", >> +.args_type = "node:s,overlay:s", >> +.mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot, > > As of 7fad30f06eb6aa57aaa8f3d264288f24ae7646f0, this needs to be >