Re: [PATCH 3/9] monitor: move hmp_drive_del and hmp_commit to blockdev-hmp-cmds.c

2019-11-26 Thread Markus Armbruster
Maxim Levitsky writes: > Signed-off-by: Maxim Levitsky > --- > blockdev-hmp-cmds.c | 97 - > blockdev.c | 95 > 2 files changed, 96 insertions(+), 96 deletions(-) hmp_drive_add() and

Re: [PATCH 3/9] monitor: move hmp_drive_del and hmp_commit to blockdev-hmp-cmds.c

2019-11-26 Thread Markus Armbruster
Maxim Levitsky writes: > Signed-off-by: Maxim Levitsky > --- > blockdev-hmp-cmds.c | 97 - > blockdev.c | 95 > 2 files changed, 96 insertions(+), 96 deletions(-) > > diff --git

Re: [PATCH 5/9] monitor: move hmp_block_job* to blockdev-hmp-cmd.c

2019-11-26 Thread Markus Armbruster
Maxim Levitsky writes: > Signed-off-by: Maxim Levitsky > --- > blockdev-hmp-cmds.c | 52 + > monitor/hmp-cmds.c | 52 - > 2 files changed, 52 insertions(+), 52 deletions(-) > > diff --git

Re: [PATCH 4/9] monitor: move hmp_drive_mirror and hmp_drive_backup to blockdev-hmp-cmds.c

2019-11-26 Thread Markus Armbruster
Maxim Levitsky writes: > Signed-off-by: Maxim Levitsky > --- > blockdev-hmp-cmds.c | 61 + > monitor/hmp-cmds.c | 58 -- > 2 files changed, 61 insertions(+), 58 deletions(-) Licensing issue:

Re: [PATCH 1/9] monitor: uninline add_init_drive

2019-11-26 Thread Markus Armbruster
Maxim Levitsky writes: > This is only used by hmp_drive_add. > The code is just a bit shorter this way. > > No functional changes > > Signed-off-by: Maxim Levitsky > --- > device-hotplug.c | 33 + > 1 file changed, 13 insertions(+), 20 deletions(-) > > diff

[PATCH V2] throttle-groups: fix memory leak in throttle_group_set_limit:

2019-11-26 Thread pannengyuan
From: PanNengyuan This avoid a memory leak when qom-set is called to set throttle_group limits, here is an easy way to reproduce: 1. run qemu-iotests as follow and check the result with asan: ./check -qcow2 184 Following is the asan output backtrack: Direct leak of 912 byte(s) in 3

Re: [PATCH] throttle-groups: fix memory leak in throttle_group_set_limits

2019-11-26 Thread pannengyuan
Thanks, I think it can be removed, I will send a new version later. On 2019/11/26 17:59, Alberto Garcia wrote: > On Tue 26 Nov 2019 09:17:02 AM CET, pannengy...@huawei.com wrote: >> --- a/block/throttle-groups.c >> +++ b/block/throttle-groups.c >> @@ -912,6 +912,7 @@ static void

Re: [PATCH v2 1/1] ide: check DMA transfer size in ide_dma_cb() to prevent qemu DoS from quests

2019-11-26 Thread Kevin Wolf
Am 26.11.2019 um 22:24 hat Alexander Popov geschrieben: > Hello Kevin, > > Thanks for your review, > > On 21.11.2019 18:03, Kevin Wolf wrote: > > Am 14.11.2019 um 18:25 hat Alexander Popov geschrieben: > >> The commit a718978ed58a from July 2015 introduced the assertion which > >> implies that

Re: [PATCH v2 1/1] ide: check DMA transfer size in ide_dma_cb() to prevent qemu DoS from quests

2019-11-26 Thread Alexander Popov
Hello Kevin, Thanks for your review, On 21.11.2019 18:03, Kevin Wolf wrote: > Am 14.11.2019 um 18:25 hat Alexander Popov geschrieben: >> The commit a718978ed58a from July 2015 introduced the assertion which >> implies that the size of successful DMA transfers handled in ide_dma_cb() >> should be

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/26/19 10:26 AM, Kevin Wolf wrote: > >>> Actually, your patch fails to diagnose: >>> >>> $ qemu-img create -o size=1m,size=2m -f qcow2 x.qcow2 >>> Formatting 'x.qcow2', fmt=qcow2 size=2097152 cluster_size=65536 >>> lazy_refcounts=off refcount_bits=16 >>> >>> so you may

Re: [PULL 0/2] Block patches for 4.2.0-rc3

2019-11-26 Thread Peter Maydell
On Tue, 26 Nov 2019 at 13:29, Max Reitz wrote: > > The following changes since commit 4ecc984210ca1bf508a96a550ec8a93a5f833f6c: > > Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.2-rc3' > into staging (2019-11-26 12:36:40 +) > > are available in the Git repository at:

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 10:26 AM, Kevin Wolf wrote: Actually, your patch fails to diagnose: $ qemu-img create -o size=1m,size=2m -f qcow2 x.qcow2 Formatting 'x.qcow2', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16 so you may want to enhance this patch to also catch the

