Re: [PATCH v4 4/5] qcow2: add zstd cluster compression

2020-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2020 16:34, 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 v4 3/5] qcow2: rework the cluster compression routine

2020-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2020 16:34, 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 | 71

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

2020-03-03 Thread Markus Armbruster
John Snow writes: > Repeatable results. run `pylint iotests.py` and you should get a pass. Start your sentences with a capital letter, please. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/pylintrc | 20 > 1 file changed, 20 insertions(+) > create mode 100644

[PATCH 2/2] misc: Replace zero-length arrays with flexible array member (manual)

2020-03-03 Thread Philippe Mathieu-Daudé
Description copied from Linux kernel commit from Gustavo A. R. Silva (see [3]): --v-- description start --v-- The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a

[PATCH 1/2] misc: Replace zero-length arrays with flexible array member (automatic)

2020-03-03 Thread Philippe Mathieu-Daudé
Description copied from Linux kernel commit from Gustavo A. R. Silva (see [3]): --v-- description start --v-- The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a

[PATCH 0/2] misc: Replace zero-length arrays with flexible array member

2020-03-03 Thread Philippe Mathieu-Daudé
This is a tree-wide cleanup inspired by a Linux kernel commit (from Gustavo A. R. Silva). --v-- description start --v-- The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-03 Thread BALATON Zoltan
On Tue, 3 Mar 2020, Mark Cave-Ayland wrote: On 02/03/2020 21:40, BALATON Zoltan wrote: I had a quick look at the schematics linked from the page above, and they confirm that the VIA IDE interface is connected directly to IRQs 14 and 15 and not to the PCI interrupt pins. Where did you see

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

2020-03-03 Thread Philippe Mathieu-Daudé
On 3/3/20 8:57 PM, John Snow wrote: On 2/27/20 9:14 AM, Philippe Mathieu-Daudé wrote: 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

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

2020-03-03 Thread John Snow
On 2/27/20 6:25 AM, Vladimir Sementsov-Ogievskiy wrote: > 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 +- >>  

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

2020-03-03 Thread John Snow
On 2/27/20 5:54 AM, Vladimir Sementsov-Ogievskiy wrote: > > Clean code movement, no changes. If test passes, it should be correct :) > > The only thing: I'd prefer not exporting global variables and use > bitmaps.GROUPS instead (even then, it's not very good interface but..) > > with or

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

2020-03-03 Thread John Snow
On 2/27/20 5:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 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

Re: [PATCH 1/6] block: add bitmap-populate job

2020-03-03 Thread John Snow
On 2/27/20 1:11 AM, Vladimir Sementsov-Ogievskiy wrote: > > Still, if user pass disabled bitmap, it will be invalid immediately after > job finish. Yes ... In truth, I really want to augment this job to provide a defined point-in-time semantic so it can be fully useful in all circumstances.

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

2020-03-03 Thread John Snow
On 2/27/20 6:44 AM, Max Reitz wrote: >> I'll just clean up the logging series I had to do it at a more >> fundamental level. > OK. So you’re looking to basically get VM.qmp() to log automatically if > necessary? (or maybe qmp_log() to not log unless necessary) > > Max > Yes. If this series

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

2020-03-03 Thread John Snow
On 2/27/20 7:59 AM, Max Reitz wrote: > 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

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

2020-03-03 Thread John Snow
On 2/27/20 8:47 AM, Max Reitz wrote: > 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. >> >>

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-03 Thread Mark Cave-Ayland
On 02/03/2020 21:40, BALATON Zoltan wrote: >> I had a quick look at the schematics linked from the page above, and they >> confirm >> that the VIA IDE interface is connected directly to IRQs 14 and 15 and not >> to the PCI >> interrupt pins. > > Where did you see that? What I got from trying

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

2020-03-03 Thread John Snow
On 2/27/20 9:21 AM, Max Reitz wrote: > 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

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

2020-03-03 Thread John Snow
On 2/27/20 9:14 AM, Philippe Mathieu-Daudé wrote: > 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. >>

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

