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

2020-02-27 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 ---

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
Add simple benchmark table creator. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/simplebench.py | 128 + 1 file changed, 128 insertions(+) create mode 100644 scripts/simplebench/simplebench.py diff --git a/scripts/simplebench/simplebench.py

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
Add block-job benchmarking helper functions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench_block_job.py | 119 + 1 file changed, 119 insertions(+) create mode 100755 scripts/simplebench/bench_block_job.py diff --git

[PATCH v3 0/4] benchmark util

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
Hi all! v3: move all to scripts/simplebench add myself as a maintainer of this thing Here is simple benchmarking utility, to generate performance comparison tables, like the following: -- - - - backup-1 backup-2 mirror

[PATCH v3 4/4] MAINTAINERS: add simplebench

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5e5e3e52d6..16d069adc5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2038,6 +2038,11 @@ F: python/qemu/*py F: scripts/*.py F: tests/*.py

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 23:09, Eduardo Habkost wrote: Sorry, this is due to lack of bandwidth of maintainers who can review those patches. I have one suggestion: if you make your script self-contained inside a scripts/ subdirectory, it would be simpler to merge it without detailed reviews from others.

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

2020-02-27 Thread Stefan Ring
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 artificial way. Currently, I need to feed my > reproducer 2 GB of data

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

2020-02-27 Thread Stefan Ring
On Tue, Feb 25, 2020 at 3:12 PM Stefan Ring wrote: > > I find many instances with the following pattern: > > current file length (= max position + size written): p > write request n writes from (p + hole_size), thus leaving a hole > request n+1 writes exactly hole_size, starting from p, thus

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

2020-02-27 Thread Eduardo Habkost
Sorry, this is due to lack of bandwidth of maintainers who can review those patches. I have one suggestion: if you make your script self-contained inside a scripts/ subdirectory, it would be simpler to merge it without detailed reviews from others. The python/ subdirectory is supposed to appear

Re: [PATCH 3/3] iotests/138: Test leaks/corruptions fixed report

2020-02-27 Thread Eric Blake
On 2/27/20 11:02 AM, Max Reitz wrote: Test that qemu-img check reports the number of leaks and corruptions fixed in its JSON report (after a successful run). Signed-off-by: Max Reitz --- tests/qemu-iotests/138 | 41 -- tests/qemu-iotests/138.out | 14

Re: [PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-02-27 Thread Eric Blake
On 2/27/20 11:02 AM, Max Reitz wrote: Similarly to peek_file_[bl]e, we may want to write binary integers into a file. Currently, this often means messing around with poke_file and raw binary strings. I hope these functions make it a bit more comfortable. Signed-off-by: Max Reitz ---

[PATCH 1/2] qcow2: Make Qcow2AioTask store the full host offset

2020-02-27 Thread Alberto Garcia
The file_cluster_offset field of Qcow2AioTask stores a cluster-aligned host offset. In practice this is not very useful because all users(*) of this structure need the final host offset into the cluster, which they calculate using host_offset = file_cluster_offset + offset_into_cluster(s,

[PATCH 2/2] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-02-27 Thread Alberto Garcia
qcow2_get_cluster_offset() takes an (unaligned) guest offset and returns the (aligned) offset of the corresponding cluster in the qcow2 image. In practice none of the callers need to know where the cluster starts so this patch makes the function calculate and return the final host offset

[PATCH 0/2] Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-02-27 Thread Alberto Garcia
Hi, this is something I did while working on the subcluster series but it's independent from it so I thought to send it already. In short: qcow2_get_cluster_offset() returns a host cluster offset but none of the callers actually wants the offset of the cluster, they want the host offset into the

[PATCH 0/2] block: bdrv_reopen() with backing file in different AioContext

2020-02-27 Thread Kevin Wolf
Kevin Wolf (2): iotests: Refactor blockdev-reopen test for iothreads block: bdrv_reopen() with backing file in different AioContext block.c| 36 +- tests/qemu-iotests/245 | 40 --

[PATCH 2/2] block: bdrv_reopen() with backing file in different AioContext

2020-02-27 Thread Kevin Wolf
This patch allows bdrv_reopen() (and therefore the x-blockdev-reopen QMP command) to attach a node as the new backing file even if the node is in a different AioContext than the parent if one of both nodes can be moved to the AioContext of the other node. Signed-off-by: Kevin Wolf --- block.c

[PATCH 1/2] iotests: Refactor blockdev-reopen test for iothreads

2020-02-27 Thread Kevin Wolf
We'll want to test more than one successful case in the future, so prepare the test for that by a refactoring that runs each scenario in a separate VM. test_iothreads_switch_{backing,overlay} currently produce errors, but these are cases that should actually work, by switching either the backing

[PATCH 0/3] qemu-img: Fix check's leak/corruption fix report

2020-02-27 Thread Max Reitz
(Cc-ing Eric because of patch 2, mostly) Hi, While reviewing the “fix two small memleaks” series (<20200227012950.12256-1-pannengy...@huawei.com>) I noticed that we save ImageCheck.(leaks|corruptions)_fixed from the first run and overwrite the values obtained in the second run (where they must

[PATCH 3/3] iotests/138: Test leaks/corruptions fixed report

2020-02-27 Thread Max Reitz
Test that qemu-img check reports the number of leaks and corruptions fixed in its JSON report (after a successful run). Signed-off-by: Max Reitz --- tests/qemu-iotests/138 | 41 -- tests/qemu-iotests/138.out | 14 + 2 files changed, 53

[PATCH 1/3] qemu-img: Fix check's leak/corruption fix report

2020-02-27 Thread Max Reitz
There are two problems with qemu-img check's report on how many leaks and/or corruptions have been fixed: (1) ImageCheck.has_leaks_fixed and ImageCheck.has_corruptions_fixed are only true when ImageCheck.leaks or ImageCheck.corruptions (respectively) are non-zero. qcow2's check implementation

[PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-02-27 Thread Max Reitz
Similarly to peek_file_[bl]e, we may want to write binary integers into a file. Currently, this often means messing around with poke_file and raw binary strings. I hope these functions make it a bit more comfortable. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 37

Re: [PATCH v2 0/2] fix two small memleaks

2020-02-27 Thread Max Reitz
On 27.02.20 02:29, Pan Nengyuan wrote: > This series fix two small memleaks. > 1. 'crypto_opts' forgot to free in qcow2_close(), do this cleanup in > qcow2_close(); > 2. Do free filename/format in collect_image_check() when we re-allocate it. > > v2->v1: > - Instead of freeing part of fields

Re: [PATCH] qcow2: Explicit mention of padding bytes

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 17:45, Eric Blake wrote: Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 just added one byte and relied on the earlier text for implicitly covering 7 padding bytes. For consistency with other parts of the header, it does not

Re: [PATCH] qcow2: Explicit mention of padding bytes

2020-02-27 Thread Max Reitz
On 27.02.20 15:45, Eric Blake wrote: > Although we already covered the need for padding bytes with our > changes in commit 3ae3fcfa, commit 66fcbca5 just added one byte and > relied on the earlier text for implicitly covering 7 padding bytes. > For consistency with other parts of the header,

Re: [PULL 24/31] fuzz: support for fork-based fuzzing.

2020-02-27 Thread Alexander Bulekov
On 200224 1135, Stefan Hajnoczi wrote: > On Sat, Feb 22, 2020 at 05:34:29AM -0600, Eric Blake wrote: > > On 2/22/20 2:50 AM, Stefan Hajnoczi wrote: > > > From: Alexander Bulekov > > > > > > fork() is a simple way to ensure that state does not leak in between > > > fuzzing runs. Unfortunately,

[PATCH] qcow2: Explicit mention of padding bytes

2020-02-27 Thread Eric Blake
Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 just added one byte and relied on the earlier text for implicitly covering 7 padding bytes. For consistency with other parts of the header, it does not hurt to be explicit that this version

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

2020-02-27 Thread Eric Blake
On 2/27/20 8:30 AM, Vladimir Sementsov-Ogievskiy wrote: But what is the benefit? We have already documented padding in the spec, and discussed it so much time... What is the problem with padding? And why to add 8 bytes for every new feature which needs only one byte? Okay, so requiring an

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 17:13, Eric Blake wrote: On 2/27/20 7:59 AM, Vladimir Sementsov-Ogievskiy wrote: Hmm - I think it may be worth a tweak to qcow2.txt to call out: 104: compression_type 105 - 111: padding, must be 0 or else call out: 104-111: compression type and just blindly use all 8 bytes for

Re: [PATCH v6 8/9] iotests: don't use 'format' for drive_add

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > It shadows (with a different type) the built-in format. > Use something else. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/055| 3 ++- > tests/qemu-iotests/iotests.py | 6 +++--- > 2 files changed, 5 insertions(+), 4 deletions(-)

Re: [PATCH v6 6/9] iotests: use python logging for iotests.log()

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > We can turn logging on/off globally instead of per-function. > > Remove use_log from run_job, and use python logging to turn on > diffable output when we run through a script entry point. > > iotest 245 changes output order due to buffering reasons. > >

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
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 performance maintaining the same level of the compression ratio in

Re: [PATCH v6 7/9] iotests: ignore import warnings from pylint

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 1:06 AM, John Snow wrote: The right way to solve this is to come up with a virtual environment infrastructure that sets all the paths correctly, and/or to create installable python modules that can be imported normally. That's hard, so just silence this error for now. I'm tempted

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

2020-02-27 Thread Eric Blake
On 2/27/20 7:59 AM, Vladimir Sementsov-Ogievskiy wrote: Hmm - I think it may be worth a tweak to qcow2.txt to call out: 104: compression_type 105 - 111: padding, must be 0 or else call out: 104-111: compression type and just blindly use all 8 bytes for the value even though really only 1

Re: [PATCH v6 8/9] iotests: don't use 'format' for drive_add

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 1:06 AM, John Snow wrote: It shadows (with a different type) the built-in format. Use something else. Signed-off-by: John Snow --- tests/qemu-iotests/055| 3 ++- tests/qemu-iotests/iotests.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v6 9/9] iotests: add pylintrc file

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 1:06 AM, John Snow wrote: Repeatable results. run `pylint iotests.py` and you should get a pass. Signed-off-by: John Snow --- tests/qemu-iotests/pylintrc | 20 1 file changed, 20 insertions(+) create mode 100644 tests/qemu-iotests/pylintrc diff --git

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

2020-02-27 Thread Denis Plotnikov
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 performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment,

Re: [PATCH v6 4/9] iotest 258: use script_main

2020-02-27 Thread Philippe Mathieu-Daudé
On 2/27/20 1:06 AM, John Snow wrote: Since this one is nicely factored to use a single entry point, use script_main to run the tests. Signed-off-by: John Snow --- tests/qemu-iotests/258 | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/258

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

2020-02-27 Thread Eric Blake
On 2/27/20 4:09 AM, 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 reported

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

2020-02-27 Thread Eric Blake
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 compression method available. +static

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

2020-02-27 Thread Eric Blake
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 breaks the iotests output matching. To fix it,

Re: [PATCH v6 5/9] iotests: Mark verify functions as private

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > Discourage their use. > > (Also, make pending patches not yet using the new entry points fail in a > very obvious way.) > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 20 ++-- > 1 file changed, 10 insertions(+), 10

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
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 clusters

Re: [PATCH v6 4/9] iotest 258: use script_main

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > Since this one is nicely factored to use a single entry point, > use script_main to run the tests. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/258 | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v6 3/9] iotests: replace mutable list default args

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > It's bad hygiene: if we modify this list, it will be modified across all > invocations. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Max Reitz

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

2020-02-27 Thread Eric Blake
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 clusters (de)compressing. It is implied that

Re: [PATCH v6 2/9] iotests: add script_initialize

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > Like script_main, but doesn't require a single point of entry. > Replace all existing initialization sections with this drop-in replacement. > > This brings debug support to all existing script-style iotests. > > Signed-off-by: John Snow > --- >

Re: [PATCH 00/20] hw: Clean up hw/i386 headers (and few alpha/hppa)

2020-02-27 Thread Paolo Bonzini
On 26/10/19 15:32, Laurent Vivier wrote: > Le 26/10/2019 à 14:20, Philippe Mathieu-Daudé a écrit : >> Hi, >> >> On 10/14/19 4:22 PM, Philippe Mathieu-Daudé wrote: >>> This is a follow-up of Markus's cleanup series: >>> Tame a few "touch this, recompile the world" >>>

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

2020-02-27 Thread Eric Blake
On 2/27/20 2:21 AM, Vladimir Sementsov-Ogievskiy wrote: 27.02.2020 10:29, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to Qcow2 that indicates which allow to use different compression methods for image clusters (de)compressing. It is

Re: [PATCH v4 08/10] nbd/server: introduce NBDExtentArray

2020-02-27 Thread Eric Blake
On 2/27/20 6:46 AM, Vladimir Sementsov-Ogievskiy wrote: 26.02.2020 18:06, Eric Blake wrote: On 2/5/20 5:20 AM, Vladimir Sementsov-Ogievskiy wrote: Introduce NBDExtentArray class, to handle extents list creation in more controlled way and with fewer OUT parameters in functions. Signed-off-by:

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
Hi! Is problem in "S: Odd fixes" in Python section of MAINTAINERS? Will it be correct, if I send a patch to MAINTAINERS, proposing myself as maintainer of Python scripts and s/Odd fixes/Maintained/ ? And then just send pull request with this series, as "nobody minds"? 08.02.2020 13:36,

Re: [PATCH v2 3/3] qemu-img: Deprecate use of -b without -F

2020-02-27 Thread Eric Blake
On 2/27/20 1:09 AM, Peter Krempa wrote: On Wed, Feb 26, 2020 at 20:39:28 -0600, Eric Blake wrote: Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Eric Blake
On 2/27/20 3:19 AM, Ján Tomko wrote: On a Wednesday in 2020, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format.  This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has switched to -blockdev. 

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Eric Blake
On 2/27/20 1:20 AM, Peter Krempa wrote: On Wed, Feb 26, 2020 at 20:39:26 -0600, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format. This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has

Re: [PATCH v6 1/9] iotests: do a light delinting

2020-02-27 Thread Max Reitz
On 27.02.20 01:06, John Snow wrote: > This doesn't fix everything in here, but it does help clean up the > pylint report considerably. > > This should be 100% style changes only; the intent is to make pylint > more useful by working on establishing a baseline for iotests that we > can gate

Re: [PATCH v4 08/10] nbd/server: introduce NBDExtentArray

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
26.02.2020 18:06, Eric Blake wrote: On 2/5/20 5:20 AM, Vladimir Sementsov-Ogievskiy wrote: Introduce NBDExtentArray class, to handle extents list creation in more controlled way and with fewer OUT parameters in functions. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   nbd/server.c | 210

Re: [PATCH 08/20] hw/xen/xen_pt_load_rom: Remove unused includes

2020-02-27 Thread Anthony PERARD
On Mon, Oct 14, 2019 at 03:29:42PM +0100, Paul Durrant wrote: > On Mon, 14 Oct 2019 at 15:27, Philippe Mathieu-Daudé > wrote: > > > > xen_pt_load_rom.c does not use any of these includes, remove them. > > > > Signed-off-by: Philippe Mathieu-Daudé > > Reviewed-by: Paul Durrant Hi, I've added

Re: [PATCH 1/2] iotests: add JobRunner class

2020-02-27 Thread Max Reitz
On 26.02.20 18:58, John Snow wrote: > > > On 2/26/20 6:18 AM, Max Reitz wrote: >> On 26.02.20 01:44, John Snow wrote: >>> The idea is that instead of increasing the arguments to job_run all the >>> time, create a more general-purpose job runner that can be subclassed to >>> do interesting things

Re: [PATCH 5/6] qmp.py: change event_wait to use a dict

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: It's easier to work with than a list of tuples, because we can check the keys for membership. Signed-off-by: John Snow --- python/qemu/machine.py| 10 +- tests/qemu-iotests/040| 12 ++-- tests/qemu-iotests/260| 5

Re: [PATCH 4/6] iotests: add hmp helper with logging

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: Just a mild cleanup while I was here. Signed-off-by: John Snow Great! Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 3/6] iotests: move bitmap helpers into their own file

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/257| 110 +--- tests/qemu-iotests/bitmaps.py | 131 ++ 2 files changed, 132 insertions(+), 109 deletions(-) create mode 100644

Re: [PATCH 2/6] qmp: expose block-dirty-bitmap-populate

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 3:56, John Snow wrote: This is a new job-creating command. Signed-off-by: John Snow --- qapi/block-core.json | 18 ++ qapi/transaction.json | 2 ++ blockdev.c| 78 +++ 3 files changed, 98 insertions(+) diff --git

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
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-27 Thread Vladimir Sementsov-Ogievskiy
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 reported on image quering. Add the corresponding values of the

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
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 reported on image quering. Add the corresponding values of the "compression type" for the tests' output matching. And

Re: [PATCH v1 5/8] iotests: fix header size, feature table size and backing file offset

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: Affected tests: 031, 036, 061 Because of adding the compression type feature, some size values in the qcow2 v3 header are changed: header_size +=8: 1 byte compression type 7 bytes padding feature_table += 48: incompatible feture

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: After adding compression type feature to qcow2 format, qemu framework commands reporting the image settingd, e.g. "qemu-img create", started reporting the compression type for the image which breaks the iotests output matching. To fix it, add

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, 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 compression method available. The performance

Re: [PATCH v2 3/3] qemu-img: Deprecate use of -b without -F

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot). If our probing algorithm ever changes, or if other

Re: [PATCH v2 2/3] block: Add support to warn on backing file change without format

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake --- include/block/block.h | 4 ++-- block.c

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Ján Tomko
On a Wednesday in 2020, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format. This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has switched to -blockdev. With older -drive, at least the probing

Re: [RFC PATCH v3 19/27] qcow2: Add subcluster support to expand_zero_clusters_in_l1()

2020-02-27 Thread Max Reitz
On 26.02.20 18:19, Alberto Garcia wrote: > On Fri 21 Feb 2020 03:57:27 PM CET, Max Reitz wrote: >> As noted in v2, this function is only called when downgrading qcow2 >> images to v2. It kind of made sense to just call set_l2_bitmap() in >> v2, but now with the if () conditional... I suppose it

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-02-27 Thread Ján Tomko
On a Thursday in 2020, Peter Krempa wrote: On Wed, Feb 26, 2020 at 20:39:26 -0600, Eric Blake wrote: There are many existing qcow2 images that specify a backing file but no format. This has been the source of CVEs in the past, but has become more prominent of a problem now that libvirt has

Re: [PATCH v1 2/8] qcow2: rework the cluster compression routine

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov --- block/qcow2-threads.c | 77

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

2020-02-27 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 10:29, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to Qcow2 that indicates which allow to use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image