Re: [PATCH v0 1/2] qdev-properties-system: extend set_pionter for unrealized devices

2019-11-26 Thread Kevin Wolf
Am 26.11.2019 um 07:49 hat Denis Plotnikov geschrieben: > > > On 25.11.2019 18:30, Eduardo Habkost wrote: > > On Fri, Nov 22, 2019 at 11:36:30AM +, Denis Plotnikov wrote: > >> > >> On 18.11.2019 21:54, Eduardo Habkost wrote: > >>> On Sun, Nov 10, 2019 at 10:03:09PM +0300, Denis Plotnikov

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Kevin Wolf
Am 26.11.2019 um 16:56 hat Eric Blake geschrieben: > On 11/26/19 9:54 AM, Eric Blake wrote: > > On 11/26/19 9:48 AM, Kevin Wolf wrote: > > > If both the create options (qemu-img create -o ...) and the size > > > parameter were given, the size parameter was silently ignored. Instead, > > > make

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 9:54 AM, Eric Blake wrote: On 11/26/19 9:48 AM, Kevin Wolf wrote: If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf ---   block.c

[PATCH for-5.0 v2 1/3] python: add simplebench.py

2019-11-26 Thread Vladimir Sementsov-Ogievskiy
Add simple benchmark table creator. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/simplebench.py | 128 ++ 1 file changed, 128 insertions(+) create mode 100644 python/simplebench.py diff --git a/python/simplebench.py b/python/simplebench.py new

[PATCH for-5.0 v2 2/3] python: add qemu/bench_block_job.py

2019-11-26 Thread Vladimir Sementsov-Ogievskiy
Add block-job benchmarking helper functions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/bench_block_job.py | 115 + 1 file changed, 115 insertions(+) create mode 100755 python/qemu/bench_block_job.py diff --git a/python/qemu/bench_block_job.py

[PATCH for-5.0 v2 0/3] benchmark util

2019-11-26 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is simple benchmarking utility, to generate performance comparison tables, like the following: -- - - - backup-1 backup-2 mirror ssd -> ssd 0.43 +- 0.00 4.48 +- 0.06 4.38 +- 0.02 ssd -> hdd 10.60 +- 0.08

