Re: [Qemu-block] [Qemu-devel] [PATCH v7 04/15] block/io_uring: implements interfaces for io_uring

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:40PM +0530, Aarushi Mehta wrote: > +/** > + * luring_process_completions: > + * @s: AIO state > + * > + * Fetches completed I/O requests, consumes cqes and invokes their callbacks > + * The function is somewhat tricky because it supports nested event loops, > for > +

Re: [Qemu-block] [PATCH v7 11/15] qemu-io: adds option to use aio engine

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:47PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-io.c | 24 > 1 file changed, 20 insertions(+), 4 deletions(-) > > diff --git a/qemu-io.c b/qemu-io.c > index f64eca6940..6568f0c369 100644 > --- a/qemu-io.c > +++ b

Re: [Qemu-block] [PATCH v7 12/15] qemu-img: adds option to use aio engine for benchmarking

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:48PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-img.c| 10 +- > qemu-img.texi | 5 - > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 79983772de..3fc8dac0b1 100644 > --

Re: [Qemu-block] [Qemu-devel] [PATCH v7 13/15] qemu-nbd: adds option for aio engines

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:49PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-nbd.c| 12 > qemu-nbd.texi | 4 ++-- > 2 files changed, 6 insertions(+), 10 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH v7 14/15] tests/qemu-iotests: enable testing with aio options

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:50PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > tests/qemu-iotests/check | 15 ++- > tests/qemu-iotests/common.rc | 14 ++ > tests/qemu-iotests/iotests.py | 9 - > 3 files changed, 36 insertions(+), 2 del

Re: [Qemu-block] [PATCH v7 15/15] tests/qemu-iotests: use AIOMODE with various tests

2019-07-30 Thread Stefan Hajnoczi
On Mon, Jul 29, 2019 at 08:46:51PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > tests/qemu-iotests/028 | 3 ++- > tests/qemu-iotests/058 | 2 +- > tests/qemu-iotests/089 | 4 ++-- > tests/qemu-iotests/091 | 7 --- > tests/qemu-iotests/109 | 3 ++- > tests/qemu-iotes

Re: [Qemu-block] [Qemu-devel] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
Am 30.07.2019 um 08:31 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > scsi-disks decides whether it has a read-only device by looking at > > whether the BlockBackend specified as drive=... is read-only. In the > > case of an anonymous BlockBackend (with a node name specified in > >

Re: [Qemu-block] [Qemu-devel] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Christophe de Dinechin
Kevin Wolf writes: > scsi-disks decides whether it has a read-only device by looking at > whether the BlockBackend specified as drive=... is read-only. In the > case of an anonymous BlockBackend (with a node name specified in > drive=...), this is the read-only flag of the attached node. In the

Re: [Qemu-block] [Qemu-devel] [PATCH] Revert "ide/ahci: Check for -ECANCELED in aio callbacks"

2019-07-30 Thread Philippe Mathieu-Daudé
Hi John, On 7/30/19 12:36 AM, John Snow wrote: > This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394. > > It's not correct to just ignore an error code in a callback; we need to > handle that error and possible report failure to the guest so that they > don't wait indefinitely for an ope

Re: [Qemu-block] [Qemu-devel] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Max Reitz
On 30.07.19 10:29, Kevin Wolf wrote: > Am 30.07.2019 um 08:31 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >>> scsi-disks decides whether it has a read-only device by looking at >>> whether the BlockBackend specified as drive=... is read-only. In the >>> case of an anonymous BlockBa

Re: [Qemu-block] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Max Reitz
On 29.07.19 18:42, Kevin Wolf wrote: > scsi-disks decides whether it has a read-only device by looking at > whether the BlockBackend specified as drive=... is read-only. In the > case of an anonymous BlockBackend (with a node name specified in > drive=...), this is the read-only flag of the attache

Re: [Qemu-block] [PATCH v3 00/33] Multi-phase reset mechanism

2019-07-30 Thread Cornelia Huck
On Mon, 29 Jul 2019 16:56:21 +0200 Damien Hedde wrote: (...) > 2. old's device_reset > > There was a few call to this function, I renamed it *device_legacy_reset* to > handle the transition. This function allowed to reset only a given device > (and not its eventual qbus subtree). This behavior

Re: [Qemu-block] [Qemu-devel] [PATCH for-4.1] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Markus Armbruster
Max Reitz writes: > On 30.07.19 10:29, Kevin Wolf wrote: >> Am 30.07.2019 um 08:31 hat Markus Armbruster geschrieben: >>> Kevin Wolf writes: >>> scsi-disks decides whether it has a read-only device by looking at whether the BlockBackend specified as drive=... is read-only. In the

[Qemu-block] [PULL 3/4] block/copy-on-read: Fix permissions for inactive node

2019-07-30 Thread Kevin Wolf
The copy-on-read drive must not request the WRITE_UNCHANGED permission for its child if the node is inactive, otherwise starting a migration destination with -incoming will fail because the child cannot provide write access yet: qemu-system-x86_64: -blockdev copy-on-read,file=img,node-name=cor:

[Qemu-block] [PULL 4/4] scsi-cd: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
scsi-disks decides whether it has a read-only device by looking at whether the BlockBackend specified as drive=... is read-only. In the case of an anonymous BlockBackend (with a node name specified in drive=...), this is the read-only flag of the attached node. In the case of an empty anonymous Blo

[Qemu-block] [PULL 0/4] Block layer and multiboot test patches

2019-07-30 Thread Kevin Wolf
The following changes since commit ee9545ed1543020fba52fa5fb8f2b71c63e5389f: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-07-30 09:43:32 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch chan

[Qemu-block] [PULL 1/4] tests/multiboot: Fix load address of test kernels

2019-07-30 Thread Kevin Wolf
While older toolchains produced binaries where the physical load address of ELF segments was the same as the virtual address, newer versions seem to choose a different physical address if it isn't specified explicitly. The means that the test kernel doesn't use the right addresses to access e.g. fo

[Qemu-block] [PULL 2/4] Fixes: add read-zeroes to 051.out

2019-07-30 Thread Kevin Wolf
From: Andrey Shinkevich The patch "iotests: Set read-zeroes on in null block driver for Valgrind" with the commit ID a6862418fec4072 needs the change in 051.out when compared against on the s390 system. Fixes: a6862418fec40727b392c86dc13d9ec980efcb15 Reported-by: Christian Borntraeger Signed-of

Re: [Qemu-block] [QEMU] [PATCH v5 0/8] Add Qemu to SeaBIOS LCHS interface

2019-07-30 Thread Gerd Hoffmann
Hi, [ just back from summer vacation, wading through my backlog ... ] > > I feel like it would be up to Gerd as the general SeaBIOS point of contact? > > > > ...ah, who is offline for vacation. > > We're in freeze right now anyway, so I would think that Gerd and/or > Kevin can work out who o

Re: [Qemu-block] [Qemu-devel] [PATCH] Revert "ide/ahci: Check for -ECANCELED in aio callbacks"

2019-07-30 Thread Paolo Bonzini
On 30/07/19 11:54, Philippe Mathieu-Daudé wrote: > Hi John, > > On 7/30/19 12:36 AM, John Snow wrote: >> This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394. >> >> It's not correct to just ignore an error code in a callback; we need to >> handle that error and possible report failure to t

[Qemu-block] [PATCH for-4.1?] nvme: Limit blkshift to 12 (for 4 kB blocks)

2019-07-30 Thread Max Reitz
Linux does not support blocks greater than 4 kB anyway, so we might as well limit blkshift to 12 and thus save us from some potential trouble. Reported-by: Peter Maydell Suggested-by: Maxim Levitsky Signed-off-by: Max Reitz --- I won't be around for too long today, so I thought I'd just write a

Re: [Qemu-block] [PATCH for-4.1?] nvme: Limit blkshift to 12 (for 4 kB blocks)

2019-07-30 Thread Maxim Levitsky
On Tue, 2019-07-30 at 13:48 +0200, Max Reitz wrote: > Linux does not support blocks greater than 4 kB anyway, so we might as > well limit blkshift to 12 and thus save us from some potential trouble. Well in theory its not 4K but PAGE_SIZE, thus on some IBM machines that I heard have 64K page size

Re: [Qemu-block] [PULL 0/4] Block layer and multiboot test patches

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 12:24, Kevin Wolf wrote: > > The following changes since commit ee9545ed1543020fba52fa5fb8f2b71c63e5389f: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2019-07-30 09:43:32 +0100) > > are available in the Git repository at: > > git://re

Re: [Qemu-block] [Qemu-devel] [PATCH] Revert "ide/ahci: Check for -ECANCELED in aio callbacks"

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 1:37 PM, Paolo Bonzini wrote: > On 30/07/19 11:54, Philippe Mathieu-Daudé wrote: >> Hi John, >> >> On 7/30/19 12:36 AM, John Snow wrote: >>> This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394. >>> >>> It's not correct to just ignore an error code in a callback; we need to >>> h

Re: [Qemu-block] [Qemu-devel] [PATCH] Revert "ide/ahci: Check for -ECANCELED in aio callbacks"

2019-07-30 Thread John Snow
On 7/30/19 5:54 AM, Philippe Mathieu-Daudé wrote: > Hi John, > > On 7/30/19 12:36 AM, John Snow wrote: >> This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394. >> >> It's not correct to just ignore an error code in a callback; we need to >> handle that error and possible report failure

Re: [Qemu-block] [PATCH] tests: Set read-zeroes on for null-co driver

2019-07-30 Thread Thomas Huth
On 29/07/2019 14.46, Andrey Shinkevich wrote: > This patch is to reduce the number of Valgrind report messages about > using uninitialized memory with the null-co driver. It helps to filter > real memory issues and is the same work done for the iotests with the > commit ID a6862418fec4072. > > Sug

[Qemu-block] [PULL 1/1] nvme: Limit blkshift to 12 (for 4 kB blocks)

2019-07-30 Thread Max Reitz
Linux does not support blocks greater than 4 kB anyway, so we might as well limit blkshift to 12 and thus save us from some potential trouble. Reported-by: Peter Maydell Suggested-by: Maxim Levitsky Signed-off-by: Max Reitz Message-id: 20190730114812.10493-1-mre...@redhat.com Reviewed-by: Maxim

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Set read-zeroes on for null-co driver

2019-07-30 Thread Thomas Huth
On 30/07/2019 14.52, Thomas Huth wrote: > On 29/07/2019 14.46, Andrey Shinkevich wrote: >> This patch is to reduce the number of Valgrind report messages about >> using uninitialized memory with the null-co driver. It helps to filter >> real memory issues and is the same work done for the iotests w

[Qemu-block] [PULL 0/1] Block patches for 4.1.0-rc3

2019-07-30 Thread Max Reitz
The following changes since commit 6e9a6cbe7d56107f5e0d7711905dc19bb4d7e3f0: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-07-30 12:25:35 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-2019-07-30 for yo

Re: [Qemu-block] [PATCH v7 13/15] qemu-nbd: adds option for aio engines

2019-07-30 Thread Eric Blake
On 7/29/19 10:16 AM, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-nbd.c| 12 > qemu-nbd.texi | 4 ++-- > 2 files changed, 6 insertions(+), 10 deletions(-) Acked-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Set read-zeroes on for null-co driver

2019-07-30 Thread Andrey Shinkevich
On 30/07/2019 15:59, Thomas Huth wrote: > On 30/07/2019 14.52, Thomas Huth wrote: >> On 29/07/2019 14.46, Andrey Shinkevich wrote: >>> This patch is to reduce the number of Valgrind report messages about >>> using uninitialized memory with the null-co driver. It helps to filter >>> real memory is

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Mon, 29 Jul 2019 16:56:22 +0200 Damien Hedde wrote: (...) > +/* > + * ResettableClass: > + * Interface for resettable objects. > + * > + * The reset operation is divided in several phases each represented by a > + * method. > + * > + * Each Ressetable must maintain a reset counter in its stat

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > On Mon, 29 Jul 2019 16:56:22 +0200 > Damien Hedde wrote: > > (...) > > > +/* > > + * ResettableClass: > > + * Interface for resettable objects. > > + * > > + * The reset operation is divided in several phases each represented by a > > + * met

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > > > On Mon, 29 Jul 2019 16:56:22 +0200 > > Damien Hedde wrote: > > > > (...) > > > > > +/* > > > + * ResettableClass: > > > + * Interface for resettable objects. > > > + * > > > +

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: > > On Tue, 30 Jul 2019 14:44:21 +0100 > Peter Maydell wrote: > > > On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > > I'm having a hard time figuring out what a 'cold' or a 'warm' reset is > > > supposed to be... can you add a definition/

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Damien Hedde
On 7/30/19 3:59 PM, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >> >> On Tue, 30 Jul 2019 14:44:21 +0100 >> Peter Maydell wrote: >> >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: I'm having a hard time figuring out what a 'cold' or a 'warm' reset is >

[Qemu-block] [PATCH v2 1/4] block: introduce aio task pool

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Common interface for aio task loops. To be used for improving performance of synchronous io loops in qcow2, block-stream, copy-on-read, and may be other places. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/aio_task.h| 52 +++ block/aio_task.c| 119 ++

[Qemu-block] [PATCH v2 3/4] block/qcow2: refactor qcow2_co_pwritev_part

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Similarly to previous commit, prepare for parallelizing write-loop iterations. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 150 +- 1 file changed, 88 insertions(+), 62 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c ind

[Qemu-block] [PATCH v2 2/4] block/qcow2: refactor qcow2_co_preadv_part

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Further patch will run partial requests of iterations of qcow2_co_preadv in parallel for performance reasons. To prepare for this, separate part which may be parallelized into separate function (qcow2_co_preadv_task). While being here, also separate encrypted clusters reading to own function, like

[Qemu-block] [PATCH v2 0/4] qcow2: async handling of fragmented io

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is an asynchronous scheme for handling fragmented qcow2 reads and writes. Both qcow2 read and write functions loops through sequential portions of data. The series aim it to parallelize these loops iterations. It improves performance for fragmented qcow2 images, I've tested it as desc

[Qemu-block] [PATCH v2 4/4] block/qcow2: introduce parallel subrequest handling in read and write

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
It improves performance for fragmented qcow2 images. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 125 + block/trace-events | 1 + 2 files changed, 115 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c

Re: [Qemu-block] [Qemu-devel] [PATCH v7] qemu-io: add pattern file for write command

2019-07-30 Thread Denis Plotnikov
Ping! On Jul 5 2019, at 1:21 pm, Denis Plotnikov wrote: The patch allows to provide a pattern file for write command. There was no similar ability before. Signed-off-by: Denis Plotnikov --- v7: * fix variable naming * make code more readable * extend help for write command v6: * the pattern fi

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] qcow2: add zstd cluster compression

2019-07-30 Thread Denis Plotnikov
On Jul 9 2019, at 9:18 am, Markus Armbruster wrote: Denis Plotnikov writes: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of compression ratio in comparison with zlib, which, by the moment, has been the only compression

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] add zstd cluster compression

2019-07-30 Thread Denis Plotnikov
Hi all! Is there any other comments besides Markus's one about adding zlib/zstd links to compressed cluster layout description? On Jul 4 2019, at 4:09 pm, Denis Plotnikov wrote: change log: v2: * relax the compression type setting restriction in the spec * fix qcow2 header size checking * fix e

[Qemu-block] [PATCH for-4.1 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
Kevin Wolf (2): fdc: Fix inserting read-only media in empty drive iotests/118: Test inserting a read-only medium hw/block/fdc.c | 11 --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) -- 2.

[Qemu-block] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
In order to insert a read-only medium (i.e. a read-only block node) to the BlockBackend of a floppy drive, we must not have taken write permissions on that BlockBackend, or the operation will fail with the error message "Block node is read-only". The device already takes care to remove all permiss

[Qemu-block] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 603e10e8a2..499c5f0901 100755 --- a/tests/qemu-iotests/118 +++ b/tests/qem

Re: [Qemu-block] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Max Reitz
On 30.07.19 16:57, Kevin Wolf wrote: > In order to insert a read-only medium (i.e. a read-only block node) to > the BlockBackend of a floppy drive, we must not have taken write > permissions on that BlockBackend, or the operation will fail with the > error message "Block node is read-only". > > Th

Re: [Qemu-block] [Qemu-devel] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread John Snow
On 7/30/19 10:57 AM, Kevin Wolf wrote: > In order to insert a read-only medium (i.e. a read-only block node) to > the BlockBackend of a floppy drive, we must not have taken write > permissions on that BlockBackend, or the operation will fail with the > error message "Block node is read-only". >

Re: [Qemu-block] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Max Reitz
On 30.07.19 16:57, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/118 | 6 +- > tests/qemu-iotests/118.out | 4 ++-- > 2 files changed, 7 insertions(+), 3 deletions(-) Personally, I wouldn’t mind a self.assert_qmp(result, 'return[0]/inserted/ro', read_only_

Re: [Qemu-block] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread John Snow
On 7/30/19 10:57 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/118 | 6 +- > tests/qemu-iotests/118.out | 4 ++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 > index 603e10e8a2..499c

[Qemu-block] [PULL 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
The following changes since commit 8517bf84056282ea3e27772d51f76db3a6fa2d26: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-30' into staging (2019-07-30 14:23:07 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[Qemu-block] [PULL 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 603e10e8a2..499c5f0901 100

[Qemu-block] [PULL 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
In order to insert a read-only medium (i.e. a read-only block node) to the BlockBackend of a floppy drive, we must not have taken write permissions on that BlockBackend, or the operation will fail with the error message "Block node is read-only". The device already takes care to remove all permiss

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Tue, 30 Jul 2019 16:08:59 +0200 Damien Hedde wrote: > On 7/30/19 3:59 PM, Peter Maydell wrote: > > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: > >> > >> On Tue, 30 Jul 2019 14:44:21 +0100 > >> Peter Maydell wrote: > >> > >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: >

Re: [Qemu-block] [PULL 0/1] Block patches for 4.1.0-rc3

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 13:59, Max Reitz wrote: > > The following changes since commit 6e9a6cbe7d56107f5e0d7711905dc19bb4d7e3f0: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2019-07-30 12:25:35 +0100) > > are available in the Git repository at: > > https:/

[Qemu-block] [PATCH 0/3] Reduce the number of Valgrind reports in unit tests.

2019-07-30 Thread Andrey Shinkevich
Running unit tests under the Valgrind may help to detect QEMU memory issues (suggested by Denis V. Lunev). Some of the Valgrind reports relate to the unit test code itself. Let's eliminate the detected memory issues to ease locating critical ones. Andrey Shinkevich (3): test-throttle: Fix uninit

Re: [Qemu-block] [PULL 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 16:33, Kevin Wolf wrote: > > The following changes since commit 8517bf84056282ea3e27772d51f76db3a6fa2d26: > > Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-30' > into staging (2019-07-30 14:23:07 +0100) > > are available in the Git repository at:

[Qemu-block] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Andrey Shinkevich
Not the whole structure is initialized before passing it to the KVM. Reduce the number of Valgrind reports. Signed-off-by: Andrey Shinkevich --- target/i386/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index dbbb137..ed57e31 100644 --- a/targ

[Qemu-block] [PATCH 1/3] test-throttle: Fix uninitialized use of burst_length

2019-07-30 Thread Andrey Shinkevich
ThrottleState::cfg of the static variable 'ts' is reassigned with the local one in the do_test_accounting() and then is passed to the throttle_account() with uninitialized member LeakyBucket::burst_length. Signed-off-by: Andrey Shinkevich --- tests/test-throttle.c | 2 ++ 1 file changed, 2 inser

[Qemu-block] [PATCH 2/3] tests: Fix uninitialized byte in test_visitor_in_fuzz

2019-07-30 Thread Andrey Shinkevich
One byte in the local buffer stays uninitialized, at least with the first iteration, because of the double decrement in the test_visitor_in_fuzz(). This is what Valgrind does not like and not critical for the test itself. So, reduce the number of the memory issues reports. Signed-off-by: Andrey Sh

[Qemu-block] [PATCH 0/3] backup fixes for 4.1?

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are two small fixes. 01 is not a degradation at all, so it's OK for 4.2 02 is degradation of 3.0, so it's possibly OK for 4.2 too, but it seems to be real bug and fix is very simple, so, may be 4.1 is better Or you may take the whole series to 4.1 if you want. Vladimir Sement

[Qemu-block] [PATCH 1/3] block/backup: deal with zero detection

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
We have detect_zeroes option, so at least for blockdev-backup user should define it if zero-detection is needed. For drive-backup leave detection enabled by default but do it through existing option instead of open-coding. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 15 +

[Qemu-block] [PATCH 2/3] block/backup: disable copy_range for compressed backup

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Enabled by default copy_range ignores compress option. It's definitely unexpected for user. It's broken since introduction of copy_range usage in backup in 9ded4a011496. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Qemu-block] [PATCH 3/3] block/backup: refactor write_flags

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
write flags are constant, let's store it in BackupBlockJob instead of recalculating. It also makes two boolean fields to be unused, so, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 6:01 PM, Andrey Shinkevich wrote: > Not the whole structure is initialized before passing it to the KVM. > Reduce the number of Valgrind reports. > > Signed-off-by: Andrey Shinkevich > --- > target/i386/kvm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/i386/kvm

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 17:05, Andrey Shinkevich wrote: > > Not the whole structure is initialized before passing it to the KVM. > Reduce the number of Valgrind reports. > > Signed-off-by: Andrey Shinkevich Does it even make sense to try to valgrind a KVM-enabled run of QEMU? As soon as we run th

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Christian Borntraeger
On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: > On 7/30/19 6:01 PM, Andrey Shinkevich wrote: >> Not the whole structure is initialized before passing it to the KVM. >> Reduce the number of Valgrind reports. >> >> Signed-off-by: Andrey Shinkevich >> --- >> target/i386/kvm.c | 3 +++ >> 1 fil

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Christian Borntraeger
On 30.07.19 18:46, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 17:05, Andrey Shinkevich > wrote: >> >> Not the whole structure is initialized before passing it to the KVM. >> Reduce the number of Valgrind reports. >> >> Signed-off-by: Andrey Shinkevich > > Does it even make sense to try to

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 7:05 PM, Christian Borntraeger wrote: > On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: >> On 7/30/19 6:01 PM, Andrey Shinkevich wrote: >>> Not the whole structure is initialized before passing it to the KVM. >>> Reduce the number of Valgrind reports. >>> >>> Signed-off-by: Andrey Shink

[Qemu-block] [PATCH for-4.2 01/13] qcow2: Add Error ** to qcow2_read_snapshots()

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2.h | 2 +- block/qcow2-snapshot.c | 7 ++- block/qcow2.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index fc1b0d3c1e..175708cee0 100644 --- a/block/qcow2.h +++ b/block/qcow2.h

[Qemu-block] [PATCH for-4.2 06/13] qcow2: Separate qcow2_check_read_snapshot_table()

2019-07-30 Thread Max Reitz
Reading the snapshot table can fail. That is a problem when we want to repair the image. Therefore, stop reading the snapshot table in qcow2_do_open() in check mode. Instead, add a new function qcow2_check_read_snapshot_table() that reads the snapshot table at a later point. In the future, we w

[Qemu-block] [PATCH for-4.2 07/13] qcow2: Add qcow2_check_fix_snapshot_table()

2019-07-30 Thread Max Reitz
qcow2_check_read_snapshot_table() can perform consistency checks, but it cannot fix everything. Specifically, it cannot allocate new clusters, because that should wait until the refcount structures are known to be consistent (i.e., after qcow2_check_refcounts()). Thus, it cannot call qcow2_write_

[Qemu-block] [PATCH for-4.2 08/13] qcow2: Fix broken snapshot table entries

2019-07-30 Thread Max Reitz
The only case where we currently reject snapshot table entries is when they have too much extra data. Fix them with qemu-img check -r all by counting it as a corruption, reducing their extra_data_size, and then letting qcow2_check_fix_snapshot_table() do the rest. Signed-off-by: Max Reitz --- b

[Qemu-block] [PATCH for-4.2 05/13] qcow2: Write v3-compliant snapshot list on upgrade

2019-07-30 Thread Max Reitz
qcow2 v3 requires every snapshot table entry to have two extra data fields: The 64-bit VM state size, and the virtual disk size. Both are optional for v2 images, so they may not be present. qcow2_upgrade() therefore should update the snapshot table to ensure all entries have these extra data fiel

[Qemu-block] [PATCH for-4.2 04/13] qcow2: Put qcow2_upgrade() into an own function

2019-07-30 Thread Max Reitz
This does not make sense right now, but it will make sense once we need to do more than to just update s->qcow_version. Signed-off-by: Max Reitz --- block/qcow2.c | 43 ++- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/bloc

[Qemu-block] [PATCH for-4.2 03/13] qcow2: Make qcow2_write_snapshots() public

2019-07-30 Thread Max Reitz
Updating the snapshot list will be useful when upgrading a v2 image to v3, so we will need to call this function in qcow2.c. Signed-off-by: Max Reitz --- block/qcow2.h | 1 + block/qcow2-snapshot.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/blo

[Qemu-block] [PATCH for-4.2 00/13] qcow2: Let check -r all repair some snapshot bits

2019-07-30 Thread Max Reitz
Hi, As Eric reports in https://bugzilla.redhat.com/show_bug.cgi?id=1727347, qemu-img amend has a bug when it comes to converting qcow2 v2 images to v3: In v3, every snapshot table entry requires at least 16 bytes of extra metadata to be present, which isn’t the case for v2 images. Currently, qemu-

[Qemu-block] [PATCH for-4.2 02/13] qcow2: Keep unknown extra snapshot data

2019-07-30 Thread Max Reitz
The qcow2 specification says to ignore unknown extra data fields in snapshot table entries. Currently, we discard it whenever we update the image, which is a bit different from "ignore". This patch makes the qcow2 driver keep all unknown extra data fields when updating an image's snapshot table.

[Qemu-block] [PATCH for-4.2 12/13] iotests: Add peek_file* functions

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 20 1 file changed, 20 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 5502c3da2f..78decfd5d5 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc

[Qemu-block] [PATCH for-4.2 13/13] iotests: Test qcow2's snapshot table handling

2019-07-30 Thread Max Reitz
Add a test how our qcow2 driver handles extra data in snapshot table entries, and how it repairs overly long snapshot tables. Signed-off-by: Max Reitz --- tests/qemu-iotests/261 | 449 + tests/qemu-iotests/261.out | 321 ++ tests/qe

[Qemu-block] [PATCH for-4.2 11/13] qcow2: Fix v3 snapshot table entry compliancy

2019-07-30 Thread Max Reitz
qcow2 v3 images require every snapshot table entry to have at least 16 bytes of extra data. If they do not, let qemu-img check -r all fix it. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/q

[Qemu-block] [PATCH for-4.2 09/13] qcow2: Fix overly long snapshot tables

2019-07-30 Thread Max Reitz
We currently refuse to open qcow2 images with overly long snapshot tables. This patch makes qemu-img check -r all drop all offending entries past what we deem acceptable. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 89 +- 1 file changed, 79 inse

[Qemu-block] [PATCH v8 02/16] qapi/block-core: add option for io_uring

2019-07-30 Thread Aarushi Mehta
Only enumerates option for devices that support it. Since QAPI schema supports io_uring, which is the actual name of the Linux API, it is preferred over io-uring. Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1 dele

[Qemu-block] [PATCH for-4.2 10/13] qcow2: Repair snapshot table with too many entries

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index bd8e56a99e..9e8c7c1f7f 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -430,6 +430,14 @@ int coroutine_

[Qemu-block] [PATCH v8 00/16] Add support for io_uring

2019-07-30 Thread Aarushi Mehta
This patch series adds support for the newly developed io_uring Linux AIO interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, offers efficient buffered asynchronous I/O support, the ability to do I/O without performing a system call via polled I/O, and other efficiency enha

[Qemu-block] [PATCH v8 04/16] block/io_uring: implements interfaces for io_uring

2019-07-30 Thread Aarushi Mehta
Aborts when sqe fails to be set as sqes cannot be returned to the ring. Adds slow path for short reads for older kernels Signed-off-by: Aarushi Mehta Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 7 + block/Makefile.objs | 3 + block/io_uring

[Qemu-block] [PATCH v8 01/16] configure: permit use of io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 714e7fb6a1..493dbc2ec5 100755 --- a/configure +++ b/configure @@ -371,6 +371,7 @@ xen=

[Qemu-block] [PATCH v8 06/16] util/async: add aio interfaces for io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- util/async.c | 36 1 file changed, 36 insertions(+) diff --git a/util/async.c b/util/async.c index 8d2105729c..2e0a5e20ac 100644 --- a/util/async.c +++ b/util/async.c @@ -276,6 +276,14 @@ aio_ctx_

[Qemu-block] [PATCH v8 07/16] blockdev: adds bdrv_parse_aio to use io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block.c | 22 ++ blockdev.c| 12 include/block/block.h | 1 + 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index cbd8da5f3b..401831e28d 1

[Qemu-block] [PATCH v8 11/16] qemu-io: adds option to use aio engine

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qemu-io.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index f64eca6940..0abb4af134 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -130,7 +130,8 @@ static void open_help(void) " -C, -- use copy-on

[Qemu-block] [PATCH v8 09/16] block: add trace events for io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block/io_uring.c | 22 +++--- block/trace-events | 12 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/block/io_uring.c b/block/io_uring.c index b1f14d2461..ba739ebe06 100644 --- a/block/

[Qemu-block] [PATCH v8 03/16] block/block: add BDRV flag for io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- include/block/block.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/block.h b/include/block/block.h index 50a07c1c33..e29baa172c 100644 --- a/include/block/block.h +++ b/include/block/b

[Qemu-block] [PATCH v8 12/16] qemu-img: adds option to use aio engine for benchmarking

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 11 ++- qemu-img.texi| 5 - 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 1c93e6d185..77b5a8dda8 100644 --- a/qemu-img-cmds.hx +++ b/qemu-im

[Qemu-block] [PATCH v8 10/16] block/io_uring: adds userspace completion polling

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block/io_uring.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index ba739ebe06..e2bef380e7 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -238,6 +23

[Qemu-block] [PATCH v8 14/16] tests/qemu-iotests: enable testing with aio options

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/check | 15 ++- tests/qemu-iotests/common.rc | 14 ++ tests/qemu-iotests/iotests.py | 9 - 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/ch

[Qemu-block] [PATCH v8 08/16] block/file-posix.c: extend to use io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- block/file-posix.c | 99 -- 1 file changed, 79 insertions(+), 20 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 4479cc7ab4..4aa42f826f

[Qemu-block] [PATCH v8 05/16] stubs: add stubs for io_uring interface

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + stubs/Makefile.objs | 1 + stubs/io_uring.c| 32 3 files changed, 34 insertions(+) create mode 100644 stubs/io_uring.c diff --git a/MAINTAINERS b/MAINTAINERS index be

[Qemu-block] [PATCH v8 13/16] qemu-nbd: adds option for aio engines

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Acked-by: Eric Blake --- qemu-nbd.c| 12 qemu-nbd.texi | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index a8cb39e510..7bb479f3c0 100644 --- a/qemu-nbd.c +++ b/qemu-nb

[Qemu-block] [PATCH v8 15/16] tests/qemu-iotests: use AIOMODE with various tests

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/028 | 3 ++- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/089 | 4 ++-- tests/qemu-iotests/091 | 7 --- tests/qemu-iotests/109 | 3 ++- tests/qemu-iotests/147 | 5 +++-- tests/qemu-iotests/181 | 10 ++

  1   2   >