Re: [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-09-10 Thread Fam Zheng
On Thu, 09/10 11:48, Radoslav Gerganov wrote: > On 10.09.2015 11:15, Fam Zheng wrote: > > On Thu, 09/10 10:53, Radoslav Gerganov wrote: > >> When the VMDK is streamOptimized (or compressed), the > >> next_cluster_sector must not be incremented by a fixed number of > >> sectors. Instead of this, it

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

2015-09-10 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino --- hmp-commands.hx | 28 hmp.c | 20

[Qemu-block] [PATCH v3 2/5] Add new block driver interface to add/delete a BDS's child

2015-09-10 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 --- block.c | 52

[Qemu-block] [PATCH v3 0/5] qapi: child add/delete support

2015-09-10 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. ChangLog: v3: 1. Don't open BDS in bdrv_add_child(). Use the existing BDS which is created by the QMP command

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child

2015-09-10 Thread Wen Congyang
On 09/10/2015 06:04 PM, Daniel P. Berrange wrote: > On Thu, Sep 10, 2015 at 05:55:04PM +0800, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >>

Re: [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-09-10 Thread Fam Zheng
On Thu, 09/10 10:53, Radoslav Gerganov wrote: > When the VMDK is streamOptimized (or compressed), the > next_cluster_sector must not be incremented by a fixed number of > sectors. Instead of this, it must be rounded up to the next consecutive > sector. Fixing this results in much smaller

[Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-09-10 Thread Radoslav Gerganov
When the VMDK is streamOptimized (or compressed), the next_cluster_sector must not be incremented by a fixed number of sectors. Instead of this, it must be rounded up to the next consecutive sector. Fixing this results in much smaller compressed images. Signed-off-by: Radoslav Gerganov

[Qemu-block] [PATCH v3 3/5] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-09-10 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 v3 4/5] qmp: add monitor command to add/remove a child

2015-09-10 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- blockdev.c | 47 ++ qapi/block-core.json | 34

Re: [Qemu-block] [Qemu-devel] [PATCH 0/4] ide: simple ATAPI tests

2015-09-10 Thread Markus Armbruster
John Snow writes: > On 09/09/2015 01:00 PM, Paolo Bonzini wrote: >> >> >> On 09/09/2015 18:37, John Snow wrote: >>> Ping -- apologies. :) >>> >>> I'll take a simple ACK before I merge it into my tree. >> >> I don't think you need one. :) >> >> Paolo >> > > I guess

