[Qemu-block] [PATCH] qemu-img: Allow unmap backing image for zeroed clusters

2016-09-26 Thread Fam Zheng
We already specified BDRV_O_UNMAP when opening images in 'qemu-img commit', but didn't turn on the "unmap" in the active commit job. This patch fixes that so that zeroed clusters in top image can be discarded which is desired in the virt-sparsify use case, where a temporary overlay is created and

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Fam Zheng
On Mon, 09/26 16:30, Peter Lieven wrote: > > So it looks like this file is not compliant to the specfication. Is it > > recognized and imported by VMware? > > Yes, VMware ESXi imports it flawlessly. The only possibility is that the "footer" is not in the end of the image. There must be some

Re: [Qemu-block] [Nbd] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Wouter Verhelst
On Mon, Sep 26, 2016 at 03:21:46PM -0500, Eric Blake wrote: > I'd much rather support a single flag that says to zero the entire disk > than to introduce stateful variable-amount shifting. That's almost exactly the opposite of what I said :) Now, I don't feel very strong either way, but what

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-26 Thread Kashyap Chamarthy
On Mon, Sep 26, 2016 at 05:04:21PM +0200, Kevin Wolf wrote: > Am 19.09.2016 um 22:39 hat Eric Blake geschrieben: [...] > > I typically write this as: > > > > L2 <- L1 <- L0 > > > > (read "L2 backs L1, which in turn backs L0") with the active on the > > right. So I understand the confusion in

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:51 AM, Paolo Bonzini wrote: >> +- bit 3, `NBD_CMD_FLAG_SHIFT`; This flag is valid for `NBD_CMD_TRIM` and >> + `NBD_CMD_WRITE_ZEROES`. If this flag is set the server shifts request >> + *length* and *offset* left by N bits, where N is defined by >> `NBD_OPT_SHIFT` >> + option

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Eric Blake
On 09/26/2016 07:46 AM, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread John Snow
On 09/26/2016 05:39 AM, Thomas Huth wrote: On 26.09.2016 10:22, Kevin Wolf wrote: Am 23.09.2016 um 18:42 hat John Snow geschrieben: On 09/23/2016 12:09 PM, Thomas Huth wrote: The folder include/hw/ide/ belongs to the IDE section. Signed-off-by: Thomas Huth ---

Re: [Qemu-block] [Qemu-devel] [PATCH 0/1] ahci: fix ncq aiocb-related segfault

2016-09-26 Thread John Snow
On 09/26/2016 12:10 PM, Stefan Hajnoczi wrote: On Thu, Sep 22, 2016 at 04:10:39PM -0400, John Snow wrote: Fix ncq_cb to prevent a segfault on sys_reset. John Snow (1): ahci: clear aiocb in ncq_cb hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Maybe worth adding as a

Re: [Qemu-block] [PATCH v2 0/7] block: Make more blockdev-add options work

2016-09-26 Thread Max Reitz
On 23.09.2016 16:32, Kevin Wolf wrote: > This series moves a few more options from flags to the appropriate place. This > doesn't only result in cleaner code, but also allows using these options in > nested node definitions. > > After this series, bds_tree_init() is only a thin wrapper around

Re: [Qemu-block] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-26 Thread Max Reitz
On 23.09.2016 16:32, Kevin Wolf wrote: > The option whether or not to use a native AIO interface really isn't a > generic option for all drivers, but only applies to the native file > protocols. This patch moves the option in blockdev-add to the > appropriate places (raw-posix and raw-win32). > >

Re: [Qemu-block] [PATCH v3 0/3] Add -blockdev command line option

2016-09-26 Thread Max Reitz
On 26.09.2016 17:27, Kevin Wolf wrote: > This series adds an option that is directly mapped to the blockdev-add QMP > command. It works more or less like -drive, except that it doesn't create a > BlockBackend (creating just a BDS without a BB is impossible with -drive) and > doesn't support legacy

Re: [Qemu-block] [PATCH 0/1] ahci: fix ncq aiocb-related segfault

