Re: [PATCH] scripts/simplebench: compare write request performance

2020-06-25 Thread Andrey Shinkevich
On 24.06.2020 08:45, Andrey Shinkevich wrote: The script 'bench_write_req.py' allows comparing performances of write request for two qemu-img binary files. Suggested-by: Denis V. Lunev Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- scripts/s

[PATCH] scripts/simplebench: compare write request performance

2020-06-23 Thread Andrey Shinkevich
The script 'bench_write_req.py' allows comparing performances of write request for two qemu-img binary files. Suggested-by: Denis V. Lunev Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- scripts/simplebench/bench_write_re

[PATCH v7 9/9] qcow2_format.py: support dumping metadata in JSON format

2020-06-11 Thread Andrey Shinkevich
"name_size": 8, "extra_data_size": 0, "bitmap_table": { "table_entries": [ { "type": "serialized",

[PATCH v7 6/9] qcow2_format.py: Dump bitmap table serialized entries

2020-06-11 Thread Andrey Shinkevich
serialized 4503608217305088 65536 7 serialized 1407374883553280065536 Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake --- tests/qemu-iotests/291.out | 50 ++ tests/qemu-iotests/qcow2_format.py | 40

[PATCH v7 5/9] qcow2_format.py: pass cluster size to substructures

2020-06-11 Thread Andrey Shinkevich
The cluster size of an image is the QcowHeader class member and may be obtained by dependent extension structures such as Qcow2BitmapExt for further bitmap table details print. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2_format.py | 19 ++- 1 file changed, 14

[PATCH v7 2/9] qcow2: Fix capitalization of header extension constant.

2020-06-11 Thread Andrey Shinkevich
Make the capitalization of the hexadecimal numbers consistent for the QCOW2 header extension constants in docs/interop/qcow2.txt. Suggested-by: Eric Blake Signed-off-by: Andrey Shinkevich --- block/qcow2.c | 2 +- docs/interop/qcow2.txt | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v7 1/9] iotests: Fix for magic hexadecimal output in 291

2020-06-11 Thread Andrey Shinkevich
This issue was introduced in the earlier patch: "qcow2_format: refactor QcowHeaderExtension as a subclass of Qcow2Struct". Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/291.out | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests

[PATCH v7 0/9] iotests: Dump QCOW2 dirty bitmaps metadata

2020-06-11 Thread Andrey Shinkevich
o separate patch. 05: Making dict(s) for dumping in JSON format was substituted with a copy of __dict__. v5: The Vladimir's preliminary series v4: The Vladimir's preliminary series Andrey Shinkevich (9): iotests: Fix for magic hexadecimal output in 291 qcow2: Fix capitalization

[PATCH v7 7/9] qcow2.py: Introduce '-j' key to dump in JSON format

2020-06-11 Thread Andrey Shinkevich
Add the command key to the qcow2.py arguments list to dump QCOW2 metadata in JSON format. Here is the suggested way to do that. The implementation of the dump in JSON format is in the patch that follows. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py| 20

[PATCH v7 4/9] qcow2_format.py: Dump bitmap directory information

2020-06-11 Thread Andrey Shinkevich
) bitmap_table_offset 0x9 bitmap_table_size 1 flags 0 type 1 granularity_bits 16 name_size 8 extra_data_size 0 Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir

[PATCH v7 3/9] qcow2_format.py: make printable data an extension class member

2020-06-11 Thread Andrey Shinkevich
Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member. Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/qcow2_format.py | 14

[PATCH v7 8/9] qcow2_format.py: collect fields to dump in JSON format

2020-06-11 Thread Andrey Shinkevich
As __dict__ is being extended with class members we do not want to print in JSON format dump, make a light copy of the initial __dict__ and extend the copy by adding lists we have to print in the JSON output. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2_format.py | 5 - 1

[PATCH v6 6/8] qcow2.py: Introduce '-j' key to dump in JSON format

2020-06-11 Thread Andrey Shinkevich
Add the command key to the qcow2.py arguments list to dump QCOW2 metadata in JSON format. Here is the suggested way to do that. The implementation of the dump in JSON format is in the patch that follows. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py| 20

[PATCH v6 1/8] qcow2: Fix capitalization of header extension constant.

2020-06-11 Thread Andrey Shinkevich
Make the capitalization of the hexadecimal numbers consistent for the QCOW2 header extension constants in docs/interop/qcow2.txt. Suggested-by: Eric Blake Signed-off-by: Andrey Shinkevich --- block/qcow2.c | 2 +- docs/interop/qcow2.txt | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v6 2/8] qcow2_format.py: make printable data an extension class member