Re: [PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Eric Blake
On 11/26/19 9:48 AM, Kevin Wolf wrote: If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf --- block.c| 10 --

[PATCH for-5.0 v2 3/3] python: add example usage of simplebench

2019-11-26 Thread Vladimir Sementsov-Ogievskiy
This example may be used as a template for custom benchmark. It illustrates three things to prepare: - define bench_func - define test environments (columns) - define test cases (rows) And final call of simplebench API. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/bench-example.py

Re: [PATCH v9 1/3] block: introduce compress filter driver

2019-11-26 Thread Eric Blake
On 11/26/19 8:43 AM, Andrey Shinkevich wrote: Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job.

[PATCH] block: Error out on image creation with conflicting size options

2019-11-26 Thread Kevin Wolf
If both the create options (qemu-img create -o ...) and the size parameter were given, the size parameter was silently ignored. Instead, make specifying two sizes an error. Signed-off-by: Kevin Wolf --- block.c| 10 -- tests/qemu-iotests/049 | 5 +

[PATCH v9 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-26 Thread Andrey Shinkevich
QEMU currently supports writing compressed data of the size equal to one cluster. This patch allows writing QCOW2 compressed data that exceed one cluster. Now, we split buffered data into separate clusters and write them compressed using the block/aio_task API. Suggested-by: Pavel Butsykin

[PATCH v9 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-26 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v9 0/3] qcow2: advanced compression options

2019-11-26 Thread Andrey Shinkevich
The compression filter driver is introduced as suggested by Max. A sample usage of the filter can be found in the test #214. Now, multiple clusters can be written compressed. It is useful for the backup job. v9: The filter functions unrelated to the 'file' child were removed. The check for

[PATCH v9 1/3] block: introduce compress filter driver

2019-11-26 Thread Andrey Shinkevich
Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job. Suggested-by: Max Reitz Signed-off-by: Andrey

Re: API definition for LUKS key management [V2]

2019-11-26 Thread Kevin Wolf
Am 25.11.2019 um 19:45 hat Max Reitz geschrieben: > On 22.11.19 15:22, Maxim Levitsky wrote: > > Hi! > > > > This is the second version of the proposed QMP API for key management, > > after discussion with Keven and Max. > > > > Will this work? > > > > Adding Peter Krempa to CC, to hear his

Re: [PATCH 1/4] block/io: fix bdrv_co_block_status_above

2019-11-26 Thread Kevin Wolf
Am 26.11.2019 um 08:26 hat Vladimir Sementsov-Ogievskiy geschrieben: > 25.11.2019 19:00, Kevin Wolf wrote: > > Am 16.11.2019 um 17:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> bdrv_co_block_status_above has several problems with handling short > >> backing files: > >> > >> 1. With

[PATCH] throttle-groups: fix memory leak in throttle_group_set_limits

2019-11-26 Thread pannengyuan
From: PanNengyuan This avoid a memory leak when qom-set is called to set throttle_group limits, here is an easy way to reproduce: 1. run qemu-iotests as follow and check the result with asan: ./check -qcow2 184 Following is the asan output backtrack: Direct leak of 912 byte(s) in 3

Re: [PATCH] blockjob: Fix error message for negative speed

2019-11-26 Thread Alberto Garcia
On Tue 26 Nov 2019 02:42:22 PM CET, Kevin Wolf wrote: > The error message for a negative speed uses QERR_INVALID_PARAMETER, > which implies that the 'speed' option doesn't even exist: > > {"error": {"class": "GenericError", "desc": "Invalid parameter 'speed'"}} > > Make it use

[PATCH] blockjob: Fix error message for negative speed

2019-11-26 Thread Kevin Wolf
The error message for a negative speed uses QERR_INVALID_PARAMETER, which implies that the 'speed' option doesn't even exist: {"error": {"class": "GenericError", "desc": "Invalid parameter 'speed'"}} Make it use QERR_INVALID_PARAMETER_VALUE instead: {"error": {"class": "GenericError",

[PULL 1/2] block/qcow2-bitmap: fix bitmap migration

2019-11-26 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Fix bitmap migration with dirty-bitmaps capability enabled and shared storage. We should ignore IN_USE bitmaps in the image on target, when migrating bitmaps through migration channel, see new comment below. Fixes: 74da6b943565c451 Signed-off-by: Vladimir

[PULL 2/2] iotests: add new test cases to bitmap migration

2019-11-26 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Add optional pre-shutdown: shutdown/launch vm before migration. This leads to storing persistent bitmap to the storage, which breaks migration with dirty-bitmaps capability enabled and shared storage until fixed by previous commit. Signed-off-by: Vladimir

[PULL 0/2] Block patches for 4.2.0-rc3

2019-11-26 Thread Max Reitz
The following changes since commit 4ecc984210ca1bf508a96a550ec8a93a5f833f6c: Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.2-rc3' into staging (2019-11-26 12:36:40 +) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PATCH for-4.2 0/2] Fix bitmap migration

2019-11-26 Thread Max Reitz
On 25.11.19 13:52, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > We've faced a bug in rhev-2.12.0-33.el7-based Qemu. > In upstream, bug introduced in 4.0 by 74da6b943565c45 > "block/dirty-bitmaps: implement inconsistent bit" commit. > At this commit we started to load inconsistent bitmap

Re: [PATCH] throttle-groups: fix memory leak in throttle_group_set_limits

2019-11-26 Thread Alberto Garcia
On Tue 26 Nov 2019 09:17:02 AM CET, pannengy...@huawei.com wrote: > --- a/block/throttle-groups.c > +++ b/block/throttle-groups.c > @@ -912,6 +912,7 @@ static void throttle_group_set_limits(Object *obj, > Visitor *v, > unlock: > qemu_mutex_unlock(>lock); > ret: > +

Re: API definition for LUKS key management [V2]

2019-11-26 Thread Maxim Levitsky
On Mon, 2019-11-25 at 19:45 +0100, Max Reitz wrote: > On 22.11.19 15:22, Maxim Levitsky wrote: > > Hi! > > > > This is the second version of the proposed QMP API for key management, > > after discussion with Keven and Max. > > > > Will this work? > > > > Adding Peter Krempa to CC, to hear his

Re: [PATCH v2 15/20] nvme: add support for scatter gather lists

2019-11-26 Thread Klaus Birkelund
On Mon, Nov 25, 2019 at 02:10:37PM +, Beata Michalska wrote: > On Mon, 25 Nov 2019 at 06:21, Klaus Birkelund wrote: > > > > On Tue, Nov 12, 2019 at 03:25:18PM +, Beata Michalska wrote: > > > Hi Klaus, > > > > > > On Tue, 15 Oct 2019 at 11:57, Klaus Jensen wrote: > > > > > > > > +#define

Re: [PATCH v2 12/20] nvme: bump supported specification version to 1.3

2019-11-26 Thread Klaus Birkelund
On Mon, Nov 25, 2019 at 12:13:15PM +, Beata Michalska wrote: > On Mon, 18 Nov 2019 at 09:48, Klaus Birkelund wrote: > > > > On Tue, Nov 12, 2019 at 03:05:06PM +, Beata Michalska wrote: > > > Hi Klaus, > > > > > > On Tue, 15 Oct 2019 at 11:52, Klaus Jensen wrote: > > > > > > > > +static

Re: [PATCH for-5.0 v4 0/5] iotests: Test failing mirror complete

2019-11-26 Thread Max Reitz
On 08.11.19 13:34, Max Reitz wrote: > Hi, > > v3 of this series was this: > > https://lists.nongnu.org/archive/html/qemu-block/2019-10/msg00868.html > > In the meantime, I’ve merged the first patch, so the subject of the > series has changed. > > In v4, I’ve tried to address Vladimir’s concern