Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations when they are actually

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-18 Thread Markus Armbruster
Eric Blake writes: > On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: >> qemu_rdma_save_page() reports polling error with error_report(), then >> succeeds anyway. This is because the variable holding the polling >> status *shadows* the variable the function returns. The

Re: [PULL 00/28] Block layer patches

2023-09-18 Thread Stefan Hajnoczi
Hi Kevin, I believe that my own commit "block-coroutine-wrapper: use qemu_get_current_aio_context()" breaks this test. The failure is non-deterministic (happens about 1 out of 4 runs). It seems the job hangs and the test times out in vm.run_job('job1', wait=5.0). I haven't debugged it yet but

[PATCH 12/22] parallels: collect bitmap of used clusters at open

2023-09-18 Thread Denis V. Lunev
If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept as is for future bissecting. It should

[PATCH 09/22] tests: ensure that image validation will not cure the corruption

2023-09-18 Thread Denis V. Lunev
Since commit cfce1091d55322789582480798a891cbaf66924e Author: Alexander Ivanov Date: Tue Jul 18 12:44:29 2023 +0200 parallels: Image repairing in parallels_open() there is a potential pit fall with calling qemu-io -c "read" The image is opened in read-write mode and thus

[PATCH 11/22] parallels: add test which will validate data_off fixes through repair

2023-09-18 Thread Denis V. Lunev
We have only check through self-repair and that proven to be not enough. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 17 + tests/qemu-iotests/tests/parallels-checks.out | 18 ++ 2 files changed,

[PATCH 15/22] parallels: accept multiple clusters in mark_used()

2023-09-18 Thread Denis V. Lunev
This would be useful in the next patch in allocate_clusters(). This change would not imply serious performance drawbacks as usually image is full of data or are at the end of the bitmap. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 18 ++

[PATCH 10/22] parallels: fix broken parallels_check_data_off()

2023-09-18 Thread Denis V. Lunev
Once we have repaired data_off field in the header we should update s->data_start which is calculated on the base of it. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c

[PATCH 17/22] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-18 Thread Denis V. Lunev
The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 51 --- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c

Re: [PATCH 3/3] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
On 9/18/23 20:00, Denis V. Lunev wrote: This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster

[PATCH 21/22] parallels: naive implementation of parallels_co_pwrite_zeroes

2023-09-18 Thread Denis V. Lunev
The zero flag is missed in the Parallels format specification. We can resort to discard if we have no backing file. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/parallels.c

[PATCH 02/22] parallels: mark driver as supporting CBT

2023-09-18 Thread Denis V. Lunev
Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img. Note: read-write support is signalled through

[PATCH 05/22] parallels: return earler in fail_format branch in parallels_open()

2023-09-18 Thread Denis V. Lunev
We do not need to perform any deallocation/cleanup if wrong format is detected. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 18/22] parallels: improve readability of allocate_clusters

2023-09-18 Thread Denis V. Lunev
Replace 'space' representing the amount of data to preallocate with 'bytes'. Rationale: * 'space' at each place is converted to bytes * the unit is more close to the variable name Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 13 + 1 file

[PATCH 16/22] parallels: update used bitmap in allocate_cluster

2023-09-18 Thread Denis V. Lunev
We should extend the bitmap if the file is extended and set the bit in the image used bitmap once the cluster is allocated. Sanity check at that moment also looks like a good idea. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file

[PATCH 14/22] tests: test self-cure of parallels image with duplicated clusters

2023-09-18 Thread Denis V. Lunev
The test is quite similar with the original one for duplicated clusters. There is the only difference in the operation which should fix the image. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 36 +++

[PATCH 20/22] tests: extend test 131 to cover availability of the discard operation

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests discard and new cluster allocation logic. The following checks are added: * write 2 clusters, discard the first allocated * write another cluster, check that the hole is filled * write 2 clusters, discard the first allocated, write 1 cluster at

[PATCH 13/22] tests: fix broken deduplication check in parallels format test

2023-09-18 Thread Denis V. Lunev
Original check is broken as supposed reading from 2 different clusters results in read from the same file offset twice. This is definitely wrong. We should be sure that * the content of both clusters is correct after repair * clusters are at the different offsets after repair In order to check

[PATCH v2 00/22] implement discard operation for Parallels images

2023-09-18 Thread Denis V. Lunev
This series introduces new block allocator scheme into unused data blocks inside the image first and only after that extends the file. On top of that naive implementation of discard and write-zeroes (through the discard) is added. There are also a bunch of bugs revealed in the code during the

[PATCH 3/3] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster Signed-off-by: Denis V. Lunev Reviewed-by:

[PATCH 07/22] parallels: refactor path when we need to re-check image in parallels_open

2023-09-18 Thread Denis V. Lunev
More conditions follows thus the check should be more scalable. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 04/22] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts

2023-09-18 Thread Denis V. Lunev
This patch creates above mentioned helper and moves its usage to the beginning of parallels_open(). This simplifies parallels_open() a bit. The patch also ensures that we store prealloc_size on block driver state always in sectors. This makes code cleaner and avoids wrong opinion at the

[PATCH 19/22] parallels: naive implementation of parallels_co_pdiscard

2023-09-18 Thread Denis V. Lunev
* Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev --- block/parallels.c | 46 ++ 1 file

[PATCH 08/22] parallels: create mark_used() helper which sets bit in used bitmap

2023-09-18 Thread Denis V. Lunev
This functionality is used twice already and next patch will add more code with it. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/block/parallels.c

[PATCH 22/22] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster Signed-off-by: Denis V. Lunev Reviewed-by:

[PATCH 06/22] parallels: return earlier from parallels_open() function on error

2023-09-18 Thread Denis V. Lunev
At the beginning of the function we can return immediately until we really allocate s->header. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/block/parallels.c

[PATCH 01/22] parallels: fix formatting in bdrv_parallels initialization

2023-09-18 Thread Denis V. Lunev
Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git

[PATCH 03/22] parallels: fix memory leak in parallels_open()

2023-09-18 Thread Denis V. Lunev
We should free opts allocated through qemu_opts_create() at the end. Signed-off-by: Denis V. Lunev --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 428f72de1c..af7be427c9 100644 --- a/block/parallels.c +++ b/block/parallels.c

Deadlock with SATA CD I/O and eject

2023-09-18 Thread John Levon
Observed with base of qemu 6.2.0, but from code inspection it looks to me like it's still current in upstream master. Apologies if I have missed a fix in this area. Symptom: run a UEFI-booted SATA CD Windows installer. When it hits "Loading files.." screen, run an eject e.g. virsh

[PATCH v2 2/2] virtio-blk: add iothread-vq-mapping parameter

2023-09-18 Thread Stefan Hajnoczi
Add the iothread-vq-mapping parameter to assign virtqueues to IOThreads. Store the vq:AioContext mapping in the new struct VirtIOBlockDataPlane->vq_aio_context[] field and refactor the code to use the per-vq AioContext instead of the BlockDriverState's AioContext. Reimplement --device

[PATCH v2 1/2] qdev: add IOThreadVirtQueueMappingList property type

2023-09-18 Thread Stefan Hajnoczi
virtio-blk and virtio-scsi devices will need a way to specify the mapping between IOThreads and virtqueues. At the moment all virtqueues are assigned to a single IOThread or the main loop. This single thread can be a CPU bottleneck, so it is necessary to allow finer-grained assignment to spread

[PATCH v2 0/2] virtio-blk: add iothread-vq-mapping parameter

2023-09-18 Thread Stefan Hajnoczi
virtio-blk and virtio-scsi devices need a way to specify the mapping between IOThreads and virtqueues. At the moment all virtqueues are assigned to a single IOThread or the main loop. This single thread can be a CPU bottleneck, so it is necessary to allow finer-grained assignment to spread the

Re: [PATCH 03/21] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: This patch creates above mentioned helper and moves its usage to the beginning of parallels_open(). This simplifies parallels_open() a bit. The patch also ensures that we store prealloc_size on block driver state always in sectors. This makes code cleaner

Re: [PATCH 21/21] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster

Re: [PATCH 20/21] parallels: naive implementation of parallels_co_pwrite_zeroes

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: The zero flag is missed in the Parallels format specification. We can resort to discard if we have no backing file. Signed-off-by: Denis V. Lunev --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

Re: [PATCH 19/21] tests: extend test 131 to cover availability of the discard operation

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: This patch contains test which minimally tests discard and new cluster allocation logic. The following checks are added: * write 2 clusters, discard the first allocated * write another cluster, check that the hole is filled * write 2 clusters, discard the

Re: [PULL 00/28] Block layer patches