2020-06-11 Thread Andrey Shinkevich
Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member. Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/qcow2_format.py | 14

[PATCH v6 3/8] qcow2_format.py: Dump bitmap directory info

2020-06-11 Thread Andrey Shinkevich
bitmap_table_size 1 flags 0 type 1 granularity_bits 16 name_size 8 extra_data_size 0 Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v6 4/8] qcow2_format.py: pass cluster size to substructures

2020-06-11 Thread Andrey Shinkevich
The cluster size of an image is the QcowHeader class member and may be obtained by dependent extension structures such as Qcow2BitmapExt for further bitmap table details print. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2_format.py | 19 ++- 1 file changed, 14

[PATCH v6 0/8] iotests: Dump QCOW2 dirty bitmaps metadata

2020-06-11 Thread Andrey Shinkevich
series v4: The Vladimir's preliminary series Andrey Shinkevich (8): qcow2: Fix capitalization of header extension constant. qcow2_format.py: make printable data an extension class member qcow2_format.py: Dump bitmap directory info qcow2_format.py: pass cluster size to substructures q

[PATCH v6 8/8] qcow2_format.py: support dumping metadata in JSON format

2020-06-11 Thread Andrey Shinkevich
"name_size": 8, "extra_data_size": 0, "bitmap_table": { "table_entries": [ { "type": "serialized",

[PATCH v6 5/8] qcow2_format.py: Dump bitmap table serialized entries

2020-06-11 Thread Andrey Shinkevich
: Andrey Shinkevich Reviewed-by: Eric Blake --- tests/qemu-iotests/qcow2_format.py | 42 ++ 1 file changed, 42 insertions(+) diff --git a/tests/qemu-iotests/qcow2_format.py b/tests/qemu-iotests/qcow2_format.py index 6589f68..2e7c058 100644 --- a/tests/qemu

[PATCH v6 7/8] qcow2_format.py: collect fields to dump in JSON format

2020-06-11 Thread Andrey Shinkevich
As __dict__ is being extended with class members we do not want to print in JSON format dump, make a light copy of the initial __dict__ and extend the copy by adding lists we have to print in the JSON output. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2_format.py | 5 - 1

Re: [PATCH v5 12/13] qcow2: QcowHeaderExtension print names for extension magics

2020-06-08 Thread Andrey Shinkevich
From: Andrey Shinkevich Sent: Monday, June 8, 2020 8:48 AM To: Vladimir Sementsov-Ogievskiy ; qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev Subject: Re: [PATCH v5 12/13] qcow2

Re: [PATCH v5 12/13] qcow2: QcowHeaderExtension print names for extension magics

2020-06-07 Thread Andrey Shinkevich
From: Vladimir Sementsov-Ogievskiy Sent: Saturday, June 6, 2020 11:18 AM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Andrey Shinkevich ; Vladimir Sementsov-Ogievskiy Subject

Re: [PATCH v4 11/12] qcow2: QcowHeaderExtension print names for extension magics

2020-06-05 Thread Andrey Shinkevich
Yes, but hex(int) returns str. Andrey From: Vladimir Sementsov-Ogievskiy Sent: Friday, June 5, 2020 7:26 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Andrey Shinkevich

Re: [PATCH v4 12/12] qcow2_format.py: dump bitmaps header extension

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 11/12] qcow2: QcowHeaderExtension print names for extension magics

2020-06-05 Thread Andrey Shinkevich
s/0xE2792ACA/0xe2792aca/ (as suggested by Eric) Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl

Re: [PATCH v4 10/12] qcow2_format: refactor QcowHeaderExtension as a subclass of Qcow2Struct

2020-06-05 Thread Andrey Shinkevich
I'd add a comment that correct current file offset is the responsibility of a caller. Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org

Re: [PATCH v4 09/12] qcow2_format.py: QcowHeaderExtension: add dump method

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 08/12] qcow2_format.py: add field-formatting class

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 07/12] qcow2_format.py: separate generic functionality of structure classes

2020-06-05 Thread Andrey Shinkevich
Two more int types in the comment? Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis

Re: [PATCH v4 06/12] qcow2_format.py: use strings to specify c-type of struct fields

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 05/12] qcow2_format.py: use modern string formatting

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 04/12] qcow2_format.py: use tuples instead of lists for fields

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 03/12] qcow2_format.py: drop new line printing at end of dump()

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 02/12] qcow2.py: move qcow2 format classes to separate module

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v4 01/12] qcow2.py: python style fixes