2016-09-26 Thread Stefan Hajnoczi
On Thu, Sep 22, 2016 at 04:10:39PM -0400, John Snow wrote: > Fix ncq_cb to prevent a segfault on sys_reset. > > John Snow (1): > ahci: clear aiocb in ncq_cb > > hw/ide/ahci.c | 1 + > 1 file changed, 1 insertion(+) > > -- > 2.7.4 Maybe worth adding as a clarification: The issue is when

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/3] Add -blockdev command line option

2016-09-26 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1474903676-5680-1-git-send-email-kw...@redhat.com Subject: [Qemu-devel] [PATCH v3 0/3] Add -blockdev

Re: [Qemu-block] [PATCH] block: Fix error path in qmp_blockdev_change_medium()

2016-09-26 Thread Max Reitz
On 26.09.2016 15:06, Kevin Wolf wrote: > Commit 00949bab incorrectly changed one instance of into errp while > touching the line. Change it back. > > Signed-off-by: Kevin Wolf > --- > blockdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Max Reitz

[Qemu-block] [PATCH v3 3/3] doc: Document driver-specific -blockdev options

2016-09-26 Thread Kevin Wolf
This documents the driver-specific options for the raw, qcow2 and file block drivers for the man page. For everything else, we refer to the QAPI documentation. Signed-off-by: Kevin Wolf --- qemu-options.hx | 115 +++- 1 file

[Qemu-block] [PATCH v3 2/3] doc: Document generic -blockdev options

2016-09-26 Thread Kevin Wolf
This adds documentation for the -blockdev options that apply to all nodes independent of the block driver used. All options that are shared by -blockdev and -drive are now explained in the section for -blockdev. The documentation of -drive mentions that all -blockdev options are accepted as well.

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above()

2016-09-26 Thread Kevin Wolf
Am 19.09.2016 um 22:39 hat Eric Blake geschrieben: > On 09/18/2016 11:37 PM, Denis V. Lunev wrote: > > On 09/19/2016 04:21 AM, Fam Zheng wrote: > >> On Thu, 09/15 19:34, Denis V. Lunev wrote: > >>> They should work very similar, covering same areas if backing store is > >>> shorter than the image.

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 15:53, Vladimir Sementsov-Ogievskiy wrote: > On 26.09.2016 15:51, Paolo Bonzini wrote: >> This is very ad hoc. Can we instead have a block size common to all >> commands? Block devices in practice have one, in fact that's why >> they're called block devices... > > Block size can

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 14:54, Paolo Bonzini wrote: > > > Considering that NBD supports multiple outstanding requests, is it a big > deal to require one request per terabyte of storage? +1 Also I don't think we particularly want to make clearing the entire disk easy to do

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Alex Bligh
> On 26 Sep 2016, at 13:46, Vladimir Sementsov-Ogievskiy > wrote: > > Option reply types > > These values are used in the "reply type" field, sent by the server > @@ -872,7 +883,13 @@ valid may depend on negotiation during the handshake > phase. > >

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Fam Zheng
On Mon, 09/26 13:52, Peter Lieven wrote: > Am 26.09.2016 um 13:34 schrieb Fam Zheng: > > On Mon, 09/26 12:56, Peter Lieven wrote: > > > Hi, > > > > > > > > > i have a VMDK file for a Cisco Prime software appliance that I cannot > > > open in Qemu, Virtualbox or any other tool except > > > > >

Re: [Qemu-block] [PATCH v5 7/9] block: don't make snapshots for filters

2016-09-26 Thread Kevin Wolf
Am 26.09.2016 um 11:51 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 26.09.2016 um 10:08 hat Pavel Dovgalyuk geschrieben: > > > This patch disables snapshotting for block driver filters. > > > It is needed, because snapshots should be created > > > in

[Qemu-block] [PATCH] block: Fix error path in qmp_blockdev_change_medium()

2016-09-26 Thread Kevin Wolf
Commit 00949bab incorrectly changed one instance of into errp while touching the line. Change it back. Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 29c6561..62d0dd0 100644 ---

