Re: [PATCH] raw-format: Fix error message for invalid offset/size

2024-08-30 Thread Hanna Czenczek
rmat: Split raw_read_options()') Signed-off-by: Kevin Wolf --- block/raw-format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-17 Thread Hanna Czenczek
vating the images first, which can still return errors, but already performs all of the write operations. Only then the images are actually blk_unref()-ed. Reviewed-by: Hanna Czenczek

Re: [PATCH v8 07/11] parallels: Move check of cluster outside image to a separate function

2023-01-18 Thread Hanna Czenczek
On 15.01.23 16:58, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 59 ++

Re: [PATCH v8 11/11] parallels: Incorrect condition in out-of-image check

2023-01-18 Thread Hanna Czenczek
On 15.01.23 16:58, Alexander Ivanov wrote: All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH v8 08/11] parallels: Move check of leaks to a separate function

2023-01-18 Thread Hanna Czenczek
On 15.01.23 16:58, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 84 ++

Re: [PATCH v2 01/12] block: Improve empty format-specific info dump

2023-01-20 Thread Hanna Czenczek
On 19.01.23 15:00, Kevin Wolf wrote: Am 20.06.2022 um 18:26 hat Hanna Reitz geschrieben: When a block driver supports obtaining format-specific information, but that object only contains optional fields, it is possible that none of them are present, so that dump_qobject() (called by bdrv_image_i

Re: [PATCH v2 03/12] block/vmdk: Change extent info type

2023-01-20 Thread Hanna Czenczek
On 19.01.23 16:20, Kevin Wolf wrote: Am 20.06.2022 um 18:26 hat Hanna Reitz geschrieben: VMDK's implementation of .bdrv_get_specific_info() returns information about its extent files, ostensibly in the form of ImageInfo objects. However, it does not get this information through bdrv_query_image_

Re: [PATCH v2 00/12] qemu-img info: Show protocol-level information

2023-01-20 Thread Hanna Czenczek
On 19.01.23 21:12, Kevin Wolf wrote: Am 08.12.2022 um 13:24 hat Hanna Reitz geschrieben: On 20.06.22 18:26, Hanna Reitz wrote: Hi, This series is a v2 to: https://lists.nongnu.org/archive/html/qemu-block/2022-05/msg00042.html Ping, it looks like this still applies (to the master branch and k

[PATCH] curl: Fix error path in curl_open()

2023-02-06 Thread Hanna Czenczek
img: Could not open '': http curl driver cannot handle the URL '' (does not start with 'http://') Closes: https://gitlab.com/qemu-project/qemu/-/issues/1475 Suggested-by: Daniel P. Berrangé Signed-off-by: Hanna Czenczek --- block/curl.c | 6 -- 1 file changed, 4 i

Re: [PATCH v3 3/4] qemu-io: add -r option to register I/O buffer

2023-02-07 Thread Hanna Czenczek
On 01.02.23 16:27, Stefan Hajnoczi wrote: The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next com

Re: [PATCH v3 2/4] qemu-io: use BdrvRequestFlags instead of int

2023-02-07 Thread Hanna Czenczek
. Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- qemu-io-cmds.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) With a rebase on264dcbb2b1e5b66d7a5b08662b200c2b315dce0f: Reviewed-by: Hanna Czenczek