2020-06-05 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Vladimir Sementsov-Ogievskiy Sent: Thursday, June 4, 2020 8:41 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; mre...@redhat.com ; kw...@redhat.com ; ebl...@redhat.com ; Denis Lunev ; Vladimir Sementsov-Ogievskiy

Re: [PATCH v3 0/6] iotests: Dump QCOW2 dirty bitmaps metadata

2020-06-04 Thread Andrey Shinkevich
Thank you very much dear colleagues for your collaboration. Your reviews comments are well noted. Andrey From: Eric Blake Sent: Tuesday, June 2, 2020 12:46 AM To: Andrey Shinkevich ; qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; kw...@redhat.com ; mre

Re: [PATCH v5 00/15] Apply COR-filter to the block-stream permanently

2020-06-01 Thread Andrey Shinkevich
PINGING... Please From: Andrey Shinkevich Sent: Wednesday, May 13, 2020 12:50 PM To: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; kw...@redhat.com ; mre...@redhat.com ; arm...@redhat.com ; f...@euphon.net ; js...@redhat.com ; stefa...@redhat.com ; ebl

[PATCH v3 6/6] iotests: Dump QCOW2 image metadata in JSON format with qcow2.py

2020-06-01 Thread Andrey Shinkevich
: 16, "name_size": 8, "extra_data_size": 0, "bitmap_table": { "table_entries": [ { "type": &qu

[PATCH v3 0/6] iotests: Dump QCOW2 dirty bitmaps metadata

2020-06-01 Thread Andrey Shinkevich
read completely before printing the dictionary. 02: The outputs of the tests 031, 036 and 061 were modified. Andrey Shinkevich (6): iotests: Add extension names to qcow2.py dump iotests: move check for printable data to QcowHeaderExtension class iotests: dump bitmap extension data with

[PATCH v3 5/6] iotests: Dump bitmap table entries serialized in QCOW2 image

2020-06-01 Thread Andrey Shinkevich
-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py | 48 + 1 file changed, 48 insertions(+) diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py index e4453f6..76e0c69 100755 --- a/tests/qemu-iotests/qcow2.py +++ b/tests/qemu

[PATCH v3 2/6] iotests: move check for printable data to QcowHeaderExtension class

2020-06-01 Thread Andrey Shinkevich
Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member in the script qcow2.py. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py | 15 --- 1 file changed, 8 insertions(+), 7 deletions

[PATCH v3 1/6] iotests: Add extension names to qcow2.py dump

2020-06-01 Thread Andrey Shinkevich
Header extension: Feature table magic 0x6803f857 length192 data The change incurs modification of the output in 031, 036 and 061 test cases. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/031.out | 22

[PATCH v3 4/6] iotests: Dump bitmap directory info with qcow2.py

2020-06-01 Thread Andrey Shinkevich
1 granularity_bits 16 name_size 8 extra_data_size 0 Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py | 104 +++- 1 file changed, 103 insertions(+), 1 deletion(-) diff

[PATCH v3 3/6] iotests: dump bitmap extension data with qcow2.py

2020-06-01 Thread Andrey Shinkevich
-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py index 18e4923..8286115 100755 --- a/tests/qemu-iotests/qcow2.py +++ b

[PATCH v2] iotests: Dump QCOW2 dirty bitmaps metadata

2020-05-26 Thread Andrey Shinkevich
0 Bitmap table 0 serialized, offset 0xa 1 all-zeroes, offset 0x0 2 all-zeroes, offset 0x0 3 all-zeroes, offset 0x0 4 all-zeroes, offset 0x0 5 all-zeroes, offset 0x0 6 all-zeroes, offset 0x0 7 all-zeroes, offset 0x0 Signed-off-by: Andrey

[PATCH] iotests: Dump QCOW2 dirty bitmaps metadata

2020-05-26 Thread Andrey Shinkevich
table 0 serialized, offset 0xa 1 all-zeroes, offset 0x0 2 all-zeroes, offset 0x0 3 all-zeroes, offset 0x0 4 all-zeroes, offset 0x0 5 all-zeroes, offset 0x0 6 all-zeroes, offset 0x0 7 all-zeroes, offset 0x0 Signed-off-by: Andrey

[PATCH v5 15/15] block: apply COR-filter to block-stream jobs

2020-05-13 Thread Andrey Shinkevich
The patch completes the series with the COR-filter insertion to any block-stream operation. It also makes changes to the iotests 030 and 141.out. Signed-off-by: Andrey Shinkevich --- block/stream.c | 83 -- tests/qemu-iotests/030 | 8

[PATCH v5 14/15] iotests: prepare 245 for using filter in block-stream

2020-05-13 Thread Andrey Shinkevich
The preliminary patch modifies the test 245 to prepare the block-stream job for using COR-filter. The filter breaks the backing chain being connected to the underlying node by file child link. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/245 | 10 +++--- 1 file changed, 7

[PATCH v5 08/15] block: Use CAFs when working with backing chains

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Use child access functions when iterating through backing chains so filters do not break the chain. Signed-off-by: Max Reitz --- block.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 459412

[PATCH v5 00/15] Apply COR-filter to the block-stream permanently

2020-05-13 Thread Andrey Shinkevich
ded into the frozen chain of a block-stream job. The 'above_base' node pointer is left because it is essential for finding the base node in case of filters above. Andrey Shinkevich (7): block: prepare block-stream for using COR-filter copy-on-read: Support change filename

[PATCH v5 02/15] copy-on-read: Support compressed writes

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 242d3ff..c4fa468 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-

[PATCH v5 06/15] block: Use CAFs in block status functions

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Use the child access functions in the block status inquiry functions as appropriate. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io

[PATCH v5 03/15] block: Add child access functions

2020-05-13 Thread Andrey Shinkevich
allow us to handle filter nodes and external data files in a meaningful way. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block.c | 99 +++ include/block/bloc

[PATCH v5 05/15] block: Include filters when freezing backing chain

2020-05-13 Thread Andrey Shinkevich
instead of backing chains alone. While at it, add some comments that note which functions require their caller to ensure that a given child link is not frozen, and how the callers do so. Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block.c | 81

[PATCH v5 12/15] copy-on-read: add filter append/drop functions

2020-05-13 Thread Andrey Shinkevich
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 102 +++ block/copy-on-read.h | 36

[PATCH v5 07/15] commit: Deal with filters when blocking intermediate nodes

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block/commit.c | 75

[PATCH v5 04/15] block: Add chain helper functions

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 55 +++ include/block/block_int.h | 3 +++ 2 files changed,

[PATCH v5 09/15] block: prepare block-stream for using COR-filter

2020-05-13 Thread Andrey Shinkevich
030::test_overlapping_4 that now passes with no conflict because the stream job does not have a real dependency on its base and on a filter above it. Signed-off-by: Andrey Shinkevich --- blockdev.c | 11 +-- tests/qemu-iotests/030 | 9 - 2 files changed, 13

[PATCH v5 01/15] block: Mark commit and mirror as filter drivers

2020-05-13 Thread Andrey Shinkevich
Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/commit.c | 2 ++ block/mirror.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/block/commit.c b/block/commit.c index 87f6096..445a280 100644 --- a/b

[PATCH v5 13/15] qapi: add filter-node-name to block-stream

2020-05-13 Thread Andrey Shinkevich
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. That will be needed for further iotests implementations. Signed-off-by: Andrey Shinkevich --- block/monitor/block-hmp-cmds.c | 4 ++-- bloc

[PATCH v5 10/15] copy-on-read: Support change filename functions

2020-05-13 Thread Andrey Shinkevich
The COR-filter driver should support a redirecting function to refresh filenames. Otherwise, a file name of the filter will be copied instead of the one of a data node. It is also true for the function bdrv_change_backing_file(). Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 18

[PATCH v5 11/15] copy-on-read: Support preadv/pwritev_part functions

2020-05-13 Thread Andrey Shinkevich
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/block/copy-on

[PATCH v4 03/15] block: Add child access functions

2020-05-12 Thread Andrey Shinkevich
allow us to handle filter nodes and external data files in a meaningful way. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block.c | 99 +++ include/block/bloc

[PATCH v4 04/15] block: Add chain helper functions

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 55 +++ include/block/block_int.h | 3 +++ 2 files changed,

[PATCH v4 01/15] block: Mark commit and mirror as filter drivers

2020-05-12 Thread Andrey Shinkevich
Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/commit.c | 2 ++ block/mirror.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/block/commit.c b/block/commit.c index 87f6096..445a280 100644 --- a/b

[PATCH v4 05/15] block: Include filters when freezing backing chain

2020-05-12 Thread Andrey Shinkevich
instead of backing chains alone. While at it, add some comments that note which functions require their caller to ensure that a given child link is not frozen, and how the callers do so. Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block.c | 81

[PATCH v4 07/15] commit: Deal with filters when blocking intermediate nodes

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block/commit.c | 75

[PATCH v4 09/15] block: prepare block-stream for using COR-filter

2020-05-12 Thread Andrey Shinkevich
030::test_overlapping_4 that now passes with no conflict because the stream job does not have a real dependency on its base and on a filter above it. Signed-off-by: Andrey Shinkevich --- blockdev.c | 11 +-- tests/qemu-iotests/030 | 9 - 2 files changed, 13

[PATCH v4 08/15] block: Use CAFs when working with backing chains

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Use child access functions when iterating through backing chains so filters do not break the chain. Signed-off-by: Max Reitz --- block.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 459412

[PATCH v4 15/15] block: apply COR-filter to block-stream jobs

2020-05-12 Thread Andrey Shinkevich
The patch completes the series with the COR-filter insertion to any block-stream operation. It also makes changes to the iotests 030 and 141.out. Signed-off-by: Andrey Shinkevich --- block/stream.c | 83 -- tests/qemu-iotests/030 | 8

[PATCH v4 06/15] block: Use CAFs in block status functions

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Use the child access functions in the block status inquiry functions as appropriate. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io

[PATCH v4 14/15] iotests: prepare 245 for using filter in block-stream

2020-05-12 Thread Andrey Shinkevich
The preliminary patch modifies the test 245 to prepare the block-stream job for using COR-filter. The filter breaks the backing chain being connected to the underlying node by file child link. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/245 | 10 +++--- 1 file changed, 7

[PATCH v4 10/15] copy-on-read: Support change filename functions

2020-05-12 Thread Andrey Shinkevich
The COR-filter driver should support a redirecting function to refresh filenames. Otherwise, a file name of the filter will be copied instead of the one of a data node. It is also true for the function bdrv_change_backing_file(). Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 18

[PATCH v4 00/15] Apply COR-filter to the block-stream permanently

2020-05-12 Thread Andrey Shinkevich
e 'above_base' node pointer is left because it is essential for finding the base node in case of filters above. Andrey Shinkevich (7): block: prepare block-stream for using COR-filter copy-on-read: Support change filename functions copy-on-read: Support preadv/pwritev_part fun

[PATCH v4 11/15] copy-on-read: Support preadv/pwritev_part functions

2020-05-12 Thread Andrey Shinkevich
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/block/copy-on

[PATCH v4 02/15] copy-on-read: Support compressed writes

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 242d3ff..c4fa468 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-

[PATCH v4 13/15] qapi: add filter-node-name to block-stream

2020-05-12 Thread Andrey Shinkevich
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. That will be needed for further iotests implementations. Signed-off-by: Andrey Shinkevich --- block/monitor/block-hmp-cmds.c | 4 ++-- bloc

[PATCH v4 12/15] copy-on-read: add filter append/drop functions

2020-05-12 Thread Andrey Shinkevich
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 102 +++ 1 file changed, 102

[PATCH v3 13/15] qapi: add filter-node-name to block-stream

2020-05-12 Thread Andrey Shinkevich
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. That will be needed for further iotests implementations. Signed-off-by: Andrey Shinkevich --- block/monitor/block-hmp-cmds.c | 4 ++-- bloc

[PATCH v3 01/15] block: Mark commit and mirror as filter drivers

2020-05-12 Thread Andrey Shinkevich
Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/commit.c | 2 ++ block/mirror.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/block/commit.c b/block/commit.c index 87f6096..445a280 100644 --- a/b

[PATCH v3 15/15] block: apply COR-filter to block-stream jobs

2020-05-12 Thread Andrey Shinkevich
The patch completes the series with the COR-filter insertion to any block-stream operation. It also makes changes to the iotests 030 and 141.out. Signed-off-by: Andrey Shinkevich --- block/stream.c | 83 -- tests/qemu-iotests/030 | 8

[PATCH v3 05/15] block: Include filters when freezing backing chain

2020-05-12 Thread Andrey Shinkevich
instead of backing chains alone. While at it, add some comments that note which functions require their caller to ensure that a given child link is not frozen, and how the callers do so. Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block.c | 81

[PATCH v3 06/15] block: Use CAFs in block status functions

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Use the child access functions in the block status inquiry functions as appropriate. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io

[PATCH v3 10/15] copy-on-read: Support change filename functions

2020-05-12 Thread Andrey Shinkevich
The COR-filter driver should support a redirecting function to refresh filenames. Otherwise, a file name of the filter will be copied instead of the one of a data node. It is also true for the function bdrv_change_backing_file(). Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 18

[PATCH v3 03/15] block: Add child access functions

2020-05-12 Thread Andrey Shinkevich
allow us to handle filter nodes and external data files in a meaningful way. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block.c | 99 +++ include/block/bloc

[PATCH v3 14/15] iotests: prepare 245 for using filter in block-stream

2020-05-12 Thread Andrey Shinkevich
The preliminary patch modifies the test 245 to prepare the block-stream job for using COR-filter. The filter breaks the backing chain being connected to the underlying node by file child link. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/245 | 10 +++--- 1 file changed, 7

[PATCH v3 07/15] commit: Deal with filters when blocking intermediate nodes

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block/commit.c | 75

[PATCH v3 08/15] block: Use CAFs when working with backing chains

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Use child access functions when iterating through backing chains so filters do not break the chain. Signed-off-by: Max Reitz --- block.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 459412

[PATCH v3 09/15] block: prepare block-stream for using COR-filter

2020-05-12 Thread Andrey Shinkevich
030::test_overlapping_4 that now passes with no conflict because the stream job does not have a real dependency on its base and on a filter above it. Signed-off-by: Andrey Shinkevich --- blockdev.c | 11 +-- tests/qemu-iotests/030 | 9 - 2 files changed, 13

[PATCH v3 12/15] copy-on-read: add filter append/drop functions

2020-05-12 Thread Andrey Shinkevich
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 98 1 file changed, 98

[PATCH v3 04/15] block: Add chain helper functions

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 55 +++ include/block/block_int.h | 3 +++ 2 files changed,

[PATCH v3 00/15] Apply COR-filter to the block-stream permanently

2020-05-12 Thread Andrey Shinkevich
ntial for finding the base node in case of filters above. Andrey Shinkevich (7): block: prepare block-stream for using COR-filter copy-on-read: Support change filename functions copy-on-read: Support preadv/pwritev_part functions copy-on-read: add filter append/drop functions qa

[PATCH v3 11/15] copy-on-read: Support preadv/pwritev_part functions

2020-05-12 Thread Andrey Shinkevich
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/block/copy-on

[PATCH v3 02/15] copy-on-read: Support compressed writes

2020-05-12 Thread Andrey Shinkevich
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 242d3ff..c4fa468 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-

Re: backing chain & block status & filters

2020-04-30 Thread Andrey Shinkevich
From: Vladimir Sementsov-Ogievskiy Sent: Thursday, April 30, 2020 10:12 PM To: Max Reitz ; qemu block Cc: Kevin Wolf ; qemu-devel ; Andrey Shinkevich Subject: Re: backing chain & block status & filters > > The only difference is that if you use file-child-base

Re: [PATCH 0/7] Apply COR-filter to the block-stream permanently

2020-04-26 Thread Andrey Shinkevich
I am going to do that in version 3. Please review the changes in the version 2 first. Thanks, Andrey From: Vladimir Sementsov-Ogievskiy Sent: Tuesday, April 21, 2020 4:12 PM To: Andrey Shinkevich ; qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; kw

Re: [PATCH 7/7] block: apply COR-filter to block-stream jobs

2020-04-26 Thread Andrey Shinkevich
user of it. Andrey From: Vladimir Sementsov-Ogievskiy Sent: Tuesday, April 21, 2020 3:58 PM To: Andrey Shinkevich ; qemu-block@nongnu.org Cc: qemu-de...@nongnu.org ; kw...@redhat.com ; mre...@redhat.com ; js...@redhat.com ; arm...@redhat.com ; dgilb...@redhat.com

[PATCH 7/7] block: apply COR-filter to block-stream jobs

2020-04-20 Thread Andrey Shinkevich
The patch completes the series with the COR-filter insertion to any block-stream operation. It also makes changes to the iotests 030, 141 and 245. Signed-off-by: Andrey Shinkevich --- block/stream.c | 151 +++-- tests/qemu-iotests/030

[PATCH 5/7] qapi: add filter-node-name to block-stream

2020-04-20 Thread Andrey Shinkevich
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich --- block/stream.c| 5 +++-- blockdev.c| 8 +++- include/block/block_int.h | 7 ++- m

<    1   2   3   4   5   6   7   8   9   >