[Qemu-block] [PATCH] Added iopmem device emulation

2016-10-18 Thread Logan Gunthorpe
An iopmem device is one which exposes volatile or non-volatile memory mapped directly to a BAR region. One purpose is to provide buffers to do peer to peer transfers on the bus. As such this device uses QEMU's drive backing store to simulate non-volatile memory and provides through a mapped BAR win

Re: [Qemu-block] [PATCH v2 00/20] dataplane: remove RFifoLock

2016-10-18 Thread Fam Zheng
On Wed, 10/19 08:55, Fam Zheng wrote: > Modulo the one harmful question, series: s/harmful/unharmful/, apparently. Fam

Re: [Qemu-block] [PATCH v2 00/20] dataplane: remove RFifoLock

2016-10-18 Thread Fam Zheng
On Mon, 10/17 15:54, Paolo Bonzini wrote: > This patch reorganizes aio_poll callers to establish new rules for > dataplane locking. The idea is that I/O operations on a dataplane > BDS (i.e. one where the AioContext is not the main one) do not call > aio_poll anymore. Instead, they wait for the o

Re: [Qemu-block] [PATCH 16/20] qemu-img: call aio_context_acquire/release around block job

2016-10-18 Thread Fam Zheng
On Mon, 10/17 15:54, Paolo Bonzini wrote: > This will be needed by bdrv_reopen_multiple, which calls > bdrv_drain_all and thus will *release* the AioContext. Looks okay, but I wonder how bdrv_drain_all releasing AioContext break anything? Fam > > Signed-off-by: Paolo Bonzini > --- > v1

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives

2016-10-18 Thread Eric Blake
On 10/18/2016 02:45 PM, John Snow wrote: > > > On 10/18/2016 06:22 AM, Kevin Wolf wrote: >> This tests the different supported methods to create floppy drives and >> how they interact. >> >> +function check_floppy_qtree() >> +{ >> +echo >> +echo Testing: "$@" | _filter_testdir >> + >> +

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives

2016-10-18 Thread John Snow
On 10/18/2016 06:22 AM, Kevin Wolf wrote: This tests the different supported methods to create floppy drives and how they interact. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/172 | 242 + tests/qemu-iotests/172.out | 1205 tests

Re: [Qemu-block] [PATCH v2] rbd: make the code more readable

2016-10-18 Thread Jeff Cody
On Sat, Oct 15, 2016 at 04:26:13PM +0800, Xiubo Li wrote: > Make it a bit clearer and more readable. > > Signed-off-by: Xiubo Li > CC: John Snow > --- > > V2: > - Advice from John Snow. Thanks. > > > block/rbd.c | 25 - > 1 file changed, 12 insertions(+), 13 deletions

Re: [Qemu-block] [Qemu-devel] [PATCH v14 14/21] qapi: allow repeated opts with qobject_input_visitor_new_opts

2016-10-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The qobject_input_visitor_new_opts() method gains a new > parameter to control whether it allows repeated option > keys in the input QemuOpts or not. > > Signed-off-by: Daniel P. Berrange > --- > include/qapi/qobject-input-visitor.h | 6 ++ > qapi/qobject-inpu

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 17.10.2016 um 16:50 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 13.10.2016 um 14:35 hat Markus Armbruster geschrieben: >> >> Cc: Kevin for discussion of QemuOpts dotted key convention >> >> >> >> "Daniel P. Berrange" writes: >> >> >> >> > Curre

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 9:43 PM, Ashijeet Acharya wrote: > On Tue, Oct 18, 2016 at 7:03 PM, Kevin Wolf wrote: >> Am 18.10.2016 um 15:14 hat Ashijeet Acharya geschrieben: >>> On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: >>> > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: >>> >> O

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 7:03 PM, Kevin Wolf wrote: > Am 18.10.2016 um 15:14 hat Ashijeet Acharya geschrieben: >> On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: >> > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: >> >> On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: >> >> > Am

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-18 Thread Alberto Garcia
On Fri 07 Oct 2016 03:58:29 PM CEST, Ed Swierk wrote: >> I know the disk image size, and can set cache size in >> bytes. l2-cache-size=max would be a convenience feature, *especially >> if it could become the default*. Then I could forget thinking about >> whether the image is larger than the curr

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The qdict_flatten() method will take a dict whose elements are > further nested dicts/lists and flatten them by concatenating > keys. > > The qdict_crumple() method aims to do the reverse, taking a flat > qdict, and turning it into a set of nested dicts/lists. It wi

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Eric Blake
On 10/18/2016 08:33 AM, Kevin Wolf wrote: >> I have successfully converted NFS block driver to use this set of >> runtime opts which I think is the required condition to add >> blockdev-add compatibility later. Also, since I do not have 'port' as >> a runtime option, I can directly add blockdev-ad

Re: [Qemu-block] [PATCH 0/2] Correct access to wrong BlockBackendPublic structures

2016-10-18 Thread Kevin Wolf
Am 17.10.2016 um 17:46 hat Alberto Garcia geschrieben: > Hi all, > > Paolo found that commit 27ccdd52598290f introduced a regression in the > throttling code. > > It can be easily reproduced in scenarios where you have a throttling > group with several drives but you only write to one of them. In

Re: [Qemu-block] [PATCH v2] rbd: make the code more readable

2016-10-18 Thread Kevin Wolf
Am 15.10.2016 um 10:26 hat Xiubo Li geschrieben: > Make it a bit clearer and more readable. > > Signed-off-by: Xiubo Li > CC: John Snow > --- > > V2: > - Advice from John Snow. Thanks. Copying the official maintainers: $ scripts/get_maintainer.pl -f block/rbd.c Josh Durgin (supporter:RBD) Je

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 15:14 hat Ashijeet Acharya geschrieben: > On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: > > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: > >> On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > >> > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: > >> >> > >>

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 6:34 PM, Kevin Wolf wrote: > Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: >> On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: >> > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: >> >> >> >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: >> >>> >> >>

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 14:46 hat Ashijeet Acharya geschrieben: > On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: > >> > >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: > >>> > >>> On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: > >>> > >>

Re: [Qemu-block] [PATCH v2] raw_bsd: add offset and size options

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 00:25 hat Tomáš Golembiovský geschrieben: > Added two new options 'offset' and 'size'. This makes it possible to use > only part of the file as a device. This can be used e.g. to limit the > access only to single partition in a disk image or use a disk inside a > tar archive (like

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 4:11 PM, Peter Lieven wrote: > Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: >> >> On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: >>> >>> On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: >>> One more relatively easy question though, will we include @port as an

Re: [Qemu-block] [Qemu-devel] [PATCH v2] raw_bsd: add offset and size options

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 12:25:17AM +0200, Tomáš Golembiovský wrote: > Added two new options 'offset' and 'size'. This makes it possible to use > only part of the file as a device. This can be used e.g. to limit the > access only to single partition in a disk image or use a disk inside a > tar archi

Re: [Qemu-block] [PATCH v2] Add 'offset' and 'size' options

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 00:25 hat Tomáš Golembiovský geschrieben: > This is a follow-up to the patch: > [PATCH] raw-posix: add 'offset' and 'size' options > > The main changes are: > - options were moved from 'file' driver into 'raw' driver as suggested > - added support for writing, reopen and t

Re: [Qemu-block] [PATCH v2] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 12:37 hat Pino Toscano geschrieben: > The 'obj' result of the visitor was not properly freed, like done in > other places doing a similar job. > > Signed-off-by: Pino Toscano Thanks, applied to my block branch. Kevin

Re: [Qemu-block] [Qemu-devel] [PATCH v2] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Eric Blake
On 10/18/2016 05:37 AM, Pino Toscano wrote: > The 'obj' result of the visitor was not properly freed, like done in > other places doing a similar job. > > Signed-off-by: Pino Toscano > --- Reviewed-by: Eric Blake > > Changes in v2: > - added Signed-off-by > > block/qapi.c | 1 + > 1 file ch

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-18 Thread Markus Armbruster
Eric Blake writes: > On 10/17/2016 09:50 AM, Markus Armbruster wrote: >>> But even if I realised that QemuOpts support this syntax, I think we >>> would still have to use the dotted syntax because it's explicit about >>> the index and we need that because the list can contains dicts. >>> >>> Comp

Re: [Qemu-block] [Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Peter Lieven
Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: One more relatively easy question though, will we include @port as an option in runtime_opts while converting NFS to use several runtime_opts? T

[Qemu-block] [PATCH v2] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Pino Toscano
The 'obj' result of the visitor was not properly freed, like done in other places doing a similar job. Signed-off-by: Pino Toscano --- Changes in v2: - added Signed-off-by block/qapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qapi.c b/block/qapi.c index 6f947e3..50d3090 100644

Re: [Qemu-block] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Pino Toscano
On Tuesday, 18 October 2016 11:44:26 CEST Kevin Wolf wrote: > Am 18.10.2016 um 11:18 hat Pino Toscano geschrieben: > > The 'obj' result of the visitor was not properly freed, like done in > > other places doing a similar job. > > --- > > block/qapi.c | 1 + > > 1 file changed, 1 insertion(+) > >

[Qemu-block] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives

2016-10-18 Thread Kevin Wolf
This tests the different supported methods to create floppy drives and how they interact. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/172 | 242 + tests/qemu-iotests/172.out | 1205 tests/qemu-iotests/group |1 + 3 files change

[Qemu-block] [PATCH v3 1/4] fdc: Add a floppy qbus

2016-10-18 Thread Kevin Wolf
This adds a qbus to the floppy controller that should contain the floppy drives eventually. At the moment it just exists and is empty. Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hw/block/fdc.c | 40 +++- 1 file changed, 35 insertions(+), 5 deletions

[Qemu-block] [PATCH v3 3/4] fdc: Move qdev properties to FloppyDrive

2016-10-18 Thread Kevin Wolf
This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By default you get a single empty floppy drive. You c

[Qemu-block] [PATCH v3 0/4] fdc: Use separate qdev device for drives

2016-10-18 Thread Kevin Wolf
We have been complaining for a long time about how the floppy controller and floppy drives are combined in a single qdev device and how this makes the device awkward to work with because it behaves different from all other block devices. The latest reason to complain was when I noticed that using

[Qemu-block] [PATCH v3 2/4] fdc: Add a floppy drive qdev

2016-10-18 Thread Kevin Wolf
Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hw/block/fdc.c | 151 + 1 file changed,

Re: [Qemu-block] [PATCH 15/18] block: only call aio_poll on the current thread's AioContext

2016-10-18 Thread Stefan Hajnoczi
On Mon, Oct 17, 2016 at 10:04:59AM +0200, Paolo Bonzini wrote: > > > On 16/10/2016 18:40, Stefan Hajnoczi wrote: > > > void bdrv_wakeup(BlockDriverState *bs) > > > { > > > +if (bs->wakeup) { > > > +aio_bh_schedule_oneshot(qemu_get_aio_context(), dummy_bh_cb, > > > NULL); > > > +

Re: [Qemu-block] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Kevin Wolf
Am 18.10.2016 um 11:18 hat Pino Toscano geschrieben: > The 'obj' result of the visitor was not properly freed, like done in > other places doing a similar job. > --- > block/qapi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/qapi.c b/block/qapi.c > index 6f947e3..50d3090 100644

Re: [Qemu-block] [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-18 Thread Kevin Wolf
Am 17.10.2016 um 16:50 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.10.2016 um 14:35 hat Markus Armbruster geschrieben: > >> Cc: Kevin for discussion of QemuOpts dotted key convention > >> > >> "Daniel P. Berrange" writes: > >> > >> > Currently qdict_crumple requires a t

Re: [Qemu-block] [PATCH v4 0/3] iotests: Fix test 162

2016-10-18 Thread Kevin Wolf
Am 17.10.2016 um 19:07 hat Max Reitz geschrieben: > On 28.09.2016 22:46, Max Reitz wrote: > > 162 is potentially racy and makes some invalid assumptions about what > > should happen when connecting to a non-existing domain name. This series > > fixes both issues. > > > > > > v4: > > - Added docum

[Qemu-block] [PATCH] qapi: fix memory leak in bdrv_image_info_specific_dump

2016-10-18 Thread Pino Toscano
The 'obj' result of the visitor was not properly freed, like done in other places doing a similar job. --- block/qapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qapi.c b/block/qapi.c index 6f947e3..50d3090 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -698,6 +698,7 @@ void bdrv_