Re: [PATCH v3 1/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Hanna Czenczek
quot;block: add BDRV_REQ_REGISTERED_BUF request flag") Tested-by: Fiona Ebner Cc: qemu-sta...@nongnu.org Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- block/io.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Hanna Czenczek

Re: [PATCH v3 4/4] iotests/detect-zeroes-registered-buf: add new test

2023-02-07 Thread Hanna Czenczek
| 58 +++ .../tests/detect-zeroes-registered-buf.out| 7 +++ 2 files changed, 65 insertions(+) create mode 100755 tests/qemu-iotests/tests/detect-zeroes-registered-buf create mode 100644 tests/qemu-iotests/tests/detect-zeroes-registered-buf.out Reviewed-by: Hanna

Re: [PATCH 00/13] block: Fix bdrv_open*() calls from coroutine context

2023-02-07 Thread Hanna Czenczek
problematic bdrv_open*() calls. Reviewed-by: Hanna Czenczek

Re: [PATCH v4 3/4] qemu-io: add -r option to register I/O buffer

2023-02-08 Thread Hanna Czenczek
commit will add a test that uses the new option. Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- qemu-io-cmds.c | 204 +++-- 1 file changed, 129 insertions(+), 75 deletions(-) Reviewed-by: Hanna Czenczek diff --git a/qemu-io-cmds.c b

[PATCH 1/2] block/fuse: Let PUNCH_HOLE write zeroes

2023-02-27 Thread Hanna Czenczek
is that we pass the `BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK` flags to the call -- the storage is supposed to be unmapped, and a slow fallback by actually writing zeroes as data is not allowed. Closes: https://gitlab.com/qemu-project/qemu/-/issues/1507 Signed-off-by: Hanna Czenczek --- block/exp

[PATCH 2/2] iotests/308: Add test for 'write -zu'

2023-02-27 Thread Hanna Czenczek
ead to the area being zeroed. HEAD^ fixed this to use blk_pwrite_zeroes() instead (again with BDRV_REQ_MAY_UNMAP), so verify that running `qemu-io 'write -zu'` on a FUSE exports always results in zeroes being written. Signed-off-by: Hanna Czenczek --- tests/qemu-

[PATCH 0/2] block/fuse: Let PUNCH_HOLE write zeroes

2023-02-27 Thread Hanna Czenczek
blk_pwrite_zeroes() instead (with MAY_UNMAP | NO_FALLBACK, which differentiates it from fallocate(ZERO_RANGE)). Patch 2 adds a regression test. Hanna Czenczek (2): block/fuse: Let PUNCH_HOLE write zeroes iotests/308: Add test for 'write -zu' block/export/fuse.c| 11 +++

Re: [PATCH 1/3] block: make BlockBackend->quiesce_counter atomic

2023-03-03 Thread Hanna Czenczek
On 27.02.23 21:57, Stefan Hajnoczi wrote: The main loop thread increments/decrements BlockBackend->quiesce_counter when drained sections begin/end. The counter is read in the I/O code path. Therefore this field is used to communicate between threads without a lock. Use qatomic_set()/qatomic_read

Re: [PATCH 3/3] block: protect BlockBackend->queued_requests with a lock

2023-03-03 Thread Hanna Czenczek
insertions(+), 2 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-03 Thread Hanna Czenczek
;s used at BlockBackend creation time and not when there is I/O in flight). Signed-off-by: Stefan Hajnoczi --- block/block-backend.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH v10 07/12] parallels: Move check of cluster outside image to a separate function

2023-03-07 Thread Hanna Czenczek
On 03.02.23 10:18, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 81 ++

Re: [PATCH v10 09/12] parallels: Move check of leaks to a separate function

2023-03-07 Thread Hanna Czenczek
On 03.02.23 10:18, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 80 ---

Re: [PATCH v10 00/12] parallels: Refactor the code of images checks and fix a bug

2023-03-07 Thread Hanna Czenczek
On 03.02.23 10:18, Alexander Ivanov wrote: Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. Fix incorrect condi

Re: Deadlock with ide_issue_trim and draining

2023-03-07 Thread Hanna Czenczek
On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in combination with draining. From a debug session on a costumer's machine I gathered the following information: * The QEMU process hangs in a

Re: Deadlock with ide_issue_trim and draining

2023-03-07 Thread Hanna Czenczek
On 07.03.23 14:44, Hanna Czenczek wrote: On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in combination with draining.  From a debug session on a costumer's machine I gathere

Re: Deadlock with ide_issue_trim and draining

2023-03-08 Thread Hanna Czenczek
On 08.03.23 11:35, Fiona Ebner wrote: Am 07.03.23 um 15:27 schrieb Hanna Czenczek: On 07.03.23 14:44, Hanna Czenczek wrote: On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in c

Re: Deadlock with ide_issue_trim and draining

2023-03-08 Thread Hanna Czenczek
On 07.03.23 14:44, Hanna Czenczek wrote: On 07.03.23 13:22, Fiona Ebner wrote: Hi, I am suspecting that commit 7e5cdb345f ("ide: Increment BB in-flight counter for TRIM BH") introduced an issue in combination with draining.  From a debug session on a costumer's machine I gathere

[PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Hanna Czenczek
rted-by: Fiona Ebner Fixes: 7e5cdb345f77d76cb4877fe6230c4e17a7d0d0ca ("ide: Increment BB in-flight counter for TRIM BH") Signed-off-by: Hanna Czenczek --- Tested with a small test boot sector that issues a trim operation with any number of discards from 0 to 64. Before this patch,

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Hanna Czenczek
On 09.03.23 13:08, Paolo Bonzini wrote: On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini wrote: I think having to do this is problematic, because the blk_drain should leave no pending operation. Here it seems okay because you do it in a controlled situation, but the main thread can also issue blk_

Re: [PATCH v10 07/12] parallels: Move check of cluster outside image to a separate function

2023-03-10 Thread Hanna Czenczek
On 10.03.23 12:08, Alexander Ivanov wrote: On 3/7/23 13:17, Hanna Czenczek wrote: On 03.02.23 10:18, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off

Re: [PATCH v2 0/8] iotests: make meson aware of individual I/O tests

2023-03-10 Thread Hanna Czenczek
: Hanna Czenczek

[RFC 2/2] iotests/iov-padding: New test

2023-03-15 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Signed-off-by: Hanna Czenczek --- tests/qemu-iotests/tests/iov-padding | 85 tests/qemu-iotests/tests/iov-padding.out

[RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-15 Thread Hanna Czenczek
I am wary of (1), because it seems like it may have unintended side effects. (2) on the other hand seems relatively simple to implement, with hopefully few side effects, so this patch does that. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2141964 Signed-off-by: Hanna Czenczek --- b

[RFC 0/2] Split padded I/O vectors exceeding IOV_MAX

2023-03-15 Thread Hanna Czenczek
into one, using a bounce buffer. The latter seemed simpler to me, so this RFC does that. Still, it’s an RFC because I don’t know whether that’s the ideal solution. Hanna Czenczek (2): block: Split padded I/O vectors exceeding IOV_MAX iotests/iov-padding: New test block

Re: [RFC 0/2] Split padded I/O vectors exceeding IOV_MAX

2023-03-15 Thread Hanna Czenczek
On 15.03.23 16:29, Stefan Hajnoczi wrote: On Wed, Mar 15, 2023 at 01:13:28PM +0100, Hanna Czenczek wrote: Hi, We accept I/O vectors with up to 1024 (IOV_MAX) elements from guests. When a guest request does not conform to the underlying storage's alignment requirements, we pad it with hea

Re: [RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-16 Thread Hanna Czenczek
On 15.03.23 19:25, Eric Blake wrote: On Wed, Mar 15, 2023 at 01:13:29PM +0100, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit

Re: [RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-16 Thread Hanna Czenczek
On 15.03.23 19:48, Stefan Hajnoczi wrote: On Wed, Mar 15, 2023 at 01:13:29PM +0100, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can

Re: [RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-17 Thread Hanna Czenczek
On 16.03.23 18:44, Vladimir Sementsov-Ogievskiy wrote: On 15.03.23 15:13, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O

[PATCH 0/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-17 Thread Hanna Czenczek
, which, I think (hope), also addresses much of the feedback of Eric and Stefan. The test is unchanged, the rest is pretty much rewritten (though in spirit stays the same). Hanna Czenczek (4): util/iov: Make qiov_slice() public block: Split padded I/O vectors exceeding IOV_MAX util/iov

[PATCH 3/4] util/iov: Remove qemu_iovec_init_extended()

2023-03-17 Thread Hanna Czenczek
(), which might also benefit its pre-existing users. Signed-off-by: Hanna Czenczek --- include/qemu/iov.h | 5 --- util/iov.c | 79 +++--- 2 files changed, 11 insertions(+), 73 deletions(-) diff --git a/include/qemu/iov.h b/include/qemu/iov.h index

[PATCH 4/4] iotests/iov-padding: New test

2023-03-17 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Signed-off-by: Hanna Czenczek --- tests/qemu-iotests/tests/iov-padding | 85 tests/qemu-iotests/tests/iov-padding.out

[PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-17 Thread Hanna Czenczek
gzilla.redhat.com/show_bug.cgi?id=2141964 Signed-off-by: Hanna Czenczek --- block/io.c | 153 + 1 file changed, 143 insertions(+), 10 deletions(-) diff --git a/block/io.c b/block/io.c index 8974d46941..1e9cdba17a 100644 --- a/block/io.c +++ b/

[PATCH 1/4] util/iov: Make qiov_slice() public

2023-03-17 Thread Hanna Czenczek
create an iovec array with the superfluous prefixing elements stripped, so the following processing functions no longer need to skip them.) Signed-off-by: Hanna Czenczek --- include/qemu/iov.h | 3 +++ util/iov.c | 14 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff

[PATCH v2] block-backend: Add new bds_io_in_flight counter

2023-03-31 Thread Hanna Czenczek
77d76cb4877fe6230c4e17a7d0d0ca ("ide: Increment BB in-flight counter for TRIM BH") Signed-off-by: Hanna Czenczek --- block/block-backend.c | 157 ++ 1 file changed, 130 insertions(+), 27 deletions(-) diff --git a/block/block-backend.c b/block/bloc

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-03 Thread Hanna Czenczek
(Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov-Ogievskiy wrote: On 17.03.23 20:50, Hanna Czenczek wrote: [...] diff --git a/block/io.c b/block/io.c index 8974d46941..1e9cdba17a 100644 --- a/block/io.c +++ b/block/io.c [..] +    pad

Re: [PATCH 4/4] iotests/iov-padding: New test

2023-04-03 Thread Hanna Czenczek
On 18.03.23 13:39, Eric Blake wrote: On Fri, Mar 17, 2023 at 06:50:19PM +0100, Hanna Czenczek wrote: Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Signed-off-by: Hanna Czenczek --- + +# Four combina

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-04 Thread Hanna Czenczek
On 04.04.23 10:10, Vladimir Sementsov-Ogievskiy wrote: On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov-Ogievskiy wrote: On 17.03.23 20:50, Hanna Czenczek wrote: [...] diff --git a/block/io.c b/block

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-06 Thread Hanna Czenczek
On 05.04.23 11:59, Vladimir Sementsov-Ogievskiy wrote: On 04.04.23 20:32, Hanna Czenczek wrote: On 04.04.23 10:10, Vladimir Sementsov-Ogievskiy wrote: On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov

[PATCH v2 0/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-11 Thread Hanna Czenczek
the padding is not just simply destroyed, but more steps may be taken (i.e. copying back the contents of the temporary buffer used for the merged elements) - Generally replaced “couple of” by “two or three” Hanna Czenczek (4): util/iov: Make qiov_slice() public block: Collapse padded I/O v

[PATCH v2 2/4] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-04-11 Thread Hanna Czenczek
gzilla.redhat.com/show_bug.cgi?id=2141964 Signed-off-by: Hanna Czenczek --- block/io.c | 166 - 1 file changed, 151 insertions(+), 15 deletions(-) diff --git a/block/io.c b/block/io.c index 8974d46941..587c3ed1db 100644 --- a/block/io.c +++ b/

[PATCH v2 3/4] util/iov: Remove qemu_iovec_init_extended()

2023-04-11 Thread Hanna Czenczek
(), which might also benefit its pre-existing users. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek --- include/qemu/iov.h | 5 --- util/iov.c | 79 +++--- 2 files changed, 11 insertions(+), 73

[PATCH v2 4/4] iotests/iov-padding: New test

2023-04-11 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek --- tests/qemu-iotests/tests/iov-padding

[PATCH v2 1/4] util/iov: Make qiov_slice() public

2023-04-11 Thread Hanna Czenczek
qiov_slice() itself, thus get the number of elements, and also create an iovec array with the superfluous prefixing elements stripped, so the following processing functions no longer need to skip them.) Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-25 Thread Hanna Czenczek
On 24.04.23 20:32, Vladimir Sementsov-Ogievskiy wrote: On 24.04.23 16:36, Emanuele Giuseppe Esposito wrote: Am 21/04/2023 um 12:13 schrieb Vladimir Sementsov-Ogievskiy: On 17.03.23 15:35, Thomas Huth wrote: On 17/03/2023 11.17, Peter Maydell wrote: On Mon, 6 Mar 2023 at 11:16, Peter Maydell

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-26 Thread Hanna Czenczek
On 26.04.23 09:38, Emanuele Giuseppe Esposito wrote: Am 25/04/2023 um 18:48 schrieb Hanna Czenczek: On 24.04.23 20:32, Vladimir Sementsov-Ogievskiy wrote: On 24.04.23 16:36, Emanuele Giuseppe Esposito wrote: Am 21/04/2023 um 12:13 schrieb Vladimir Sementsov-Ogievskiy: On 17.03.23 15:35

Re: [PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-28 Thread Hanna Czenczek
condition in out-of-image check. Reviewed-by: Hanna Czenczek

Re: [PATCH v2 07/19] cutils: Adjust signature of parse_uint[_full]

2023-05-19 Thread Hanna Czenczek
'; -char *endptr; +uint64_t i; +const char *endptr = "somewhere"; The initialization here is technically not necessary because it’s reset above the parse_uint() call below. Anyway: Reviewed-by: Hanna Czenczek const char *str; int r; i = 999; -en

Re: [PATCH v3 04/19] test-cutils: Test more integer corner cases

2023-05-23 Thread Hanna Czenczek
int err; +/* 1 less than -ULONG_MAX */ +str = ULONG_MAX == UINT_MAX ? "-4294967296" : "-18446744073709551616"; +endptr = "somewhere"; +res = 999; err = qemu_strtoul(str, &endptr, 0, &res); +g_assert_cmpint(err, ==, -ERANGE); +g_assert_cmpint(res, ==, ULONG_MAX); Should be g_assert_cmpuint(). Reviewed-by: Hanna Czenczek

Re: [PATCH v3 05/19] cutils: Fix wraparound parsing in qemu_strtoui

2023-05-23 Thread Hanna Czenczek
gh to be low priority, R-b dropped --- tests/unit/test-cutils.c | 20 +--- util/cutils.c| 25 +++-- 2 files changed, 28 insertions(+), 17 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH v5 2/5] parallels: Split image leak handling to separate check and fix helpers

2023-06-02 Thread Hanna Czenczek
On 29.05.23 17:15, Alexander Ivanov wrote: We need to fix leak after deduplication in the next patch. Move leak fixing to a separate helper parallels_fix_leak() and add parallels_get_leak_size() helper wich used in parallels_fix_leak() and parallels_check_leak(). Signed-off-by: Alexander Ivanov

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

2023-06-02 Thread Hanna Czenczek
On 29.05.23 17:15, Alexander Ivanov wrote: Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_i

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

2023-06-02 Thread Hanna Czenczek
le changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH v5 4/5] parallels: Replace fprintf by qemu_log in check

2023-06-02 Thread Hanna Czenczek
On 29.05.23 17:15, Alexander Ivanov wrote: If the check is called during normal work, tracking of the check must be present in VM logs to have some clues if something going wrong with user's data. I understand stderr counts as part of the VM log, doesn’t it?  I thought stderr is generally logg

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

2023-06-02 Thread Hanna Czenczek
d even reuse that where migrate_add_blocker() fails. Anyway, not wrong as-is, just suggestion, so: Reviewed-by: Hanna Czenczek +error_setg_errno(errp, -ret, "Could not repair corrupted image"); +goto fail; +} +} + return 0; fail_format:

[PULL 02/17] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-06-05 Thread Hanna Czenczek
gzilla.redhat.com/show_bug.cgi?id=2141964 Signed-off-by: Hanna Czenczek Message-Id: <20230411173418.19549-3-hre...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 166 - 1 file changed, 151 insertions(+), 15 deletions

[PULL 04/17] iotests/iov-padding: New test

2023-06-05 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek Message-Id: <20230411173418.19549-5-hre...@redhat.com>

[PULL 06/17] parallels: Fix high_off calculation in parallels_co_check()

2023-06-05 Thread Hanna Czenczek
viewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 7b6d770f8e..204d20685b 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -462,12 +462,12 @@ pa

[PULL 09/17] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2023-06-05 Thread Hanna Czenczek
iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index db6426e5f9..fa8a56a948 100644 --- a/block/parallels.c +++ b

[PULL 15/17] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Message-Id: <20230424093147.197643-12-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-

[PULL 12/17] parallels: Fix statistics calculation

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Exclude out-of-image clusters from allocated and fragmented clusters calculation. Signed-off-by: Alexander Ivanov Message-Id: <20230424093147.197643-9-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels

[PULL 17/17] qcow2: add discard-no-unref option

2023-06-05 Thread Hanna Czenczek
u/-/issues/1621 Signed-off-by: Jean-Louis Dupond Message-Id: <20230605084523.34134-2-jean-lo...@dupond.be> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- qapi/block-core.json | 12 block/qcow2.h | 3 +++ block/qcow2-cluster.c | 32 +++

[PULL 13/17] parallels: Move check of leaks to a separate function

2023-06-05 Thread Hanna Czenczek
wed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 74 --- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index fd1e2860d0..ba766e5e86 100644 --- a/block/parallels.c +++ b

[PULL 08/17] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2023-06-05 Thread Hanna Czenczek
com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index ea382e8382..db6426e5f9 100644 --- a/block/parallels.c +++ b/block/parallels.c @@

[PULL 05/17] parallels: Out of image offset in BAT leads to image inflation

2023-06-05 Thread Hanna Czenczek
iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index d8a3f13e24..7b6d770f8e 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -733,6

[PULL 14/17] parallels: Move statistic collection to a separate function

2023-06-05 Thread Hanna Czenczek
: <20230424093147.197643-11-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 52 +++ 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/block/parallels.c b/block/paral

[PULL 03/17] util/iov: Remove qemu_iovec_init_extended()

2023-06-05 Thread Hanna Czenczek
(), which might also benefit its pre-existing users. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek Message-Id: <20230411173418.19549-4-hre...@redhat.com> --- include/qemu/iov.h | 5 --- util/iov.c

[PULL 07/17] parallels: Fix image_end_offset and data_end after out-of-image check

2023-06-05 Thread Hanna Czenczek
ed-by: Denis V. Lunev Message-Id: <20230424093147.197643-4-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index

[PULL 11/17] parallels: Move check of cluster outside image to a separate function

2023-06-05 Thread Hanna Czenczek
iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 75 +++ 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 94b7408b6b..7f0f72e879 100644

[PULL 01/17] util/iov: Make qiov_slice() public

2023-06-05 Thread Hanna Czenczek
qiov_slice() itself, thus get the number of elements, and also create an iovec array with the superfluous prefixing elements stripped, so the following processing functions no longer need to skip them.) Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek

[PULL 10/17] parallels: Move check of unclean image to a separate function

2023-06-05 Thread Hanna Czenczek
: <20230424093147.197643-7-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index fa8a

[PULL 00/17] Block patches

2023-06-05 Thread Hanna Czenczek
parate function parallels: Fix statistics calculation parallels: Move check of leaks to a separate function parallels: Move statistic collection to a separate function parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD parallels: Incorrect condition in out-of-image check Hanna Czenczek

[PULL 16/17] parallels: Incorrect condition in out-of-image check

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Message-Id: <20230424093147.197643-13-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek

Re: [PULL 02/17] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-06-06 Thread Hanna Czenczek
On 06.06.23 10:00, Michael Tokarev wrote: 05.06.2023 18:45, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O vectors up to

Release of RSD (Rust QSD) 0.1

2023-06-07 Thread Hanna Czenczek
Hi everyone! I’ve just released the first version (0.1) of RSD, which is a proof-of-concept to rewrite the qemu-storage-daemon (QSD) and thus the qemu block layer in Rust: https://gitlab.com/hreitz/rsd https://gitlab.com/hreitz/rsd/-/releases/v0.1 We’ve been talking for quite a long time abo

Re: [PULL 05/17] parallels: Out of image offset in BAT leads to image inflation

2023-06-07 Thread Hanna Czenczek
On 07.06.23 08:51, Michael Tokarev wrote: 05.06.2023 18:45, Hanna Czenczek wrote: From: Alexander Ivanov data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or

Re: [PULL 02/17] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-06-09 Thread Hanna Czenczek
On 08.06.23 11:52, Peter Maydell wrote: On Mon, 5 Jun 2023 at 16:48, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. Hi; Coverity complains (CID

[PATCH] block: Fix pad_request's request restriction

2023-06-09 Thread Hanna Czenczek
Peter Maydell Fixes: 18743311b829cafc1737a5f20bc3248d5f91ee2a ("block: Collapse padded I/O vecs exceeding IOV_MAX") Signed-off-by: Hanna Czenczek --- block/io.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 30748f0b59.

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

2023-06-09 Thread Hanna Czenczek
On 09.06.23 15:21, Alexander Ivanov wrote: On 6/2/23 16:59, Hanna Czenczek wrote: On 29.05.23 17:15, 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 | 65

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-10 Thread Hanna Czenczek
On 09.06.23 10:33, Hanna Czenczek wrote: bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, which bdrv_check_qiov_request() does not guarantee. bdrv_check_request32() however will guarantee this, and both of bdrv_pad_request()'s callers (bdrv_co_preadv_

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Hanna Czenczek
On 11.07.23 22:23, Stefan Hajnoczi wrote: On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, which bdrv_check_qiov_request() does not guarantee. bdrv_check_request32() however will guarantee this, and bo

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Hanna Czenczek
On 12.07.23 16:15, Stefan Hajnoczi wrote: On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: On 11.07.23 22:23, Stefan Hajnoczi wrote: On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX,

[PATCH v2] block: Fix pad_request's request restriction

2023-07-14 Thread Hanna Czenczek
er Maydell Fixes: 18743311b829cafc1737a5f20bc3248d5f91ee2a ("block: Collapse padded I/O vecs exceeding IOV_MAX") Signed-off-by: Hanna Czenczek --- v2: - Added paragraph to the commit message to express explicitly that this patch will not change guest-visible behavior - (No code c

[PATCH] block: Be more verbose in create fallback

2023-07-20 Thread Hanna Czenczek
ink: https://bugzilla.redhat.com/show_bug.cgi?id=2217204 Signed-off-by: Hanna Czenczek --- block.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index a307c151a8..f530dd9c02 100644 --- a/block.c +++ b/block.c @@ -661,8 +661,10 @@ int coroutine_fn bdrv_co_create_o

Re: [PATCH v3 5/6] cryptodev: use NULL throttle timer cb for read direction

2023-07-21 Thread Hanna Czenczek
REALTIME, NULL, cryptodev_backend_throttle_timer_cb, backend); } With the typo in the commit message fixed: Reviewed-by: Hanna Czenczek

Re: [PATCH v3 3/6] throttle: support read-only and write-only

2023-07-21 Thread Hanna Czenczek
ould be shorter as `timer = tt->timers[is_write ? THROTTLE_WRITE : THROTTLE_READ];`. Anyway, I only have style suggestion to offer, so either way: Reviewed-by: Hanna Czenczek +assert(timer); + must_wait = throttle_compute_timer(ts, is_write, now,

Re: [PATCH v3 1/6] throttle: introduce enum ThrottleType

2023-07-21 Thread Hanna Czenczek
after patch 3.  Still, optional, of course, so either way: Reviewed-by: Hanna Czenczek Of note is that we still have instances in util/throttle.c and block/throttle-groups.c that don’t use these enums to access the tt->timers[] array, and that’s a bit unfortunate now (i.e. `tt->timers[is_

Re: [PATCH v3 2/6] test-throttle: use enum ThrottleType

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Use enum ThrottleType instead in the throttle test codes. Reviewed-by: Alberto Garcia Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Hanna Czenczek

Re: [PATCH v3 4/6] test-throttle: test read only and write only

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: Reviewed-by: Alberto Garcia Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 66 ++ 1 file changed, 66 insertions(+) Reviewed-by: Hanna Czenczek

Re: [PATCH v3 6/6] throttle: use enum ThrottleType instead of bool is_write

2023-07-21 Thread Hanna Czenczek
On 13.07.23 08:41, zhenwei pi wrote: enum ThrottleType is already there, use ThrottleType instead of 'bool is_write' for throttle API, also modify related codes from block, fsdev, cryptodev and tests. Signed-off-by: zhenwei pi --- backends/cryptodev.c| 9 + block/throttle-gr

  1   2   3   4   >