Re: [Qemu-block] [PATCH v4 9/9] qapi: Add NVMe driver options to the schema

2018-01-11 Thread Fam Zheng
On Wed, 01/10 08:41, Eric Blake wrote: > On 01/10/2018 03:18 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > qapi/block-core.json | 16 +++- > > 1 file changed, 15 insertions(+), 1 deletion(-) > > > > diff --git a/qapi/block-core.json

Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/9] block: Add VFIO based NVMe driver

2018-01-11 Thread Fam Zheng
On Wed, 01/10 08:44, Eric Blake wrote: > On 01/10/2018 03:18 AM, Fam Zheng wrote: > > This is a new protocol driver that exclusively opens a host NVMe > > controller through VFIO. It achieves better latency than linux-aio by > > completely bypassing host kernel vfs/block layer. > > > > > +static

Re: [Qemu-block] [PATCH v4 3/9] block: Add VFIO based NVMe driver

2018-01-11 Thread Fam Zheng
On Wed, 01/10 18:33, Stefan Hajnoczi wrote: > > +ret = event_notifier_init(>irq_notifier, 0); > > +if (ret) { > > +error_setg(errp, "Failed to init event notifier"); > > +return ret; > > dma_map_lock should be destroyed. CoMutexes are initialized by memset so I don't

Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/9] util: Introduce vfio helpers

2018-01-11 Thread Fam Zheng
On Wed, 01/10 13:09, Alex Williamson wrote: > On Wed, 10 Jan 2018 17:18:39 +0800 > Fam Zheng wrote: > > > This is a library to manage the host vfio interface, which could be used > > to implement userspace device driver code in QEMU such as NVMe or net > > controllers. > > > >

Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/9] util: Introduce vfio helpers

