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

2015-09-22 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/vmdk.c | 99 > +++- > 1 file changed, 51 insertions(+), 48 deletions(-) Reviewed-by: Max Reitz signature.asc

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

2015-09-22 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > It is unused now. > > Signed-off-by: Kevin Wolf > --- > block.c | 34 -- > include/block/block.h | 4 > 2 files changed, 38 deletions(-) Reviewed-by: Max Reitz

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

2015-09-22 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > 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 >

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

2015-09-22 Thread Max Reitz
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 | 61

Re: [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-09-22 Thread Peter Lieven
Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi: On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: upcoming libnfs versions will support logging debug messages. Add support for it in qemu through an URL parameter. Signed-off-by: Peter Lieven --- block/nfs.c | 4

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

2015-09-22 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/blkverify.c | 41 + > 1 file changed, 21 insertions(+), 20 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP

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

2015-09-22 Thread Max Reitz
On 22.09.2015 19:14, Max Reitz wrote: > On 17.09.2015 15:48, 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 >> --- >> block.c

Re: [Qemu-block] [Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 15:22 hat Markus Armbruster geschrieben: > From: Eric Blake > > Commits 7216ae3d and d2828429 disabled some error message hints, > all because a change to use modern error reporting meant that the > hint would be output prior to the actual error. Fix this by

Re: [Qemu-block] [Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP

2015-09-22 Thread Eric Blake
On 09/22/2015 09:23 AM, Kevin Wolf wrote: > Am 18.09.2015 um 15:22 hat Markus Armbruster geschrieben: >> From: Eric Blake >> >> Commits 7216ae3d and d2828429 disabled some error message hints, >> all because a change to use modern error reporting meant that the >> hint would be

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

2015-09-22 Thread Max Reitz
On 17.09.2015 15:48, 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 > --- > block.c | 12 +--- >

Re: [Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Hannes Reinecke
On 09/22/2015 10:16 PM, Eduardo Habkost wrote: > Guest visible data shouldn't change with a simple QEMU upgrade, so use > qemu_hw_version() to ensure it won't change (as long as the machine > class being used has hw_version set). > > Cc: Hannes Reinecke > Cc: Paolo Bonzini

Re: [Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Laszlo Ersek
On 09/22/15 22:16, Eduardo Habkost wrote: > Guest visible data shouldn't change with a simple QEMU upgrade, so use > qemu_hw_version() to ensure it won't change (as long as the machine > class being used has hw_version set). > > Cc: Hannes Reinecke > Cc: Paolo Bonzini

Re: [Qemu-block] [PATCH v5 0/4] qapi: child add/delete support

2015-09-22 Thread Wen Congyang
On 09/22/2015 07:15 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> If quorum's child is broken, we can use mirror job to replace it. >> But sometimes, the user only need to remove the broken child, and >> add it later when the problem is fixed. >> > > Hi, >

[Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Eduardo Habkost
Guest visible data shouldn't change with a simple QEMU upgrade, so use qemu_hw_version() to ensure it won't change (as long as the machine class being used has hw_version set). Cc: Hannes Reinecke Cc: Paolo Bonzini Cc: qemu-block@nongnu.org Signed-off-by:

Re: [Qemu-block] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Eduardo Habkost
On Tue, Sep 22, 2015 at 10:33:32PM +0200, Laszlo Ersek wrote: > On 09/22/15 22:16, Eduardo Habkost wrote: > > Guest visible data shouldn't change with a simple QEMU upgrade, so use > > qemu_hw_version() to ensure it won't change (as long as the machine > > class being used has hw_version set). > >

Re: [Qemu-block] [Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP

2015-09-22 Thread John Snow
On 09/22/2015 01:02 PM, Eric Blake wrote: > On 09/22/2015 09:23 AM, Kevin Wolf wrote: >> Am 18.09.2015 um 15:22 hat Markus Armbruster geschrieben: >>> From: Eric Blake >>> >>> Commits 7216ae3d and d2828429 disabled some error message hints, >>> all because a change to use

[Qemu-block] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-22 Thread Eric Blake
Commit 50b7b000 improved HMP error messages, but forgot to update qemu-iotests to match. Reported-by: Kevin Wolf Signed-off-by: Eric Blake --- I'm not sure if this should go through Markus' "error" tree, since that's where the break was introduced, or

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-22 Thread John Snow
On 09/22/2015 07:15 PM, Eric Blake wrote: > Commit 50b7b000 improved HMP error messages, but forgot to update > qemu-iotests to match. > > Reported-by: Kevin Wolf > Signed-off-by: Eric Blake > --- > > I'm not sure if this should go through Markus' "error"

Re: [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-09-22 Thread Eric Blake
On 06/25/2015 07:18 AM, Stefan Hajnoczi wrote: > On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: >> upcoming libnfs versions will support logging debug messages. Add >> support for it in qemu through an URL parameter. >> >> Signed-off-by: Peter Lieven >> --- >>

[Qemu-block] [PATCH v5 3/4] qmp: add monitor command to add/remove a child

2015-09-22 Thread Wen Congyang
The new QMP command name is x-blockdev-child-add, and x-blockdev-child-del. It justs for adding/removing quorum's child now, and don't support all kinds of children, nor all block drivers. So it is experimental now. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang

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

2015-09-22 Thread Alberto Garcia
On Fri 18 Sep 2015 04:49:06 PM CEST, Eric Blake wrote: >> +# @BlockdevSnapshot >> +# >> +# @device: device or node name to generate the snapshot from. > > I'm still wondering if 'node' is a better name than 'device' here. I don't have a strong preference. Kevin, Max, ... any

[Qemu-block] [PATCH v5 1/4] Add new block driver interface to add/delete a BDS's child

2015-09-22 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: Eric Blake ---

[Qemu-block] [PATCH v5 0/4] qapi: child add/delete support

2015-09-22 Thread Wen Congyang
If quorum's child is broken, we can use mirror job to replace it. But sometimes, the user only need to remove the broken child, and add it later when the problem is fixed. It is based on the following patch: http://lists.nongnu.org/archive/html/qemu-devel/2015-09/msg04579.html ChangLog: v5: 1.

[Qemu-block] [PATCH v5 2/4] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-09-22 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 6 ++--- block/quorum.c| 72 +--

[Qemu-block] [PATCH v5 4/4] hmp: add monitor command to add/remove a child

2015-09-22 Thread Wen Congyang
The new command is blockdev_child_add and blockdev_child_del. It does the same thing as the QMP command x-blockdev-child-add and x-blockdev-child-del. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei

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

2015-09-22 Thread Kevin Wolf
Am 22.09.2015 um 11:21 hat Alberto Garcia geschrieben: > On Fri 18 Sep 2015 04:49:06 PM CEST, Eric Blake wrote: > > >> +# @BlockdevSnapshot > >> +# > >> +# @device: device or node name to generate the snapshot from. > > > > I'm still wondering if 'node' is a better name than

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

2015-09-22 Thread Alberto Garcia
One of the limitations of the 'blockdev-snapshot-sync' command is that it does not allow passing BlockdevOptions to the newly created snapshots, so they are always opened using the default values. Extending the command to allow passing options is not a practical solution because there is overlap

[Qemu-block] [PATCH v6 2/4] block: support passing 'backing': '' to 'blockdev-add'

2015-09-22 Thread Alberto Garcia
Passing an empty string allows opening an image but not its backing file. This was already described in the API documentation, only the implementation was missing. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to have a backing image

[Qemu-block] [PATCH v6 4/4] block: add tests for the 'blockdev-snapshot' command

2015-09-22 Thread Alberto Garcia
Signed-off-by: Alberto Garcia Cc: Max Reitz --- tests/qemu-iotests/085 | 102 ++--- tests/qemu-iotests/085.out | 34 ++- 2 files changed, 128 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-block] [PATCH v5 0/4] qapi: child add/delete support

2015-09-22 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > If quorum's child is broken, we can use mirror job to replace it. > But sometimes, the user only need to remove the broken child, and > add it later when the problem is fixed. > Hi, Two questions: 1) Do you have an example of a pair of

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

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 13:03 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:04 PM CEST, Kevin Wolf wrote: > > > 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

Re: [Qemu-block] [PATCH v5 19/38] block: Fail requests to empty BlockBackend

2015-09-22 Thread Max Reitz
On 22.09.2015 16:30, Kevin Wolf wrote: > Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: >> If there is no BlockDriverState in a BlockBackend or if the tray of the >> guest device is open, fail all requests (where that is possible) with >> -ENOMEDIUM. >> >> The reason the status of the guest

Re: [Qemu-block] [PATCH v5 21/38] block: Add blk_insert_bs()

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: > This function associates the given BlockDriverState with the given > BlockBackend. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Alberto Garcia > --- >

Re: [Qemu-block] [PATCH v5 17/38] block: Add BlockBackendRootState

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: > This structure will store some of the state of the root BDS if the BDS > tree is removed, so that state can be restored once a new BDS tree is > inserted. This is magic that is bound to bite us sooner or later. I see that we have to do this in

Re: [Qemu-block] [PATCH v5 19/38] block: Fail requests to empty BlockBackend

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: > If there is no BlockDriverState in a BlockBackend or if the tray of the > guest device is open, fail all requests (where that is possible) with > -ENOMEDIUM. > > The reason the status of the guest device is taken into account is > because once

Re: [Qemu-block] [PATCH v5 20/38] block: Prepare remaining BB functions for NULL BDS

2015-09-22 Thread Kevin Wolf
Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: > There are several BlockBackend functions which, in theory, cannot fail. > This patch makes them cope with the BlockDriverState pointer being NULL > by making them fall back to some default action like ignoring the value > in setters and returning

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

2015-09-22 Thread Kevin Wolf
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 series, empty drives are represented by a BlockBackend with > an empty BDS attached to it (a

Re: [Qemu-block] [PATCH v5 17/38] block: Add BlockBackendRootState

2015-09-22 Thread Max Reitz
On 22.09.2015 16:17, Kevin Wolf wrote: > Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: >> This structure will store some of the state of the root BDS if the BDS >> tree is removed, so that state can be restored once a new BDS tree is >> inserted. > > This is magic that is bound to bite us

Re: [Qemu-block] [Qemu-devel] No error report when using the qemu-img.exe to convert a disk to vmdk format which is saved on a disk that has no more space

2015-09-22 Thread Kevin Wolf
Am 22.09.2015 um 08:09 hat Guangmu Zhu geschrieben: > I used the qemu-img.exe to convert a disk to vmdk format and the output file > size could be 300 MB. However the left space of the disk the output file > located on was about 200 MB. After a while, the left space had been zero but > the program

Re: [Qemu-block] [PATCH v5 21/38] block: Add blk_insert_bs()

2015-09-22 Thread Max Reitz
On 22.09.2015 16:42, Kevin Wolf wrote: > Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: >> This function associates the given BlockDriverState with the given >> BlockBackend. >> >> Signed-off-by: Max Reitz >> Reviewed-by: Eric Blake >> Reviewed-by: