Re: [PATCH] maint: Tweak comment in mailmap to sound friendlier

2023-09-27 Thread Andrey Drobyshev
munging issue in the first place. > > Fixes: 3bd2608d ("maint: Add .mailmap entries for patches claiming list > authorship") > CC: Andrey Drobyshev > Cc: Peter Maydell > Signed-off-by: Eric Blake > --- > > I'm sending this email with a temporary 'git

[PATCH] mailmap: Fix Andrey Drobyshev author email

2023-09-26 Thread andrey . drobyshev--- via
From: Andrey Drobyshev This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing list rewrote the "From:" field in the corresponding patches. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for explanation. Signed-off-

[PATCH v3 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-09-19 Thread Andrey Drobyshev via
further down the loop body, as the offsets beyond the old backing size need to be explicitly zeroed. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lunev Reviewed-by: Hanna Czenczek --- qemu-img.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b

[PATCH v3 5/8] qemu-img: rebase: avoid unnecessary COW operations

2023-09-19 Thread Andrey Drobyshev via
y case we end up aligning to the smallest unit of allocation. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 74 +++--- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0f67b021f7..a2d6241648 100644 --- a/

[PATCH v3 8/8] iotests: add tests for "qemu-img rebase" with compression

2023-09-19 Thread Andrey Drobyshev via
nd overlay are initially uncompressed, copied clusters end up compressed when rebase with compression is performed. 271: 1. Check that when target image has subclusters, rebase with compression will make an entire cluster containing the written subcluster compressed. Signed-off-by: Andrey

[PATCH v3 4/8] qemu-img: add chunk size parameter to compare_buffers()

2023-09-19 Thread Andrey Drobyshev via
requests aligned to a predefined alignment value. Signed-off-by: Andrey Drobyshev Reviewed-by: Eric Blake Reviewed-by: Hanna Czenczek --- qemu-img.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4dc91505bf..0f67b021f7

[PATCH v3 2/8] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-09-19 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lu

[PATCH v3 6/8] iotests/{024, 271}: add testcases for qemu-img rebase

2023-09-19 Thread Andrey Drobyshev via
cluster size > backings cluster size; 271: add test case for rebase images that contain subclusters. Check that no extra allocations are being made. Signed-off-by: Andrey Drobyshev Reviewed-by: Hanna Czenczek --- tests/qemu-iotests/024 | 60 ++ tests

[PATCH v3 0/8] qemu-img: rebase: add compression support

2023-09-19 Thread Andrey Drobyshev via
3-09/msg00448.html Andrey Drobyshev (8): qemu-img: rebase: stop when reaching EOF of old backing file qemu-iotests: 024: add rebasing test case for overlay_size > backing_size qemu-img: rebase: use backing files' BlockBackend for buffer alignment qemu-img: add chunk size parameter to

[PATCH v3 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-19 Thread Andrey Drobyshev via
ading from the new backing, while buf_old is being used for both reading from the old backing and writing to the target. Let's take that into account and use more appropriate values as alignments. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH v3 7/8] qemu-img: add compression option to rebase subcommand

2023-09-19 Thread Andrey Drobyshev via
option affects only the clusters which are actually being copied from the original backing file. The clusters which were uncompressed in the target image will remain so. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lunev Reviewed-by: Hanna Czenczek --- docs/tools/qemu-img.rst | 6

Re: [PATCH v2 5/8] qemu-img: rebase: avoid unnecessary COW operations

2023-09-19 Thread Andrey Drobyshev
On 9/19/23 13:46, Hanna Czenczek wrote: > On 15.09.23 18:20, Andrey Drobyshev wrote: >> When rebasing an image from one backing file to another, we need to >> compare data from old and new backings.  If the diff between that data >> happens to be unaligned to the target clust

Re: [PATCH v2 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-19 Thread Andrey Drobyshev
On 9/19/23 11:18, Hanna Czenczek wrote: > On 15.09.23 18:20, Andrey Drobyshev wrote: >> Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for >> the data read from the old and new backing files are aligned using >> BlockDriverState (or B

Re: [PATCH v2 5/8] qemu-img: rebase: avoid unnecessary COW operations

2023-09-16 Thread Andrey Drobyshev
On 9/16/23 00:52, Eric Blake wrote: > On Fri, Sep 15, 2023 at 07:20:13PM +0300, Andrey Drobyshev wrote: >> When rebasing an image from one backing file to another, we need to >> compare data from old and new backings. If the diff between that data >> happens to be unaligned

Re: [PATCH v2 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-15 Thread Andrey Drobyshev
On 9/15/23 21:39, Eric Blake wrote: > On Fri, Sep 15, 2023 at 07:20:11PM +0300, Andrey Drobyshev wrote: >> Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for >> the data read from the old and new backing files are aligned using >> BlockDri

[PATCH v2 0/8] qemu-img: rebase: add compression support

2023-09-15 Thread Andrey Drobyshev via
t;compressed" field in "qemu-img map" output. This series is currently in the block branch and is likely to be merged into master soon: https://lists.nongnu.org/archive/html/qemu-devel/2023-09/msg01489.html Andrey Drobyshev (8): qemu-img: rebase: stop when reaching EOF o

[PATCH v2 5/8] qemu-img: rebase: avoid unnecessary COW operations

2023-09-15 Thread Andrey Drobyshev via
y case we end up aligning to the smallest unit of allocation. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 76 -- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index fcd31d7b5b..83950af42b 100644 --- a/

[PATCH v2 8/8] iotests: add tests for "qemu-img rebase" with compression

2023-09-15 Thread Andrey Drobyshev via
nd overlay are initially uncompressed, copied clusters end up compressed when rebase with compression is performed. 271: 1. Check that when target image has subclusters, rebase with compression will make an entire cluster containing the written subcluster compressed. Signed-off-by: Andrey

[PATCH v2 6/8] iotests/{024, 271}: add testcases for qemu-img rebase

2023-09-15 Thread Andrey Drobyshev via
cluster size > backings cluster size; 271: add test case for rebase images that contain subclusters. Check that no extra allocations are being made. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 | 60 ++ tests/qemu-iotests

[PATCH v2 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-09-15 Thread Andrey Drobyshev via
further down the loop body, as the offsets beyond the old backing size need to be explicitly zeroed. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lunev Reviewed-by: Hanna Czenczek --- qemu-img.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b

[PATCH v2 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-15 Thread Andrey Drobyshev via
ading from the new backing, while buf_old is being used for both reading from the old backing and writing to the target. Let's take that into account and use more appropriate values as alignments. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH v2 4/8] qemu-img: add chunk size parameter to compare_buffers()

2023-09-15 Thread Andrey Drobyshev via
requests aligned to a predefined alignment value. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index d12e4a4753..fcd31d7b5b 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1274,23

[PATCH v2 7/8] qemu-img: add compression option to rebase subcommand

2023-09-15 Thread Andrey Drobyshev via
option affects only the clusters which are actually being copied from the original backing file. The clusters which were uncompressed in the target image will remain so. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lunev Reviewed-by: Hanna Czenczek --- docs/tools/qemu-img.rst | 6

[PATCH v2 2/8] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-09-15 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev Reviewed-by: Denis V. Lu

Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks

2023-09-14 Thread Andrey Drobyshev
On 9/15/23 00:17, Eric Blake wrote: > On Fri, Sep 08, 2023 at 12:02:26AM +0300, Andrey Drobyshev wrote: >> Right now "qemu-img map" reports compressed blocks as containing data >> but having no host offset. This is not very informative. Instead, >> let's

Re: [PATCH v2 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-09-07 Thread Andrey Drobyshev
On 9/6/23 12:43, Denis V. Lunev wrote: > On 7/11/23 19:25, Andrey Drobyshev wrote: >> Add testcase which checks that allocations during copy-on-read are >> performed on the subcluster basis when subclusters are enabled in target >> image. >> >> This testcase a

[PATCH v2 4/3] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Andrey Drobyshev via
idn't meet these requirements, so let's fix it by using more generic "qemu-io -c map" command. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/197 | 8 tests/qemu-iotests/197.out | 18 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git

[PATCH v3 1/2] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-09-07 Thread Andrey Drobyshev via
ek Signed-off-by: Andrey Drobyshev --- block/qcow.c | 5 - block/qcow2.c| 3 +++ block/vmdk.c | 2 ++ include/block/block-common.h | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/block/qcow.c b/block/qcow.c index

[PATCH v3 0/2] qemu-img: map: implement support for compressed clusters

2023-09-07 Thread Andrey Drobyshev via
u.org/archive/html/qemu-block/2023-07/msg00106.html Andrey Drobyshev (2): block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status() qemu-img: map: report compressed data blocks block/qcow.c | 5 +- block/qcow2.c | 3 +

Re: [PATCH 4/6] qemu-img: rebase: avoid unnecessary COW operations

2023-08-29 Thread Andrey Drobyshev
On 8/25/23 18:00, Hanna Czenczek wrote: > On 01.06.23 21:28, Andrey Drobyshev via wrote: >> When rebasing an image from one backing file to another, we need to >> compare data from old and new backings.  If the diff between that data >> happens to be unaligned to the target c

Re: [PATCH 3/6] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-08-29 Thread Andrey Drobyshev
On 8/25/23 17:29, Hanna Czenczek wrote: > On 01.06.23 21:28, Andrey Drobyshev via wrote: >> Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for >> the data read from the old and new backing files are aligned using >> BlockDriverState (or B

Re: [PATCH v2 2/3] qemu-img: map: report compressed data blocks

2023-08-29 Thread Andrey Drobyshev
On 8/25/23 17:14, Hanna Czenczek wrote: > On 06.07.23 18:30, Andrey Drobyshev wrote: >> Right now "qemu-img map" reports compressed blocks as containing data >> but having no host offset.  This is not very informative.  Instead, >> let's add another boolean field

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-08-24 Thread Andrey Drobyshev
On 8/24/23 17:32, Stefan Hajnoczi wrote: > On Wed, Aug 23, 2023 at 03:50:55PM +0300, Andrey Drobyshev wrote: >> On 8/22/23 22:58, John Snow wrote: >>> On Tue, Aug 22, 2023 at 1:33 PM Andrey Drobyshev >>> wrote: >>>> >>>> On 8/16/23 12:22, And

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-08-23 Thread Andrey Drobyshev
On 8/22/23 22:58, John Snow wrote: > On Tue, Aug 22, 2023 at 1:33 PM Andrey Drobyshev > wrote: >> >> On 8/16/23 12:22, Andrey Drobyshev wrote: >>> On 7/31/23 17:51, Andrey Drobyshev wrote: >>>> On 7/24/23 16:11, Andrey Drobyshev wrote: >>>>&g

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-08-22 Thread Andrey Drobyshev
On 8/16/23 12:22, Andrey Drobyshev wrote: > On 7/31/23 17:45, Andrey Drobyshev wrote: >> On 7/24/23 16:10, Andrey Drobyshev wrote: >>> On 7/6/23 19:30, Andrey Drobyshev wrote: >>>> v1 --> v2: >>>> * Add vmdk format to the 1st commit. Tweak commit m

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-08-22 Thread Andrey Drobyshev
On 8/16/23 12:22, Andrey Drobyshev wrote: > On 7/31/23 17:43, Andrey Drobyshev wrote: >> On 7/24/23 16:11, Andrey Drobyshev wrote: >>> On 6/30/23 13:54, Denis V. Lunev wrote: >>>> On 6/1/23 21:28, Andrey Drobyshev wrote: >>>>> This series is adding

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-08-22 Thread Andrey Drobyshev
On 8/16/23 12:22, Andrey Drobyshev wrote: > On 7/31/23 17:51, Andrey Drobyshev wrote: >> On 7/24/23 16:11, Andrey Drobyshev wrote: >>> On 7/11/23 20:25, Andrey Drobyshev wrote: >>>> v1 --> v2: >>>> * Fixed line indentation; >>>> * Fi

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-08-16 Thread Andrey Drobyshev
On 7/31/23 17:45, Andrey Drobyshev wrote: > On 7/24/23 16:10, Andrey Drobyshev wrote: >> On 7/6/23 19:30, Andrey Drobyshev wrote: >>> v1 --> v2: >>> * Add vmdk format to the 1st commit. Tweak commit message accordingly; >>> * Make "compressed&qu

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-08-16 Thread Andrey Drobyshev
On 7/31/23 17:43, Andrey Drobyshev wrote: > On 7/24/23 16:11, Andrey Drobyshev wrote: >> On 6/30/23 13:54, Denis V. Lunev wrote: >>> On 6/1/23 21:28, Andrey Drobyshev wrote: >>>> This series is adding [-c | --compress] option to "qemu-img rebase" >>&

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-08-16 Thread Andrey Drobyshev
On 7/31/23 17:51, Andrey Drobyshev wrote: > On 7/24/23 16:11, Andrey Drobyshev wrote: >> On 7/11/23 20:25, Andrey Drobyshev wrote: >>> v1 --> v2: >>> * Fixed line indentation; >>> * Fixed wording in a comment; >>> * Added R-b. >>> >>

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:11, Andrey Drobyshev wrote: > On 7/11/23 20:25, Andrey Drobyshev wrote: >> v1 --> v2: >> * Fixed line indentation; >> * Fixed wording in a comment; >> * Added R-b. >> >> v1: https://lists.nongnu.org/archive/html/qemu-block/2023-

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:10, Andrey Drobyshev wrote: > On 7/6/23 19:30, Andrey Drobyshev wrote: >> v1 --> v2: >> * Add vmdk format to the 1st commit. Tweak commit message accordingly; >> * Make "compressed" field in MapEntry optional. >> >> v1: https://li

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:11, Andrey Drobyshev wrote: > On 6/30/23 13:54, Denis V. Lunev wrote: >> On 6/1/23 21:28, Andrey Drobyshev wrote: >>> This series is adding [-c | --compress] option to "qemu-img rebase" >>> command, which might prove useful for saving s

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-07-24 Thread Andrey Drobyshev
On 7/11/23 20:25, Andrey Drobyshev wrote: > v1 --> v2: > * Fixed line indentation; > * Fixed wording in a comment; > * Added R-b. > > v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html > > Andrey Drobyshev (3): > block: add subcluster

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-07-24 Thread Andrey Drobyshev
On 6/30/23 13:54, Denis V. Lunev wrote: > On 6/1/23 21:28, Andrey Drobyshev wrote: >> This series is adding [-c | --compress] option to "qemu-img rebase" >> command, which might prove useful for saving some disk space when, for >> instance, manipulating chains of

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-24 Thread Andrey Drobyshev
On 7/6/23 19:30, Andrey Drobyshev wrote: > v1 --> v2: > * Add vmdk format to the 1st commit. Tweak commit message accordingly; > * Make "compressed" field in MapEntry optional. > > v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00184.html > &g

Re: [PATCH 2/3] block/io: align requests to subcluster_size

2023-07-11 Thread Andrey Drobyshev
On 7/10/23 22:47, Eric Blake wrote: > On Mon, Jun 26, 2023 at 07:08:33PM +0300, Andrey Drobyshev via wrote: >> When target image is using subclusters, and we align the request during >> copy-on-read, it makes sense to align to subcluster_size rather than >> cluster_size.

[PATCH v2 0/3] block: align CoR requests to subclusters

2023-07-11 Thread Andrey Drobyshev via
v1 --> v2: * Fixed line indentation; * Fixed wording in a comment; * Added R-b. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html Andrey Drobyshev (3): block: add subcluster_size field to BlockDriverInfo block/io: align requests to subcluster_size tests/q

[PATCH v2 2/3] block/io: align requests to subcluster_size

2023-07-11 Thread Andrey Drobyshev via
ytes < pnum' failed. Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev Signed-off-by: Andrey Drobyshev --- block/io.c | 50 block/mirror.c | 8 +++ include/block/block-io.h | 8 +++ 3 files changed, 33 insertions(+), 33 d

[PATCH v2 1/3] block: add subcluster_size field to BlockDriverInfo

2023-07-11 Thread Andrey Drobyshev via
it equal to the cluster size thus treating each cluster as having a single subcluster. Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev Signed-off-by: Andrey Drobyshev --- block.c | 7 +++ block/qcow2.c| 1 + include/block/block-common.h | 5 + 3 files

[PATCH v2 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-07-11 Thread Andrey Drobyshev via
: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed. Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/197 | 29 + tests/qemu-iotests/197.out | 24 2 files changed,

Re: [PATCH 0/3] block: align CoR requests to subclusters

2023-07-07 Thread Andrey Drobyshev
On 6/26/23 19:08, Andrey Drobyshev wrote: > This series makes IO requests performed with copy-on-read to be aligned > to subclusters rather than clusters. It also affects mirror job requests > alignment. > > The initial reason for that change is the following crash discovered

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-07-07 Thread Andrey Drobyshev
On 6/30/23 13:54, Denis V. Lunev wrote: > On 6/1/23 21:28, Andrey Drobyshev wrote: >> This series is adding [-c | --compress] option to "qemu-img rebase" >> command, which might prove useful for saving some disk space when, for >> instance, manipulating chains of

[PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-06 Thread Andrey Drobyshev via
v1 --> v2: * Add vmdk format to the 1st commit. Tweak commit message accordingly; * Make "compressed" field in MapEntry optional. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00184.html Andrey Drobyshev (3): block: add BDRV_BLOCK_COMPRESSED flag for bdrv

[PATCH v2 3/3] qemu-iotests: update expected tests output to contain "compressed" field

2023-07-06 Thread Andrey Drobyshev via
The previous commit adds "compressed" boolean field to JSON output of "qemu-img map" command. Let's tweak expected tests output accordingly. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/122.out| 84 tests/qemu-iotests/154.out

[PATCH v2 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-07-06 Thread Andrey Drobyshev via
that caller may know that the data range is compressed. In particular, we're going to use this flag to tweak "qemu-img map" output. This new flag is only being utilized by qcow, qcow2 and vmdk formats, as only those support compression. Signed-off-by: Andrey Drobyshev --- bl

[PATCH v2 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Andrey Drobyshev via
location status flag BDRV_BLOCK_COMPRESSED for bdrv_block_status(). Signed-off-by: Andrey Drobyshev --- qapi/block-core.json | 7 +-- qemu-img.c | 16 +--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5dd5f7e4b

Re: [PATCH 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Andrey Drobyshev
On 6/21/23 21:12, Denis V. Lunev wrote: > On 6/7/23 17:26, Andrey Drobyshev wrote: >> Right now "qemu-img map" reports compressed blocks as containing data >> but having no host offset.  This is not very informative.  Instead, >> let's add another boolean field

[PATCH 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-06-26 Thread Andrey Drobyshev via
: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/197 | 29 + tests/qemu-iotests/197.out | 24 2 files changed, 53 insertions(+) diff --git a/tests/qemu-iotests/197 b/te

[PATCH 2/3] block/io: align requests to subcluster_size

2023-06-26 Thread Andrey Drobyshev via
pnum' failed. Signed-off-by: Andrey Drobyshev --- block/io.c | 50 block/mirror.c | 8 +++ include/block/block-io.h | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/block/io.c b/block/io.c index

[PATCH 0/3] block: align CoR requests to subclusters

2023-06-26 Thread Andrey Drobyshev via
ignment fixes the crash and adds test case covering it. Andrey Drobyshev (3): block: add subcluster_size field to BlockDriverInfo block/io: align requests to subcluster_size tests/qemu-iotests/197: add testcase for CoR with subclusters block.c | 6 + block/io.c

[PATCH 1/3] block: add subcluster_size field to BlockDriverInfo

2023-06-26 Thread Andrey Drobyshev via
it equal to the cluster size thus treating each cluster as having a single subcluster. Signed-off-by: Andrey Drobyshev --- block.c | 7 +++ block/qcow2.c| 1 + include/block/block-common.h | 5 + 3 files changed, 13 insertions(+) diff --git a/block.c b

Re: [PATCH 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-06-21 Thread Andrey Drobyshev
On 6/21/23 20:46, Denis V. Lunev wrote: > On 6/21/23 19:08, Denis V. Lunev wrote: >> On 6/7/23 17:26, Andrey Drobyshev wrote: >>> Functions qcow2_get_host_offset(), get_cluster_offset() explicitly >>> report compressed cluster types when data is compressed. However, th

[PATCH 3/3] qemu-iotests: update expected tests output to contain "compressed" field

2023-06-07 Thread Andrey Drobyshev via
The previous commit adds "compressed" boolean field to JSON output of "qemu-img map" command. Let's tweak expected tests output accordingly. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/122.out| 84 tests/qemu-iotests/154.out

[PATCH 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-06-07 Thread Andrey Drobyshev via
that the data range is compressed. In particular, we're going to use this flag to tweak "qemu-img map" output. This new flag is only being utilized by qcow and qcow2 formats, as only these two support compression. Signed-off-by: Andrey Drobyshev --- block/qcow.c | 5 - blo

[PATCH 0/3] qemu-img: map: implement support for compressed clusters

2023-06-07 Thread Andrey Drobyshev via
sed": true}, { "start": 65536, "length": 65536, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 393216}, { "start": 131072, "length": 65536, "depth": 0,

[PATCH 2/3] qemu-img: map: report compressed data blocks

2023-06-07 Thread Andrey Drobyshev via
location status flag BDRV_BLOCK_COMPRESSED for bdrv_block_status(). Signed-off-by: Andrey Drobyshev --- qapi/block-core.json | 7 +-- qemu-img.c | 16 +--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 5dd5f7e4b

Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-06-02 Thread Andrey Drobyshev
On 6/2/23 00:18, Michael Tokarev wrote: > 01.06.2023 22:28, Andrey Drobyshev via пишет: >> In case when we're rebasing within one backing chain, and when target >> image >> is larger than old backing file, bdrv_is_allocated_above() ends up >> setting >> *pnum = 0. 

Re: [PATCH v2 0/2] qemu-img: fix getting stuck in infinite loop on in-chain rebase

2023-06-01 Thread Andrey Drobyshev
On 5/25/23 21:02, Andrey Drobyshev wrote: > v1 -> v2: > > * Avoid breaking the loop just yet, as the offsets beyond the old > backing size need to be explicitly zeroed; > * Amend the commit message accordingly; > * Alter the added test case to take th

[PATCH 0/6] qemu-img: rebase: add compression support

2023-06-01 Thread Andrey Drobyshev via
responding test case. Patch 3 merely fixes wrong args used in allocation. Patch 4 makes write requests during rebase operation cluster_size-aligned, which seems to be beneficial for both non-compressed and compressed mode. The last 2 patches are the actual feature implementation + tests. Andrey Dr

[PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-06-01 Thread Andrey Drobyshev via
further down the loop body, as the offsets beyond the old backing size need to be explicitly zeroed. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 27f48051b0..78433f3746 100644 --- a/qemu

[PATCH 5/6] qemu-img: add compression option to rebase subcommand

2023-06-01 Thread Andrey Drobyshev via
option affects only the clusters which are actually being copied from the original backing file. The clusters which were uncompressed in the target image will remain so. Signed-off-by: Andrey Drobyshev --- docs/tools/qemu-img.rst | 6 -- qemu-img-cmds.hx| 4 ++-- qemu-img

[PATCH 4/6] qemu-img: rebase: avoid unnecessary COW operations

2023-06-01 Thread Andrey Drobyshev via
lready read earlier to perform data comparison. In order to avoid these unnecessary IO cycles, let's make sure every write request is aligned to the overlay cluster size. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 72 +++--- 1 file changed, 52 ins

[PATCH 6/6] iotests: add test 314 for "qemu-img rebase" with compression

2023-06-01 Thread Andrey Drobyshev via
compressed, copied clusters end up compressed when rebase with compression is performed. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/314 | 165 + tests/qemu-iotests/314.out | 75 + 2 files changed, 240 insertions(+) c

[PATCH 2/6] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-06-01 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 |

[PATCH 3/6] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-06-01 Thread Andrey Drobyshev via
ng written to and has nothing to do with those buffers. Let's fix that. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 78433f3746..60f4c06487 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3746,8 +3746,8

[PATCH v2 1/2] qemu-img: rebase: stop when reaching EOF of old backing file

2023-05-25 Thread Andrey Drobyshev via
further down the loop body, as the offsets beyond the old backing size need to be explicitly zeroed. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 27f48051b0..78433f3746 100644 --- a/qemu

[PATCH v2 0/2] qemu-img: fix getting stuck in infinite loop on in-chain rebase

2023-05-25 Thread Andrey Drobyshev via
tml/qemu-block/2023-05/msg00674.html Andrey Drobyshev (2): qemu-img: rebase: stop when reaching EOF of old backing file qemu-iotests: 024: add rebasing test case for overlay_size > backing_size qemu-img.c | 13 - tests/qemu-iotests/024

[PATCH v2 2/2] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-05-25 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 |

Re: [PATCH 1/2] qemu-img: rebase: stop when reaching EOF of old backing file

2023-05-25 Thread Andrey Drobyshev
On 5/24/23 11:30, Denis V. Lunev wrote: > On 5/23/23 18:24, Andrey Drobyshev wrote: >> In case when we're rebasing within one backing chain, and when target >> image >> is larger than old backing file, bdrv_is_allocated_above() ends up >> setting >> *pnum = 0. 

[PATCH 1/2] qemu-img: rebase: stop when reaching EOF of old backing file

2023-05-23 Thread Andrey Drobyshev via
the loop, as there's no more data to be read and merged from the old backing. Signed-off-by: Andrey Drobyshev --- qemu-img.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-img.c b/qemu-img.c index 27f48051b0..55b6ce407c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3813,6 +3813,13

[PATCH 2/2] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-05-23 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 |

[PATCH 0/2] qemu-img: fix getting stuck in infinite loop on

2023-05-23 Thread Andrey Drobyshev via
-img rebase -f qcow2 -b base.qcow2 -F qcow2 inc2.qcow2 And then rebase operation gets stuck forever. The 1st patch is a fix, the 2nd -- an additional test case to catch this situation. Andrey Drobyshev (2): qemu-img: rebase: stop when reaching EOF of old backing file qemu-iotests: 024: add

Re: [PATCH v2 1/2] qga-win: add logging to Windows event log

2023-01-26 Thread Andrey Drobyshev
On 1/23/23 22:52, Stefan Weil wrote: > Am 23.01.23 um 20:38 schrieb Andrey Drobyshev: > >> Hi Stefan, >> >> On 1/23/23 19:28, Stefan Weil wrote: >>> Hi, >>> >>> cross builds fail with this code. Please see details below. >>> >>>

Re: [PATCH v2 1/2] qga-win: add logging to Windows event log

2023-01-23 Thread Andrey Drobyshev
Hi Stefan, On 1/23/23 19:28, Stefan Weil wrote: > Hi, > > cross builds fail with this code. Please see details below. > > Am 29.11.22 um 18:38 schrieb Andrey Drobyshev via: >> This commit allows QGA to write to Windows event log using Win32 API's >> ReportEvent() [1

Re: [PATCH v2 0/2] qga: improve "syslog" domain logging

2022-12-16 Thread Andrey Drobyshev
On 12/16/22 12:01, Konstantin Kostiuk wrote: > Reviewed-by: Konstantin Kostiuk > > Tested-by: Konstantin Kostiuk > > > > Hi Andrey, > Do you expect Event Viewer to be empty by default in the current > implementation? > Currently, all logs

[PATCH v2] qga-win: choose the right libpcre version to include in MSI package

2022-12-13 Thread Andrey Drobyshev via
or libpcre2-8-0.dll, depending on the present version of GLib. [1] https://gitlab.gnome.org/GNOME/glib/-/releases#2.73.2 Previous version: https://lists.nongnu.org/archive/html/qemu-trivial/2022-11/msg00237.html Signed-off-by: Andrey Drobyshev --- qga/installer/qemu-ga.wxs | 12 +--- qga

Re: [PATCH v2 0/2] qga: improve "syslog" domain logging

2022-12-12 Thread Andrey Drobyshev
On 11/29/22 19:38, Andrey Drobyshev wrote: > These patches extend QGA logging interface, primarily under Windows > guests. They enable QGA to write to Windows event log, much like > syslog() on *nix. In addition we get rid of hardcoded log level used by > ga_log(). > > v2: &

[PATCH v2 0/2] qga: improve "syslog" domain logging

2022-11-29 Thread Andrey Drobyshev via
indentation as reported by scripts/checkpatch.pl Andrey Drobyshev (2): qga-win: add logging to Windows event log qga: map GLib log levels to system levels configure | 3 +++ qga/installer/qemu-ga.wxs | 5 qga/main.c| 50

[PATCH v2 2/2] qga: map GLib log levels to system levels

2022-11-29 Thread Andrey Drobyshev via
n. However, this patch allows the interface to be extended. Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour doesn't change. Originally-by: Yuri Pudgorodskiy Signed-off-by: Andrey Drobyshev Reviewed-by: Marc-André Lureau --- qga/main.c | 36 ++--

[PATCH v2 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev via
ext-files Originally-by: Yuri Pudgorodskiy Signed-off-by: Andrey Drobyshev --- configure | 3 +++ qga/installer/qemu-ga.wxs | 5 + qga/main.c| 16 +--- qga/meson.build | 19 ++- qga/messages-win32.mc | 9 +

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev
On 11/29/22 09:37, Marc-André Lureau wrote: > Hi > > On Tue, Nov 29, 2022 at 12:59 AM Andrey Drobyshev via > wrote: >> >> This commit allows QGA to write to Windows event log using Win32 API's >> ReportEvent() [1], much like syslog() under *nix guests. >>

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev
On 11/29/22 00:36, M M wrote: > > >> On 28. 11. 2022., at 21:54, Andrey Drobyshev via >> wrote: >> >> This commit allows QGA to write to Windows event log using Win32 API's >> ReportEvent() [1], much like syslog() under *nix guests. >> >> In

[PATCH 1/2] qga-win: add logging to Windows event log

2022-11-28 Thread Andrey Drobyshev via
ext-files Originally-by: Yuri Pudgorodskiy Signed-off-by: Andrey Drobyshev --- configure | 3 +++ qga/installer/qemu-ga.wxs | 5 + qga/main.c| 15 --- qga/meson.build | 19 ++- qga/messages-win32.mc | 9 +

[PATCH 2/2] qga: map GLib log levels to system levels

2022-11-28 Thread Andrey Drobyshev via
n. However, this patch allows the interface to be extended. Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour doesn't change. Originally-by: Yuri Pudgorodskiy Signed-off-by: Andrey Drobyshev --- qga/main.c | 36 ++-- 1 file changed, 34 insertions(

[PATCH 0/2] qga: improve "syslog" domain logging

2022-11-28 Thread Andrey Drobyshev via
These patches extend QGA logging interface, primarily under Windows guests. They enable QGA to write to Windows event log, much like syslog() on *nix. In addition we get rid of hardcoded log level used by ga_log(). Andrey Drobyshev (2): qga-win: add logging to Windows event log qga: map

<    1   2