Re: [Qemu-block] [PATCH] block/nfs: fix calculation of allocated file size

2015-08-26 Thread Jeff Cody
On Thu, Aug 20, 2015 at 12:46:47PM +0200, Peter Lieven wrote: st.st_blocks is always counted in 512 byte units. Do not use st.st_blksize as multiplicator which may be larger. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven p...@kamp.de --- block/nfs.c | 2 +- 1 file changed, 1

Re: [Qemu-block] [PATCH] block: Override the driver in the filename with the user-specified one

2015-08-26 Thread Alberto Garcia
On Wed 26 Aug 2015 04:53:06 PM CEST, Max Reitz wrote: Yet another thing is the problem described in the patch's commit message. Why and how is the driver option inherited by the snapshot? I think you're right and my description was wrong, this happens before the snapshot is created, when

Re: [Qemu-block] [PATCHv2] block/nfs: cache allocated filesize for read-only files

2015-08-26 Thread Peter Lieven
Am 26.08.2015 um 17:31 schrieb Jeff Cody: On Mon, Aug 24, 2015 at 10:13:16PM +0200, Max Reitz wrote: On 24.08.2015 21:34, Peter Lieven wrote: Am 24.08.2015 um 20:39 schrieb Max Reitz: On 24.08.2015 10:06, Peter Lieven wrote: If the file is readonly its not expected to grow so save the

Re: [Qemu-block] [PATCHv2] block/nfs: cache allocated filesize for read-only files

2015-08-26 Thread Jeff Cody
On Wed, Aug 26, 2015 at 08:49:06PM +0200, Peter Lieven wrote: Am 26.08.2015 um 17:31 schrieb Jeff Cody: On Mon, Aug 24, 2015 at 10:13:16PM +0200, Max Reitz wrote: On 24.08.2015 21:34, Peter Lieven wrote: Am 24.08.2015 um 20:39 schrieb Max Reitz: On 24.08.2015 10:06, Peter Lieven wrote:

[Qemu-block] [PATCH 4/5] block: Drop drv parameter from bdrv_fill_options()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and change the function accordingly. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 59 ++- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/block.c

[Qemu-block] [PATCH 5/5] block: Drop bdrv_find_whitelisted_format()

2015-08-26 Thread Max Reitz
It is unused by now, so we can drop it. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 7 --- include/block/block.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/block.c b/block.c index 434f43c..461eb94 100644 --- a/block.c +++ b/block.c @@ -313,13 +313,6 @@

[Qemu-block] [PATCH 1/5] block: Always pass NULL as drv for bdrv_open()

2015-08-26 Thread Max Reitz
Change all callers of bdrv_open() to pass the driver name in the options QDict instead of passing its BlockDriver pointer. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 24 ++-- block/qcow2.c | 16 - block/vvfat.c | 8 +-- blockdev.c| 72

[Qemu-block] [PATCH 3/5] block: Drop drv parameter from bdrv_open_inherit()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and just pass NULL to bdrv_fill_options(). Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index ac89487..8aa5f25 100644

[Qemu-block] [PATCH 2/5] block: Drop drv parameter from bdrv_open()

2015-08-26 Thread Max Reitz
Now that this parameter is effectively unused, we can drop it and just pass NULL on to bdrv_open_inherit(). Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 9 - block/block-backend.c | 2 +- block/parallels.c | 2 +- block/qcow.c | 2 +- block/qcow2.c

[Qemu-block] [PATCH 0/5] block: Drop drv parameter from bdrv_open()

2015-08-26 Thread Max Reitz
We don't really need that parameter, so let's drop it. Doing so may even fix some bugs, see http://lists.nongnu.org/archive/html/qemu-block/2015-08/msg00171.html. In the course of writing this series, I had to decide whether the make sure all callers of bdrv_find_whitelisted_format() would still

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

2015-08-26 Thread John Snow
Add a simple read test for ATAPI devices, using the PIO mechanism. Signed-off-by: John Snow js...@redhat.com --- tests/ide-test.c | 144 +++ 1 file changed, 144 insertions(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index

Re: [Qemu-block] [Qemu-devel] [PATCH v3] opts: produce valid command line in qemu_opts_print

2015-08-26 Thread Kővágó Zoltán
2015-08-26 15:15 keltezéssel, Markus Armbruster írta: Stefan Hajnoczi stefa...@gmail.com writes: On Tue, Jul 7, 2015 at 3:42 PM, Kővágó, Zoltán dirty.ice...@gmail.com wrote: This will let us print options in a format that the user would actually write it on the command line

Re: [Qemu-block] Creating snapshots with specific runtime options

2015-08-26 Thread Stefan Hajnoczi
On Tue, Aug 25, 2015 at 04:57:53PM +0300, Alberto Garcia wrote: As far as I can see there's no way to create a snapshot and either a) inherit the runtime options from the original image b) specify a new set of options This comment in external_snapshot_prepare() before calling

Re: [Qemu-block] [PATCH] block: Override the driver in the filename with the user-specified one

2015-08-26 Thread Max Reitz
On 25.08.2015 09:03, Alberto Garcia wrote: On Mon 24 Aug 2015 08:54:56 PM CEST, Max Reitz wrote: [bdrv_fill_options()] User-specified options should always have precedence over any other option. The thing is, we consider the filename to be specified by the user. For user-specified

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

2015-08-26 Thread John Snow
We don't have any CDROM tests yet. So, add some for the PCI/BMDMA HBA. For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch ide-atapi-test

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

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

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

2015-08-26 Thread John Snow
Now, test the DMA functionality of the ATAPI drive. Signed-off-by: John Snow js...@redhat.com --- 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 1/4] qtest/ahci: use generate_pattern everywhere

2015-08-26 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 js...@redhat.com --- tests/ahci-test.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/ahci-test.c

Re: [Qemu-block] [PATCHv2] block/nfs: cache allocated filesize for read-only files

2015-08-26 Thread Jeff Cody
On Mon, Aug 24, 2015 at 10:13:16PM +0200, Max Reitz wrote: On 24.08.2015 21:34, Peter Lieven wrote: Am 24.08.2015 um 20:39 schrieb Max Reitz: On 24.08.2015 10:06, Peter Lieven wrote: If the file is readonly its not expected to grow so save the blocking call to nfs_fstat_async and use

Re: [Qemu-block] [PATCH] block/nfs: fix calculation of allocated file size

2015-08-26 Thread Jeff Cody
On Thu, Aug 20, 2015 at 12:46:47PM +0200, Peter Lieven wrote: st.st_blocks is always counted in 512 byte units. Do not use st.st_blksize as multiplicator which may be larger. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven p...@kamp.de --- block/nfs.c | 2 +- 1 file changed, 1