2020-03-03 Thread John Snow
On 2/27/20 9:11 AM, Philippe Mathieu-Daudé wrote: > 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

Re: [PATCH v4 07/11] monitor/hmp: move hmp_snapshot_* to block-hmp-cmds.c hmp_snapshot_blkdev is from GPLv2 version of the hmp-cmds.c thus have to change the licence to GPLv2

2020-03-03 Thread Kevin Wolf
Am 30.01.2020 um 13:34 hat Maxim Levitsky geschrieben: > Signed-off-by: Maxim Levitsky > Reviewed-by: Dr. David Alan Gilbert Very long subject line. I suppose the license notice should be in the body instead. > block/monitor/block-hmp-cmds.c | 56 -- >

Re: [PATCH v4 02/11] monitor/hmp: uninline add_init_drive

2020-03-03 Thread Kevin Wolf
Am 30.01.2020 um 13:34 hat Maxim Levitsky geschrieben: > 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 > Reviewed-by: Markus Armbruster Shouldn't the subject say "inline" rather than "uninline"?

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

2020-03-03 Thread Kevin Wolf
Am 28.02.2020 um 12:16 hat Stefan Hajnoczi geschrieben: > 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

Re: [PATCH v2 1/1] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-03-03 Thread Andrzej Jakowski
On 2/21/20 2:23 PM, Andrzej Jakowski wrote: > This patch introduces support for PMR that has been defined as part of NVMe > 1.4 > spec. User can now specify a pmr_file which will be mmap'ed into qemu address > space and subsequently in PCI BAR 2. Guest OS can perform mmio read and writes > to the

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

2020-03-03 Thread Kevin Wolf
Am 28.02.2020 um 13:44 hat Peter Krempa geschrieben: > 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. Thanks, applied to the block branch. A test would probably live in test/qemu-iotests/. Test case 245 is

Re: [PATCH v4 3/5] qcow2: rework the cluster compression routine

2020-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2020 16:34, 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 Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v5 0/4] qmp: Optionally run handlers in coroutines

2020-03-03 Thread Markus Armbruster
Looks like PATCH 2 isn't necessary anymore, and PATCH 4 needs a respin. I tentatively queued PATCH 1+3, in the hope of getting either PATCH 4 or Marc-André's screendump patch in time for 5.0. Pushed to branch monitor-next in git://repo.or.cz/qemu/armbru.git. Appears to be down right now. Thanks!

Re: [PATCH v4 4/5] qcow2: add zstd cluster compression

2020-03-03 Thread Markus Armbruster
Denis Plotnikov writes: > 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 test

Re: [PATCH v4 2/5] qcow2: introduce compression type feature

2020-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2020 16:34, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be

[PATCH v4 3/5] qcow2: rework the cluster compression routine

2020-03-03 Thread Denis Plotnikov
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 | 71 --- 1 file changed, 60 insertions(+), 11

[PATCH v4 4/5] qcow2: add zstd cluster compression

2020-03-03 Thread Denis Plotnikov
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 test results: Test compresses and

[PATCH v4 0/5] qcow2: Implement zstd cluster compression method

