Re: [PATCH 1/6] parallels: Incorrect data end calculation in parallels_open()

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains a

Re: [PATCH 4/6] parallels: Use highest_offset() helper in leak check

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: Deduplicate code by using highest_offset() helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 339ce45634..688aa081e2

Re: [PATCH 5/6] parallels: Replace fprintf by qemu_log

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: Use a standard QEMU function for logging. Signed-off-by: Alexander Ivanov --- block/parallels.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 688aa081e2..08526196da 100644 --

Re: [PATCH 6/6] parallels: Image repairing in parallels_open()

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:53, Alexander Ivanov wrote: Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov --- block/parallels.c | 95 --- 1 file changed, 65 insertions(+), 30 deletions(-)

Re: [PATCH 3/6] parallels: Add checking and repairing duplicate offsets in BAT

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: Cluster offsets must be unique among all BAT entries. Find duplicate offsets in the BAT. If a duplicated offset is found fix it by copying the content of the relevant cluster to a new allocated cluster and set the new cluster offset to the duplicated entr

Re: [PATCH 2/6] parallels: Create parallels_handle_leak() to truncate excess clusters

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: This helper will be reused in the next patch for duplications check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 65 +++ 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/block/para

Re: [PATCH 0/6] parallels: Add duplication check, repair at open, fix bugs

2022-09-07 Thread Denis V. Lunev
On 9/2/22 10:52, Alexander Ivanov wrote: This patchset is based on git: https://src.openvz.org/~den/qemu.git parallels Fix incorrect data end calculation in parallels_open(). Add parallels_handle_leak() and highest_offset() helpers. Add checking and repairing duplicate offsets in BAT. Dedupli

Re: [PATCH for 7.2] minor fixups in block code

2022-09-07 Thread Denis V. Lunev
On 8/17/22 10:37, Denis V. Lunev wrote: These 2 patches are just minor improvements to make code a bit better. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC: Fam Zheng CC: Ronnie Sahlberg CC: Paolo Bonzini CC: Peter Lieven CC: Vladimir Sementsov-Ogie

Re: [PATCH v5 0/2] block: add missed block_acct_setup with new block device init procedure

2022-09-07 Thread Denis V. Lunev
On 8/24/22 11:50, Denis V. Lunev wrote: Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from the first glance, but it has changed things a lot. 'libvirt' uses it to detect that it should follow new initialization way and this changes things considerably. With this procedure fo

Re: [PATCH v5 0/2] block: add missed block_acct_setup with new block device init procedure

2022-09-07 Thread Markus Armbruster
"Denis V. Lunev" writes: > On 8/24/22 11:50, Denis V. Lunev wrote: >> Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from >> the first glance, but it has changed things a lot. 'libvirt' uses it to >> detect that it should follow new initialization way and this changes >> thin