Re: [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-09-10 Thread Radoslav Gerganov
On 10.09.2015 11:15, Fam Zheng wrote: > On Thu, 09/10 10:53, Radoslav Gerganov wrote: >> When the VMDK is streamOptimized (or compressed), the >> next_cluster_sector must not be incremented by a fixed number of >> sectors. Instead of this, it must be rounded up to the next consecutive >> sector.

[Qemu-block] [PATCH v3 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-09-10 Thread Alberto Garcia
We will introduce the 'blockdev-snapshot' command that will require its own struct for the parameters, so we need to rename this one in order to avoid name clashes. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake --- blockdev.c | 2 +-

Re: [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-09-10 Thread Kevin Wolf
Am 10.09.2015 um 10:58 hat Fam Zheng geschrieben: > On Thu, 09/10 11:48, Radoslav Gerganov wrote: > > On 10.09.2015 11:15, Fam Zheng wrote: > > > On Thu, 09/10 10:53, Radoslav Gerganov wrote: > > >> When the VMDK is streamOptimized (or compressed), the > > >> next_cluster_sector must not be

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

2015-09-10 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 97 +++--- tests/qemu-iotests/085.out | 34 +++- 2 files changed, 123 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085

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

2015-09-10 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 v3 2/4] block: Add 'ignore-backing' field to BlockdevOptionsGenericCOWFormat

2015-09-10 Thread Alberto Garcia
If set to true, the image will be opened with the BDRV_O_NO_BACKING flag. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to have a backing image before the operation. Signed-off-by: Alberto Garcia --- block.c

Re: [Qemu-block] [Qemu-devel] [PATCH 2/4] qtest/ahci: export generate_pattern

2015-09-10 Thread John Snow
On 09/10/2015 05:18 AM, Markus Armbruster wrote: > John Snow writes: > >> Share the pattern function for ide and ahci test. >> >> Signed-off-by: John Snow >> --- >> tests/ahci-test.c | 26 -- >> tests/libqos/libqos.c | 26

[Qemu-block] [PATCH v2 3/4] ide-test: add cdrom pio test

2015-09-10 Thread John Snow
Add a simple read test for ATAPI devices, using the PIO mechanism. Signed-off-by: John Snow --- tests/ide-test.c | 157 +++ 1 file changed, 157 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index

[Qemu-block] [PATCH v2 1/4] qtest/ahci: use generate_pattern everywhere

2015-09-10 Thread John Snow
Fix the pattern generation to actually be interesting, and make sure all buffers in the ahci-test actually use it. Signed-off-by: John Snow --- tests/ahci-test.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/ahci-test.c

[Qemu-block] [PATCH v2 4/4] ide-test: add cdrom dma test

2015-09-10 Thread John Snow
Now, test the DMA functionality of the ATAPI drive. Signed-off-by: John Snow --- tests/ide-test.c | 90 1 file changed, 72 insertions(+), 18 deletions(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index

[Qemu-block] [PATCH v2 0/1] atapi: abort transfers with 0 byte limits

2015-09-10 Thread John Snow
v2: Make sure we only abort PIO commands if BCL is zero, not DMA. For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch atapi-bclimit

[Qemu-block] [PATCH v2 1/1] atapi: abort transfers with 0 byte limits

2015-09-10 Thread John Snow
We're supposed to abort on transfers like this, unless we fill Word 125 of our IDENTIFY data with a default transfer size, which we don't currently do. This is an ATA error, not a SCSI/ATAPI one. See ATA8-ACS3 sections 7.17.6.49 or 7.21.5. If we don't do this, QEMU will loop forever trying to

Re: [Qemu-block] [PATCH v2 1/4] qtest/ahci: use generate_pattern everywhere

2015-09-10 Thread Eric Blake
On 09/10/2015 05:09 PM, John Snow wrote: > Fix the pattern generation to actually be interesting, > and make sure all buffers in the ahci-test actually use it. > > Signed-off-by: John Snow > --- > tests/ahci-test.c | 23 ++- > 1 file changed, 6

Re: [Qemu-block] [Qemu-devel] [PATCH] atapi: abort transfers with 0 byte limits

2015-09-10 Thread John Snow
On 09/03/2015 07:32 PM, John Snow wrote: > We're supposed to abort on transfers like this, unless we fill > Word 125 of our IDENTIFY data with a default transfer size, which > we don't currently do. > > This is an ATA error, not a SCSI/ATAPI one. > See ATA8-ACS3 sections 7.17.6.49 or 7.21.5. >

[Qemu-block] [PATCH v2 0/4] ide: simple ATAPI tests

2015-09-10 Thread John Snow
We don't have any CDROM tests yet. So, add some for the PCI/BMDMA HBA. === v2: === - Some readability feedback from Markus - Added an IRQ poll for the DRQ read loop For convenience, this branch is available at:

[Qemu-block] [PATCH v2 2/4] qtest/ahci: export generate_pattern

2015-09-10 Thread John Snow
Share the pattern function for ide and ahci test. Signed-off-by: John Snow --- tests/ahci-test.c | 26 -- tests/libqos/libqos.c | 26 ++ tests/libqos/libqos.h | 1 + 3 files changed, 27 insertions(+), 26 deletions(-) diff

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] atapi: abort transfers with 0 byte limits

2015-09-10 Thread Fam Zheng
On Thu, 09/10 19:20, John Snow wrote: > > +/* Nondata commands permit the byte_count_limit to be 0. > + * If this is a data-transferring PIO command and BCL is 0, > + * we abort at the /ATA/ level, not the ATAPI level. > + * See ATA8 ACS3 section 7.17.6.49 and 7.21.5 */ > +if

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-10 Thread Max Reitz
On 10.09.2015 03:12, Wen Congyang wrote: > On 09/09/2015 08:59 PM, Max Reitz wrote: >> On 09.09.2015 12:01, Wen Congyang wrote: >>> On 09/09/2015 05:20 AM, Max Reitz wrote: On 08.09.2015 11:13, Wen Congyang wrote: > On 07/21/2015 01:45 AM, Max Reitz wrote: >> And a helper function for

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-10 Thread Max Reitz
On 10.09.2015 05:22, Wen Congyang wrote: > On 09/09/2015 08:59 PM, Max Reitz wrote: >> On 09.09.2015 12:01, Wen Congyang wrote: >>> On 09/09/2015 05:20 AM, Max Reitz wrote: On 08.09.2015 11:13, Wen Congyang wrote: > On 07/21/2015 01:45 AM, Max Reitz wrote: >> And a helper function for

Re: [Qemu-block] [Qemu-devel] [PATCH 3/4] ide-test: add cdrom pio test

2015-09-10 Thread John Snow
On 09/10/2015 05:42 AM, Markus Armbruster wrote: > John Snow writes: > >> Add a simple read test for ATAPI devices, >> using the PIO mechanism. >> >> Signed-off-by: John Snow >> --- >> tests/ide-test.c | 144 >>