2020-03-03 Thread Denis Plotnikov
v4: * the series is rebased on top of 01 "block/qcow2-threads: fix qcow2_decompress" * 01 is just a no-change resend to avoid extra dependencies. Still, it may be merged in separate v3: * remove redundant max compression type value check [Vladimir, Eric] (the switch below checks

[PATCH v4 2/5] qcow2: introduce compression type feature

2020-03-03 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus

[PATCH v4 5/5] iotests: 287: add qcow2 compression type test

2020-03-03 Thread Denis Plotnikov
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 | 127 + tests/qemu-iotests/287.out | 43 +

[PATCH v4 1/5] block/qcow2-threads: fix qcow2_decompress

2020-03-03 Thread Denis Plotnikov
From: Vladimir Sementsov-Ogievskiy On success path we return what inflate() returns instead of 0. And it most probably works for Z_STREAM_END as it is positive, but is definitely broken for Z_BUF_ERROR. While being here, switch to errno return code, to be closer to qcow2_compress API (and usual

Re: [PATCH v5 1/4] qapi: Add a 'coroutine' flag for commands

2020-03-03 Thread Kevin Wolf
Am 03.03.2020 um 09:10 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > This patch adds a new 'coroutine' flag to QMP command definitions that > > tells the QMP dispatcher that the command handler is safe to be run in a > > coroutine. > > > > The documentation of the new flag

Re: [PATCH v5 3/4] qmp: Move dispatcher to a coroutine

2020-03-03 Thread Kevin Wolf
Am 03.03.2020 um 09:49 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > This moves the QMP dispatcher to a coroutine and runs all QMP command > > handlers that declare 'coroutine': true in coroutine context so they > > can avoid blocking the main loop while doing I/O or waiting for

[PATCH v3 2/4] qcow2: rework the cluster compression routine

2020-03-03 Thread Denis Plotnikov
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 +++ 1 file changed, 63 insertions(+), 14

[PATCH v3 4/4] iotests: 287: add qcow2 compression type test

2020-03-03 Thread Denis Plotnikov
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 | 127 + tests/qemu-iotests/287.out | 43 +

[PATCH v3 0/4] qcow2: Implement zstd cluster compression method

2020-03-03 Thread Denis Plotnikov
v3: * remove redundant max compression type value check [Vladimir, Eric] (the switch below checks everything) * prevent compression type changing on "qemu-img amend" [Vladimir] * remove zstd config setting, since it has been added already by "migration" patches [Vladimir] *

[PATCH v3 1/4] qcow2: introduce compression type feature

2020-03-03 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus

[PATCH v3 3/4] qcow2: add zstd cluster compression

2020-03-03 Thread Denis Plotnikov
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 test results: Test compresses and

Re: QAPI schema for desired state of LUKS keyslots (was: [PATCH 02/13] qcrypto-luks: implement encryption key management)

2020-03-03 Thread Maxim Levitsky
On Sat, 2020-02-15 at 15:51 +0100, Markus Armbruster wrote: > Review of this patch led to a lengthy QAPI schema design discussion. > Let me try to condense it into a concrete proposal. > > This is about the QAPI schema, and therefore about QMP. The > human-friendly interface is out of scope.

Re: [PATCH v5 3/4] qmp: Move dispatcher to a coroutine

2020-03-03 Thread Markus Armbruster
Kevin Wolf writes: > This moves the QMP dispatcher to a coroutine and runs all QMP command > handlers that declare 'coroutine': true in coroutine context so they > can avoid blocking the main loop while doing I/O or waiting for other > events. > > For commands that are not declared safe to run

Re: [PATCH v7 00/11] error: auto propagated local_err part I

2020-03-03 Thread Vladimir Sementsov-Ogievskiy
03.03.2020 11:01, Markus Armbruster wrote: Hi Vladimir, I've come to rather like your ERRP_AUTO_PROPAGATE() idea. What I wouldn't like is a protracted conversion. Once we're happy with PATCH 1-3, it's a matter of running Coccinelle and reviewing its output. I'm confident we can converge on

Re: [PATCH v5 1/4] qapi: Add a 'coroutine' flag for commands

2020-03-03 Thread Markus Armbruster
Kevin Wolf writes: > This patch adds a new 'coroutine' flag to QMP command definitions that > tells the QMP dispatcher that the command handler is safe to be run in a > coroutine. > > The documentation of the new flag pretends that this flag is already > used as intended, which it isn't yet

Re: [PATCH v7 00/11] error: auto propagated local_err part I

2020-03-03 Thread Markus Armbruster
Hi Vladimir, I've come to rather like your ERRP_AUTO_PROPAGATE() idea. What I wouldn't like is a protracted conversion. Once we're happy with PATCH 1-3, it's a matter of running Coccinelle and reviewing its output. I'm confident we can converge on PATCH 1-3. It's two weeks until soft freeze.