Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] ahci: clean up signature generation

2015-09-17 Thread John Snow
On 09/17/2015 04:40 AM, Stefan Hajnoczi wrote: > On Tue, Sep 01, 2015 at 04:50:37PM -0400, John Snow wrote: >> Ultimately, clean up the signature generation and as a result, tidy up >> the port_reset and init_d2h functions. >> >> ___

[Qemu-block] [PATCH] throttle: test that snapshots move the throttling configuration

2015-09-17 Thread Alberto Garcia
If a snapshot is performed on a device that has I/O limits they should be moved to the target image (the new active layer). Signed-off-by: Alberto Garcia --- tests/qemu-iotests/096 | 69 ++ tests/qemu-iotests/096.out | 5 tests/qemu-iotests/g

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

2015-09-17 Thread Kevin Wolf
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 pointers still point to the same node now. qemu-im

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

2015-09-17 Thread Kevin Wolf
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 | 155 +- block/qed.c

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

2015-09-17 Thread Kevin Wolf
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 already be set before bdrv_append() is called. Ot

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

2015-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c | 3 +++ include/block/block_int.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block.c b/block.c index 7930f3c..c196f83 100644 --- a/block.c +++ b/block.c @@ -1090,6 +1090,7 @@ static BdrvChild *bdrv_attach_child(BlockDriverState

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

2015-09-17 Thread Kevin Wolf
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 | 61 ++ block/blkdebug.c | 32 block/blkv

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

2015-09-17 Thread Kevin Wolf
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(+) diff --git a/block/block-backend.c b/block/block-backend.c index c2e8732..a2

[Qemu-block] [PATCH 07/16] block: Convert bs->backing_hd to BdrvChild

2015-09-17 Thread Kevin Wolf
This is the final step in converting all of the BlockDriverState pointers that block drivers use to BdrvChild. After this patch, bs->children contains the full list of child nodes that are referenced by a given BDS, and these children are only referenced through BdrvChild, so that updating the poi

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

2015-09-17 Thread Kevin Wolf
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 moved and must stay on top When replacing bdrv_swap

[Qemu-block] [PATCH 06/16] block: Remove bdrv_open_image()

2015-09-17 Thread Kevin Wolf
It is unused now. Signed-off-by: Kevin Wolf --- block.c | 34 -- include/block/block.h | 4 2 files changed, 38 deletions(-) diff --git a/block.c b/block.c index 93d713b..3992241 100644 --- a/block.c +++ b/block.c @@ -1279,40 +1279,6 @@ done:

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

2015-09-17 Thread Kevin Wolf
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 bdrv_swap() ensured that the job was (at least part

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

2015-09-17 Thread Kevin Wolf
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 --- block.c | 12 +--- include/block/block_int.h | 1 + 2 files changed, 10 insertions(+), 3 deleti

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

2015-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/quorum.c | 63 ++ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 8fe53b4..8e6e2dc 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -64,7 +64,7 @@ t

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

2015-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c| 2 +- include/block/block_int.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index d7e742a..81371e6 100644 --- a/block/io.c +++ b/block/io.c @@ -213,7 +213,7 @@ void bdrv_disable_copy_on_read

[Qemu-block] [PATCH 08/16] block: Manage backing file references in bdrv_set_backing_hd()

2015-09-17 Thread Kevin Wolf
This simplifies the code somewhat, especially when dropping whole backing file subchains. The exception is the mirroring code that does adventurous things with bdrv_swap() and in order to keep it working, I had to duplicate most of bdrv_set_backing_hd() locally. We'll get rid again of this uglines

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

2015-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/blkverify.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index d277e63..6b71622 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -14,7 +14,7 @@ #i

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

2015-09-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vmdk.c | 99 +++- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index be0d640..9702132 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -87,7 +87,7 @@ typedef s

[Qemu-block] [PATCH 00/16] block: Get rid of bdrv_swap()

2015-09-17 Thread Kevin Wolf
bdrv_swap() has always been an ugly hack that we would rather have avoided. When it was introduced, we simply didn't have the infrastructure to update pointers instead of transplanting the contents of BDS object, so we grudgingly added bdrv_swap() as a quick solution. Meanwhile, most of the infras

Re: [Qemu-block] [PATCH] vmdk: Create streamOptimized as version 3

2015-09-17 Thread Kevin Wolf
Am 17.09.2015 um 07:04 hat Fam Zheng geschrieben: > VMware products accept only version 3 for streamOptimized, let's bump > the version. > > Reported-by: Radoslav Gerganov > Signed-off-by: Fam Zheng Radoslav, can I have your Reviewed-by and/or Tested-by for this patch? Kevin > block/vmdk.c |

Re: [Qemu-block] [PATCH 0/4] ahci: clean up signature generation

2015-09-17 Thread Stefan Hajnoczi
On Tue, Sep 01, 2015 at 04:50:37PM -0400, John Snow wrote: > Ultimately, clean up the signature generation and as a result, tidy up > the port_reset and init_d2h functions. > > > > For convenience, this branch is ava

Re: [Qemu-block] [PATCH 2/4] ahci: fix signature generation

2015-09-17 Thread Stefan Hajnoczi
On Tue, Sep 01, 2015 at 04:50:39PM -0400, John Snow wrote: > The initial register device-to-host FIS no longer needs to specially > set certain fields, as these can be handled generically by setting those > fields explicitly with the signatures we want at port reset time. > > (1) Signatures are de