Re: [Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Paolo Bonzini
On 26/09/2016 14:46, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be > shifted left by several bits. > > This is needed for efficient clearing large regions of

Re: [Qemu-block] write_zeroes/trim on the whole disk

2016-09-26 Thread Paolo Bonzini
On 24/09/2016 14:27, Vladimir Sementsov-Ogievskiy wrote: > On 24.09.2016 15:06, Vladimir Sementsov-Ogievskiy wrote: >> On 24.09.2016 00:21, Wouter Verhelst wrote: >>> On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote: My preference would be a new flag to the existing commands, with

[Qemu-block] [PATCH] proto: add 'shift' extension.

2016-09-26 Thread Vladimir Sementsov-Ogievskiy
This extension allows big requests for TRIM and WRITE_ZEROES through special 'shift' parameter, which means that offset and length should be shifted left by several bits. This is needed for efficient clearing large regions of the disk (up to the whole disk). Signed-off-by: Vladimir

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Fam Zheng
On Mon, 09/26 12:56, Peter Lieven wrote: > Hi, > > > i have a VMDK file for a Cisco Prime software appliance that I cannot open in > Qemu, Virtualbox or any other tool except > > for ESXi. Qemu exits with an invalid footer message. At the expected position > and also at the end of the file

Re: [Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Peter Lieven
Am 26.09.2016 um 13:34 schrieb Fam Zheng: On Mon, 09/26 12:56, Peter Lieven wrote: Hi, i have a VMDK file for a Cisco Prime software appliance that I cannot open in Qemu, Virtualbox or any other tool except for ESXi. Qemu exits with an invalid footer message. At the expected position and

Re: [Qemu-block] [PULL 17/33] block: Accept device model name for x-blockdev-remove-medium

2016-09-26 Thread Paolo Bonzini
On 22/09/2016 18:29, Kevin Wolf wrote: > -qmp_x_blockdev_remove_medium(device, ); > +qmp_x_blockdev_remove_medium(true, device, false, NULL, errp); > if (err) { > error_propagate(errp, err); > goto fail; Bug: changed to errp, so err is always NULL. Paolo

[Qemu-block] VMDK file unable to open in Qemu but ESXi

2016-09-26 Thread Peter Lieven
Hi, i have a VMDK file for a Cisco Prime software appliance that I cannot open in Qemu, Virtualbox or any other tool except for ESXi. Qemu exits with an invalid footer message. At the expected position and also at the end of the file seems to be no footer. The VMDK has a -flex in the

Re: [Qemu-block] [PATCH v2 3/7] block/qapi: Move 'aio' option to file driver

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 16:40 hat Eric Blake geschrieben: > On 09/23/2016 09:32 AM, Kevin Wolf wrote: > > The option whether or not to use a native AIO interface really isn't a > > generic option for all drivers, but only applies to the native file > > protocols. This patch moves the option in

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread Thomas Huth
On 26.09.2016 10:22, Kevin Wolf wrote: > Am 23.09.2016 um 18:42 hat John Snow geschrieben: >> On 09/23/2016 12:09 PM, Thomas Huth wrote: >>> The folder include/hw/ide/ belongs to the IDE section. >>> >>> Signed-off-by: Thomas Huth >>> --- >>> MAINTAINERS | 1 + >>> 1 file

Re: [Qemu-block] write_zeroes/trim on the whole disk

2016-09-26 Thread Kevin Wolf
Am 24.09.2016 um 14:27 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 24.09.2016 15:06, Vladimir Sementsov-Ogievskiy wrote: > >On 24.09.2016 00:21, Wouter Verhelst wrote: > >>On Fri, Sep 23, 2016 at 02:00:06PM -0500, Eric Blake wrote: > >>>My preference would be a new flag to the existing

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 21:38 hat John Snow geschrieben: > On 09/23/2016 11:35 AM, Max Reitz wrote: > >On 23.09.2016 03:45, John Snow wrote: > >> block/block-backend.c | 22 -- > >> block/io.c | 25 + > >> cpus.c

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-26 Thread Kevin Wolf
Am 23.09.2016 um 18:42 hat John Snow geschrieben: > On 09/23/2016 12:09 PM, Thomas Huth wrote: > >The folder include/hw/ide/ belongs to the IDE section. > > > >Signed-off-by: Thomas Huth > >--- > > MAINTAINERS | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git