Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The error_report API doesn't want trailing newline characters. > Remove it, to avoid and error when moving the code around: > > ERROR: Error messages should not contain newlines Commit 312fd5f2909 has a Coccinelle script. It should be committed and re-run. >

Re: [PULL 00/15] Pull migration patches

2020-02-28 Thread Peter Maydell
On Fri, 28 Feb 2020 at 09:25, Juan Quintela wrote: > > The following changes since commit 8b6b68e05b43f976714ca1d2afe01a64e1d82cba: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2020-02-27 19:15:15 +) > > are available in the Git repository at: > >

[PATCH] scsi/qemu-pr-helper: Fix out-of-bounds access to trnptid_list[]

2020-02-28 Thread Christophe de Dinechin
Compile error reported by gcc 10.0.1: scsi/qemu-pr-helper.c: In function ‘multipath_pr_out’: scsi/qemu-pr-helper.c:523:32: error: array subscript is outside array bounds of ‘struct transportid *[0]’ [-Werror=array-bounds] 523 | paramp.trnptid_list[paramp.num_transportid++] = id;

Re: [PATCH v3 1/4] scripts/simplebench: add simplebench.py

2020-02-28 Thread Vladimir Sementsov-Ogievskiy
28.02.2020 16:03, Aleksandar Markovic wrote: On Fri, Feb 28, 2020 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: Add simple benchmark table creator. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/simplebench.py | 128 + 1 file changed, 128

Re: [PATCH v3 3/4] scripts/simplebench: add example usage of simplebench

2020-02-28 Thread Aleksandar Markovic
On Fri, Feb 28, 2020 at 8:21 AM Vladimir Sementsov-Ogievskiy wrote: > > 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

Re: [PATCH v3 4/4] MAINTAINERS: add simplebench

2020-02-28 Thread Aleksandar Markovic
On Fri, Feb 28, 2020 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Aleksandar Markovic > MAINTAINERS | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5e5e3e52d6..16d069adc5

Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Liam Merwick
On 28/02/2020 12:36, Philippe Mathieu-Daudé wrote: The error_report API doesn't want trailing newline characters. Remove it, to avoid and error when moving the code around: s/and/an/ ERROR: Error messages should not contain newlines Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH v3 2/4] scripts/simplebench: add qemu/bench_block_job.py

2020-02-28 Thread Aleksandar Markovic
On Fri, Feb 28, 2020 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: > > Add block-job benchmarking helper functions. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Aleksandar Markovic > scripts/simplebench/bench_block_job.py | 119 + > 1 file

Re: [PATCH v3 1/4] scripts/simplebench: add simplebench.py

2020-02-28 Thread Aleksandar Markovic
On Fri, Feb 28, 2020 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: > > Add simple benchmark table creator. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > scripts/simplebench/simplebench.py | 128 + > 1 file changed, 128 insertions(+) > create mode 100644

[PATCH 2/2] block/qcow2: Move bitmap reopen into bdrv_reopen_commit_post

2020-02-28 Thread Peter Krempa
The bitmap code requires writing the 'file' child when the qcow2 driver is reopened in read-write mode. If the 'file' child is being reopened due to a permissions change, the modification is commited yet when qcow2_reopen_commit is called. This means that any attempt to write the 'file' child

[PATCH 1/2] block: Introduce 'bdrv_reopen_commit_post' step

2020-02-28 Thread Peter Krempa
Add another step in the reopen process where driver can execute code after permission changes are comitted. Signed-off-by: Peter Krempa --- block.c | 9 + include/block/block_int.h | 1 + 2 files changed, 10 insertions(+) diff --git a/block.c b/block.c index

[PATCH 0/2] block/qcow2: Fix bitmap reopen with 'auto-read-only' file child

2020-02-28 Thread Peter Krempa
See patch 2/2 for explanation. Also please excuse the lack of tests caused by my ignorance of not figuring out where to put them. Peter Krempa (2): block: Introduce 'bdrv_reopen_commit_post' step block/qcow2: Move bitmap reopen into bdrv_reopen_commit_post block.c | 9

[PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Philippe Mathieu-Daudé
The error_report API doesn't want trailing newline characters. Remove it, to avoid and error when moving the code around: ERROR: Error messages should not contain newlines Signed-off-by: Philippe Mathieu-Daudé --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v1 3/8] qcow2: add zstd cluster compression

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 17:18, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 17:11, Denis Plotnikov wrote: On 27.02.2020 12:55, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression

Re: [PATCH v1 4/8] iotests: filter out compression_type

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 17:03, Eric Blake wrote: On 2/27/20 1:29 AM, Denis Plotnikov wrote: After adding compression type feature to qcow2 format, qemu framework commands reporting the image settingd, e.g. "qemu-img create", started settings reporting the compression type for the image which

Re: Strange data corruption issue with gluster (libgfapi) and ZFS

2020-02-28 Thread Stefan Ring
On Fri, Feb 28, 2020 at 12:10 PM Kevin Wolf wrote: > > This sounds almost like two other bugs we got fixed recently (in the > QEMU file-posix driver and in the XFS kernel driver) where two write > extending the file size were in flight in parallel, but if the shorter > one completed last, instead

Re: [PATCH v1 3/8] qcow2: add zstd cluster compression

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 17:01, Eric Blake wrote: On 2/27/20 1:29 AM, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only

Re: [PATCH v2 00/20] Add qemu-storage-daemon

2020-02-28 Thread Stefan Hajnoczi
On Mon, Feb 24, 2020 at 03:29:48PM +0100, Kevin Wolf wrote: > This series adds a new tool 'qemu-storage-daemon', which can be used to > export and perform operations on block devices. There is some overlap > between qemu-img/qemu-nbd and the new qemu-storage-daemon, but there are > a few important

Re: Strange data corruption issue with gluster (libgfapi) and ZFS

2020-02-28 Thread Kevin Wolf
Am 27.02.2020 um 23:25 hat Stefan Ring geschrieben: > On Thu, Feb 27, 2020 at 10:12 PM Stefan Ring wrote: > > Victory! I have a reproducer in the form of a plain C libgfapi client. > > > > However, I have not been able to trigger corruption by just executing > > the simple pattern in an

Re: [RFC v2] nbd/proto: introduce extended request and 64bit commands

2020-02-28 Thread Vladimir Sementsov-Ogievskiy
ping 06.02.2020 18:15, Vladimir Sementsov-Ogievskiy wrote: Introduce a request type with payload. Use it to add 64bit support to data-less commands. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v1 was "[PATCH 0/2] Structured requests and 64bit commands" v2: - don't touch structured

[PULL 15/15] savevm: Don't call colo_init_ram_cache twice

2020-02-28 Thread Juan Quintela
From: zhanghailiang This helper has been called twice which is wrong. Left the one where called while get COLO enable message from source side. Signed-off-by: zhanghailiang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c | 5 - 1 file changed, 5

[PULL 12/15] migration/block: rename BLOCK_SIZE macro

2020-02-28 Thread Juan Quintela
From: Stefan Hajnoczi Both and define BLOCK_SIZE macros. Avoiding using that name in block/migration.c. I noticed this when including (Linux io_uring) from "block/aio.h" and compilation failed. Although patches adding that include haven't been sent yet, it makes sense to rename the macro

[PULL 11/15] migration/savevm: release gslist after dump_vmstate_json

2020-02-28 Thread Juan Quintela
From: Pan Nengyuan 'list' forgot to free at the end of dump_vmstate_json_to_file(), although it's called only once, but seems like a clean code. Fix the leak as follow: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fb946abd768 in __interceptor_malloc

[PULL 14/15] migration/colo: wrap incoming checkpoint process into new helper

2020-02-28 Thread Juan Quintela
From: zhanghailiang Split checkpoint incoming process into a helper. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/colo.c | 260 --- 1 file changed, 133

[PULL 10/15] test-vmstate: Fix memleaks in test_load_qlist

2020-02-28 Thread Juan Quintela
From: Chen Qun There is memleak in test_load_qlist().It's not a big deal, but test-vmstate will fail if sanitizers is enabled. In addition, "ret" is written twice with the same value in test_gtree_load_iommu(). Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Juan Quintela

[PULL 08/15] multifd: Add zstd compression multifd support

2020-02-28 Thread Juan Quintela
Signed-off-by: Juan Quintela Acked-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- hw/core/qdev-properties.c| 2 +- migration/Makefile.objs | 1 + migration/multifd-zstd.c | 339 +++ migration/multifd.h | 1 +

[PULL 13/15] migration: fix COLO broken caused by a previous commit

2020-02-28 Thread Juan Quintela
From: zhanghailiang This commit "migration: Create migration_is_running()" broke COLO. Becuase there is a process broken by this commit. colo_process_checkpoint ->colo_do_checkpoint_transaction ->migrate_set_block_enabled ->qmp_migrate_set_capabilities It can be fixed by make COLO

[PULL 05/15] multifd: Add zlib compression multifd support

2020-02-28 Thread Juan Quintela
Signed-off-by: Juan Quintela Acked-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- hw/core/qdev-properties.c| 2 +- migration/Makefile.objs | 1 + migration/multifd-zlib.c | 325 +++ migration/multifd.c | 6 +

[PULL 07/15] multifd: Add multifd-zstd-level parameter

2020-02-28 Thread Juan Quintela
This parameter specifies the zstd compression level. The next patch will put it to use. Signed-off-by: Juan Quintela Reviewed-by: Peter Xu Acked-by: Markus Armbruster --- migration/migration.c | 24 migration/migration.h | 1 + monitor/hmp-cmds.c| 4

[PULL 09/15] migration/vmstate: Remove redundant statement in vmstate_save_state_v()

2020-02-28 Thread Juan Quintela
From: Chen Qun The "ret" has been assigned in all branches. It didn't need to be assigned separately. Clang static code analyzer show warning: migration/vmstate.c:365:17: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot

[PULL 06/15] configure: Enable test and libs for zstd

2020-02-28 Thread Juan Quintela
Add it to several build systems to make testing good. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- .gitlab-ci.yml| 1 + .travis.yml | 1 + configure | 30

[PULL 04/15] multifd: Add multifd-zlib-level parameter

2020-02-28 Thread Juan Quintela
This parameter specifies the zlib compression level. The next patch will put it to use. Signed-off-by: Juan Quintela Acked-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 migration/migration.h | 1 + monitor/hmp-cmds.c|

[PULL 02/15] migration: Add support for modules

2020-02-28 Thread Juan Quintela
So we don't have to compile everything in, or have ifdefs Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/qemu/module.h | 2 ++ softmmu/vl.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index

[PULL 03/15] multifd: Make no compression operations into its own structure

2020-02-28 Thread Juan Quintela
It will be used later. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- No comp value needs to be zero. --- migration/migration.c | 9 ++ migration/migration.h | 1 + migration/multifd.c | 185 -- migration/multifd.h | 26

[PULL 01/15] multifd: Add multifd-compression parameter

2020-02-28 Thread Juan Quintela
This will store the compression method to use. We start with none. Signed-off-by: Juan Quintela Acked-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- Rename multifd-method to multifd-compression --- hw/core/qdev-properties.c| 13 + include/hw/qdev-properties.h

[PULL 00/15] Pull migration patches

2020-02-28 Thread Juan Quintela
The following changes since commit 8b6b68e05b43f976714ca1d2afe01a64e1d82cba: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-02-27 19:15:15 +) are available in the Git repository at: https://github.com/juanquintela/qemu.git

Re: [PATCH v1 1/8] qcow2: introduce compression type feature

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 16:48, Eric Blake wrote: On 2/27/20 1:29 AM, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to Qcow2 that indicates which allow to use different compression to qcow2, allowing the use of different methods for image

Re: [PATCH v1 8/8] iotests: 287: add qcow2 compression type test

2020-02-28 Thread Vladimir Sementsov-Ogievskiy
28.02.2020 11:23, Denis Plotnikov wrote: On 27.02.2020 13:29, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov

Re: [PATCH v1 8/8] iotests: 287: add qcow2 compression type test

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 13:29, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov ---   tests/qemu-iotests/287 | 123

Re: [PATCH v1 6/8] iotests: add "compression type" for test output matching

2020-02-28 Thread Denis Plotnikov
On 27.02.2020 13:09, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 13:04, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: Affected tests: 049, 060, 061, 065, 144, 182, 242, 255 After adding the compression type feature for qcow2, the compression type is