2018-01-11 Thread Fam Zheng
On Wed, 01/10 16:52, Stefan Hajnoczi wrote: > On Wed, Jan 10, 2018 at 05:18:39PM +0800, Fam Zheng wrote: > > +/* Map [host, host + size) area into a contiguous IOVA address space, and > > store > > + * the result in @iova if not NULL. The caller need to make sure the area > > is > > + * aligned

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2

2018-01-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 2018095225.4226-1-kw...@redhat.com Subject: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2

2018-01-11 Thread no-reply
Hi, This series failed build test on ppc host. Please find the details below. Message-id: 2018095225.4226-1-kw...@redhat.com Subject: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2 Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git

Re: [Qemu-block] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-11 Thread Eric Blake
On 01/11/2018 11:55 AM, Vladimir Sementsov-Ogievskiy wrote: > 11.01.2018 02:08, Eric Blake wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Instead of passing currently negotiating option and its length to >> many of negotiation functions let's just store them on

Re: [Qemu-block] [PATCH v2 4/6] nbd/server: Add va_list form of nbd_negotiate_send_rep_err()

2018-01-11 Thread Eric Blake
On 01/11/2018 12:05 PM, Vladimir Sementsov-Ogievskiy wrote: > 11.01.2018 02:08, Eric Blake wrote: >> This will be useful for the next patch. >> >> Based on a patch by Vladimir Sementsov-Ogievskiy >> >> Signed-off-by: Eric Blake >> --- >>   nbd/server.c | 24

[Qemu-block] [RFC PATCH 09/10] qcow2: Use visitor for options in qcow2_create()

2018-01-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2.c | 227 ++--- tests/qemu-iotests/049.out | 10 +- 2 files changed, 93 insertions(+), 144 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 868e0e8a62..4031a18a77 100644

[Qemu-block] [RFC PATCH 04/10] qcow2: Pass BlockdevCreateOptions to qcow2_create2()

2018-01-11 Thread Kevin Wolf
All of the simple options are now passed to qcow2_create2() in a BlockdevCreateOptions object. Still missing: node-name and the encryption options. Signed-off-by: Kevin Wolf --- block/qcow2.c | 186 ++ 1 file changed, 148

[Qemu-block] [RFC PATCH 05/10] qcow2: Use BlockdevRef in qcow2_create2()

2018-01-11 Thread Kevin Wolf
Instead of passing a separate BlockDriverState* into qcow2_create2(), make use of the BlockdevRef that is included in BlockdevCreateOptions. Signed-off-by: Kevin Wolf --- include/block/block.h | 1 + block.c | 39 +++

[Qemu-block] [RFC PATCH 08/10] util: Add qemu_opts_to_qdict_filtered()

2018-01-11 Thread Kevin Wolf
This allows, given a QemuOpts for a QemuOptsList that was merged from multiple QemuOptsList, to only consider those options that exist in one specific list. Block drivers need this to separate format-layer create options from protocol-level options. Signed-off-by: Kevin Wolf

[Qemu-block] [RFC PATCH 10/10] block: x-blockdev-create QMP command

2018-01-11 Thread Kevin Wolf
This adds a synchronous x-blockdev-create QMP command that can create qcow2 images on a given node name. We don't want to block while creating an image, so this is not the final interface in all aspects, but BlockdevCreateOptionsQcow2 and .bdrv_co_create() are what they actually might look like

[Qemu-block] [RFC PATCH 06/10] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()

2018-01-11 Thread Kevin Wolf
Instead of passing the encryption format name and the QemuOpts down, use the QCryptoBlockCreateOptions contained in BlockdevCreateOptions. Signed-off-by: Kevin Wolf --- block/qcow2.c | 62 +++ 1 file changed, 45

[Qemu-block] [RFC PATCH 07/10] qcow2: Handle full/falloc preallocation in qcow2_create2()

2018-01-11 Thread Kevin Wolf
Once qcow2_create2() can be called directly on an already existing node, we must provide the 'full' and 'falloc' preallocation modes outside of creating the image on the protocol layer. Fortunately, we have preallocated truncate now which can provide this functionality. Signed-off-by: Kevin Wolf

[Qemu-block] [RFC PATCH 03/10] qcow2: Let qcow2_create() handle protocol layer

2018-01-11 Thread Kevin Wolf
Currently, qcow2_create() only parses the QemuOpts and then calls qcow2_create2() for the actual image creation, which includes both the creation of the actual file on the file system and writing a valid empty qcow2 image into that file. The plan is that qcow2_create2() becomes the function that

[Qemu-block] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- qapi/block-core.json | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1749376c61..9341f6708d 100644 --- a/qapi/block-core.json +++

[Qemu-block] [RFC PATCH 00/10] x-blockdev-create for qcow2

2018-01-11 Thread Kevin Wolf
This series implements a minimal QMP command that allows to create an image format on a given block node. The interface is still going to change to some kind of an async command (possibly a block job), so I prefixed x- for now. At this point, I'm mostly interested in comments about

[Qemu-block] [RFC PATCH 01/10] block/qapi: Introduce BlockdevCreateOptions

2018-01-11 Thread Kevin Wolf
This creates a BlockdevCreateOptions union type that will contain all of the options for image creation. We'll start out with an empty struct type BlockdevCreateDummy for all drivers. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 64

Re: [Qemu-block] [PATCH v2 4/6] nbd/server: Add va_list form of nbd_negotiate_send_rep_err()

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 02:08, Eric Blake wrote: This will be useful for the next patch. Based on a patch by Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- nbd/server.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git

Re: [Qemu-block] [PATCH v2 2/6] nbd/server: refactor negotiation functions parameters

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 02:08, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Instead of passing currently negotiating option and its length to many of negotiation functions let's just store them on NBDClient struct to be state-variables of negotiation phase. This unifies

Re: [Qemu-block] [PATCH v2 3/6] nbd/server: Better error for NBD_OPT_EXPORT_NAME failure

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 02:08, Eric Blake wrote: When a client abruptly disconnects before we've finished reading the name sent with NBD_OPT_EXPORT_NAME, we are better off logging the failure as EIO (we can't communicate with the client), rather than EINVAL (the client sent bogus data). Signed-off-by: Eric

Re: [Qemu-block] [PATCH v2 1/6] nbd/server: Hoist nbd_reject_length() earlier

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 02:08, Eric Blake wrote: No semantic change, but will make it easier for an upcoming patch to refactor code without having to add forward declarations. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

Re: [Qemu-block] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Juan Quintela
"Daniel P. Berrange" wrote: > On Thu, Jan 11, 2018 at 01:23:05PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrange (berra...@redhat.com) wrote: >> > On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: >> > > On 2018-01-08 14:52, Eric Blake wrote: >> > > > On

Re: [Qemu-block] [PATCH 1/5] docs/interop/prl-xml: description of Parallels Disk format

2018-01-11 Thread Stefan Hajnoczi
On Wed, Jan 10, 2018 at 07:23:29PM +0300, klim wrote: > On 01/04/2018 02:34 PM, Stefan Hajnoczi wrote: > > On Mon, Dec 18, 2017 at 02:09:07PM +0300, Denis V. Lunev wrote: > > > +* GUID - image identifier, UUID in curly brackets. > > > + For instance,

Re: [Qemu-block] [Qemu-devel] qcow2 autoloading bitmaps

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 17:43, Eric Blake wrote: On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: # @autoload: the bitmap will be automatically loaded when the image it is stored #    in is opened. This flag may only be specified for persistent #    bitmaps. Default is false for

Re: [Qemu-block] [Qemu-devel] qcow2 autoloading bitmaps

2018-01-11 Thread Eric Blake
On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: > # @autoload: the bitmap will be automatically loaded when the image it > is stored > #    in is opened. This flag may only be specified for persistent > #    bitmaps. Default is false for block-dirty-bitmap-add. >

[Qemu-block] qcow2 autoloading bitmaps

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
Hi all! I've just noted that there is an unfortunate contradiction between qcow2 spec and qapi. In qcow2 we have: 1: auto  The bitmap must reflect all changes of the virtual  disk by any application that would write to this qcow2  file (including writes, snapshot switching, etc.). The  type

Re: [Qemu-block] [PATCH v5 02/15] blkverify: set supported write/zero flags

2018-01-11 Thread Alberto Garcia
On Wed 01 Nov 2017 04:43:55 PM CET, Anton Nefedov wrote: > Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH v5 01/15] mirror: inherit supported write/zero flags

2018-01-11 Thread Alberto Garcia
On Wed 01 Nov 2017 04:43:54 PM CET, Anton Nefedov wrote: > Signed-off-by: Anton Nefedov > Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Berto

Re: [Qemu-block] [PATCH v4 3/9] block: Add VFIO based NVMe driver

2018-01-11 Thread Paolo Bonzini
On 10/01/2018 19:33, Stefan Hajnoczi wrote: >> + >> +/* Fields protected by @lock */ > Does this lock serve any purpose? I didn't see a place where these > fields is accessed from multiple threads. Perhaps you're trying to > prepare for multiqueue, but then other things like the >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 01:23:05PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > > > On 2018-01-08 14:52, Eric Blake wrote: > > > > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: > > > >>

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > > On 2018-01-08 14:52, Eric Blake wrote: > > > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: > > >> Add QAPI wrapper functions for the existing snapshot functionality. These > > >>

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > On 2018-01-08 14:52, Eric Blake wrote: > > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: > >> Add QAPI wrapper functions for the existing snapshot functionality. These > >> functions behave the same way as the HMP savevm, loadvm and

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Max Reitz
On 2018-01-08 14:52, Eric Blake wrote: > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: >> Add QAPI wrapper functions for the existing snapshot functionality. These >> functions behave the same way as the HMP savevm, loadvm and delvm >> commands. This will allow applications, such as OpenQA, to

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-11 Thread Kashyap Chamarthy
On Wed, Jan 10, 2018 at 04:43:22PM +, Nir Soffer wrote: > On Wed, Jan 10, 2018 at 4:04 PM Kashyap Chamarthy > wrote: [...] > > Yes, for completness' sake, Nova upstream is already patched to use the > > `qemu-img` '--force-share' flag that comes with QEMU >= 2.10. > > >