2023-09-18 Thread Stefan Hajnoczi
Hi Kevin, The following CI failure looks like it is related to this pull request. Please take a look: https://gitlab.com/qemu-project/qemu/-/jobs/5112083994 ▶ 823/840 qcow2 iothreads-commit-active FAIL 823/840 qemu:block / io-qcow2-iothreads-commit-active ERROR 6.16s exit status 1 >>>

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Markus Armbruster 于2023年9月18日周一 22:46写道: > > Sam Li writes: > > > Markus Armbruster 于2023年9月1日周五 19:08写道: > >> > >> Sam Li writes: > >> > >> > To configure the zoned format feature on the qcow2 driver, it > >> > requires following arguments: the device size, zoned profile, > >> > >> "Zoned

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations when they are actually

Re: [PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations when they are actually

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2023年9月1日周五 19:08写道: >> >> Sam Li writes: >> >> > To configure the zoned format feature on the qcow2 driver, it >> > requires following arguments: the device size, zoned profile, >> >> "Zoned profile" is gone in v3. >> >> > zone model, zone size, zone

Re: [PATCH 18/21] parallels: naive implementation of parallels_co_pdiscard

2023-09-18 Thread Denis V. Lunev
On 9/18/23 15:57, Alexander Ivanov wrote: On 9/15/23 20:41, Denis V. Lunev wrote: * Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev

Re: [PATCH 18/21] parallels: naive implementation of parallels_co_pdiscard

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: * Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev --- block/parallels.c | 47

Re: [PATCH 16/21] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-18 Thread Alexander Ivanov
On 9/18/23 15:14, Denis V. Lunev wrote: On 9/18/23 15:09, Alexander Ivanov wrote: On 9/15/23 20:41, Denis V. Lunev wrote: The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev ---   block/parallels.c | 51 ---  

Re: [PATCH 17/21] parallels: improve readability of allocate_clusters

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Replace 'space' representing the amount of data to preallocate with 'bytes'. Rationale: * 'space' at each place is converted to bytes * the unit is more close to the variable name Signed-off-by: Denis V. Lunev --- block/parallels.c | 13 +

Re: [PATCH 16/21] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-18 Thread Denis V. Lunev
On 9/18/23 15:09, Alexander Ivanov wrote: On 9/15/23 20:41, Denis V. Lunev wrote: The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev ---   block/parallels.c | 51 ---   1 file changed, 39 insertions(+), 12

Re: [PATCH 16/21] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev --- block/parallels.c | 51 --- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/block/parallels.c

Re: [PATCH 15/21] parallels: update used bitmap in allocate_cluster

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: We should extend the bitmap ff the file is extended and set the bit in Typo: ff -> if. the image used bitmap once the cluster is allocated. Sanity check at that moment also looks like a good idea. Signed-off-by: Denis V. Lunev ---

Re: [PATCH 14/21] parallels: accept multiple clusters in mark_used()

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: This would be useful in the next patch in allocate_clusters(). This change would not imply serious performance drawbacks as usually image is full of data or are at the end of the bitmap. Signed-off-by: Denis V. Lunev --- block/parallels.c | 18

Re: [PATCH 13/21] tests: test self-cure of parallels image with duplicated clusters

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: The test is quite similar with the original one for duplicated clusters. There is the only difference in the operation which should fix the image. Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/tests/parallels-checks | 36 +++

Re: [PATCH 12/21] tests: fix broken deduplication check in parallels format test

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Original check is broken as supposed reading from 2 different clusters results in read from the same file offset twice. This is definitely wrong. We should be sure that * the content of both clusters is correct after repair * clusters are at the different

Re: [PATCH 11/21] parallels: collect bitmap of used clusters at open

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept

Re: [PATCH 2/3] backends: Initial support for SPDM socket support

2023-09-18 Thread Jonathan Cameron via
On Mon, 18 Sep 2023 13:16:01 +1000 Alistair Francis wrote: > On Sat, Sep 16, 2023 at 1:19 AM Jonathan Cameron > wrote: > > > > On Fri, 15 Sep 2023 21:27:22 +1000 > > Alistair Francis wrote: > > > > > From: Huai-Cheng Kuo > > > > Great to see you taking this forwards! > > > > > > > > > >

[PATCH v4 4/4] iotests: test the zoned format feature for qcow2 file

2023-09-18 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 129 ++ tests/qemu-iotests/tests/zoned-qcow2.out | 133 +++ 2 files

[PATCH v4 3/4] qcow2: add zoned emulation capability

2023-09-18 Thread Sam Li
By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned integers. Each

[PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
To configure the zoned format feature on the qcow2 driver, it requires settings as: the device size, zone model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append sectors, max open zones, and max_active_zones). To create a qcow2 file with zoned format,

[PATCH v4 0/4] Add full zoned storage emulation to qcow2 driver

2023-09-18 Thread Sam Li
This patch series add a new extension - zoned format - to the qcow2 driver thereby allowing full zoned storage emulation on the qcow2 img file. Users can attach such a qcow2 file to the guest as a zoned device. Write pointer are preserved in the zoned metadata. It will be recovered after power

[PATCH v4 1/4] docs/qcow2: add the zoned format feature

2023-09-18 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file can be taken as zoned device and passed through by virtio-blk device or NVMe ZNS device to the guest given zoned information. Signed-off-by: Sam Li --- docs/system/qemu-block-drivers.rst.inc | 33

Re: [PATCH 10/21] parallels: add test which will validate data_off fixes through repair

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: We have only check through self-repair and that proven to be not enough. Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/tests/parallels-checks | 17 + tests/qemu-iotests/tests/parallels-checks.out | 18 ++ 2

Re: [PATCH 09/21] parallels: fix broken parallels_check_data_off()

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Once we have repaired data_off field in the header we should update s->data_start which is calculated on the base of it. Signed-off-by: Denis V. Lunev --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c

Re: [PATCH 08/21] tests: ensure that image validation will not cure the corruption

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Since commit cfce1091d55322789582480798a891cbaf66924e Author: Alexander Ivanov Date: Tue Jul 18 12:44:29 2023 +0200 parallels: Image repairing in parallels_open() there is a potential pit fall with calling qemu-io -c "read" The

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Stefan Hajnoczi 于2023年9月14日周四 04:12写道: > > On Mon, Aug 28, 2023 at 11:09:53PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires following arguments: the device size, zoned profile, > > zone model, zone size, zone capacity, number of conventional >

Re: [PATCH 07/21] parallels: create mark_used() helper which sets bit in used bitmap

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: This functionality is used twice already and next patch will add more code with it. Signed-off-by: Denis V. Lunev --- block/parallels.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git

Re: [PATCH 06/21] parallels: refactor path when we need to re-check image in parallels_open

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: More conditions follows thus the check should be more scalable. Signed-off-by: Denis V. Lunev --- block/parallels.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Markus Armbruster 于2023年9月1日周五 19:08写道: > > Sam Li writes: > > > To configure the zoned format feature on the qcow2 driver, it > > requires following arguments: the device size, zoned profile, > > "Zoned profile" is gone in v3. > > > zone model, zone size, zone capacity, number of conventional >

Re: [PATCH 04/21] parallels: return earler in fail_format branch in parallels_open()

2023-09-18 Thread Denis V. Lunev
On 9/18/23 10:14, Alexander Ivanov wrote: This is not the case with this patch, but it seems that the 5 first "goto fail;" could be replaced by returns. The first allocation, freeing at the "fail" label, is at 1127 line. The next error handling and all the previous ones can make return instead

Re: [PATCH 05/21] parallels: return earlier from parallels_open() function on error

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: At the beginning of the function we can return immediately until we really allocate s->header. Signed-off-by: Denis V. Lunev --- block/parallels.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/block/parallels.c

Re: [PATCH 04/21] parallels: return earler in fail_format branch in parallels_open()

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: We do not need to perform any deallocation/cleanup if wrong format is detected. Signed-off-by: Denis V. Lunev --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index

Re: [PATCH 04/21] parallels: return earler in fail_format branch in parallels_open()

2023-09-18 Thread Alexander Ivanov
This is not the case with this patch, but it seems that the 5 first "goto fail;" could be replaced by returns. The first allocation, freeing at the "fail" label, is at 1127 line. The next error handling and all the previous ones can make return instead goto fail. On 9/15/23 20:41, Denis V.

Re: [PATCH 02/21] parallels: mark driver as supporting CBT

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img.

Re: [PATCH 01/21] parallels: fix formatting in bdrv_parallels initialization

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git

Re: [PATCH 01/21] parallels: fix formatting in bdrv_parallels initialization

2023-09-18 Thread Alexander Ivanov
On 9/15/23 20:41, Denis V. Lunev wrote: Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git