Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-13 Thread Hanna Reitz
On 13.12.22 16:56, Nir Soffer wrote: On Mon, Dec 12, 2022 at 12:38 PM Hanna Reitz wrote: On 28.11.22 15:15, Nir Soffer wrote: Extend the test finder to find tests with format (*.out.qcow2) or cache specific (*.out.nocache) out file. This worked before only for the numbered tests. --- tests

Re: [PATCH v2 5/5] qemu-img: Speed up checksum

2022-12-12 Thread Hanna Reitz
Signed-off-by: Nir Soffer --- qemu-img.c | 350 ++--- 1 file changed, 277 insertions(+), 73 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v2 3/5] qemu-img: Add checksum command

2022-12-12 Thread Hanna Reitz
to use. But that’s just a suggestion.  It always resolves to _Static_assert anyway, so using _Static_assert seems by no means wrong. So with the spelling fixed: Reviewed-by: Hanna Reitz

Re: [PATCH v2 4/5] iotests: Test qemu-img checksum

2022-12-12 Thread Hanna Reitz
! Reviewed-by: Hanna Reitz

Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Extend the test finder to find tests with format (*.out.qcow2) or cache specific (*.out.nocache) out file. This worked before only for the numbered tests. --- tests/qemu-iotests/findtests.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

Re: [PATCH v2 1/5] qemu-img.c: Move IO_BUF_SIZE to the top of the file

2022-12-12 Thread Hanna Reitz
(+), 2 deletions(-) Looks good, but is missing your S-o-b – with it added: Reviewed-by: Hanna Reitz

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

2022-12-08 Thread Hanna Reitz
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 kevin’s block-next branch at least). Hanna So the final state is that despite

Re: [PATCH v2 00/15] block: Simplify drain

2022-11-24 Thread Hanna Reitz
surprises in drain code. - Patch 14 (was 12): More and reworded comments to make things hopefully a bit clearer Thanks! Reviewed-by: Hanna Reitz

Re: [PULL 00/11] Block layer patches

2022-11-15 Thread Hanna Reitz
On 15.11.22 11:14, Kevin Wolf wrote: Am 15.11.2022 um 00:58 hat John Snow geschrieben: On Mon, Nov 14, 2022 at 5:56 AM Kevin Wolf wrote: Am 11.11.2022 um 20:20 hat Stefan Hajnoczi geschrieben: Hanna Reitz (9): block/mirror: Do not wait for active writes block/mirror: Drop

Re: [PATCH 05/13] block: Inline bdrv_drain_invoke()

2022-11-14 Thread Hanna Reitz
++- 1 file changed, 6 insertions(+), 17 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn

2022-11-14 Thread Hanna Reitz
changed, 30 insertions(+), 61 deletions(-) As the others have already suggested, I’d too drop the _co_ in qed and throttle, and the coroutine_fn in throttle.  With that done: Reviewed-by: Hanna Reitz

Re: [PATCH 07/13] block: Don't use subtree drains in bdrv_drop_intermediate()

2022-11-14 Thread Hanna Reitz
++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 04/13] block: Remove drained_end_counter

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: drained_end_counter is unused now, nobody changes its value any more. It can be removed. In cases where we had two almost identical functions that only differed in whether the caller passes drained_end_counter, or whether they would poll for a local

Re: [PATCH 12/13] block: Don't poll in bdrv_replace_child_noperm()

2022-11-14 Thread Hanna Reitz
On 08.11.22 13:37, Kevin Wolf wrote: In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the child is already drained when the function is called (it better

Re: [PATCH 01/13] qed: Don't yield in bdrv_qed_co_drain_begin()

2022-11-14 Thread Hanna Reitz
olf --- block/qed.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) Reviewed-by: Hanna Reitz

[PATCH v2] tests/stream-under-throttle: New test

2022-11-14 Thread Hanna Reitz
Test streaming a base image into the top image underneath two throttle nodes. This was reported to make qemu 7.1 hang (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as a regression test. Signed-off-by: Hanna Reitz --- Based-on: <20221107151321.211175-1-hre...@redhat.

Re: [PATCH 08/13] stream: Replace subtree drain with a single node drain

2022-11-14 Thread Hanna Reitz
++--- block/stream.c | 20 ++-- 3 files changed, 27 insertions(+), 13 deletions(-) Reviewed-by: Hanna Reitz

Re: [PULL 00/11] Block layer patches

2022-11-14 Thread Hanna Reitz
Alberto Faria (2): qapi/block-core: Fix BlockdevOptionsNvmeIoUring @path description block/blkio: Set BlockDriver::has_variable_length to false Hanna Reitz (9): block/mirror: Do not wait for active writes block/mirror: Drop mirror_wait_for_any_operation() block/mirror

Re: [PATCH 09/13] block: Remove subtree drains

2022-11-14 Thread Hanna Reitz
/block_int-io.h | 12 -- block.c | 20 +-- block/io.c | 121 +++--- tests/unit/test-bdrv-drain.c | 261 ++- 6 files changed, 44 insertions(+), 389 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 10/13] block: Call drain callbacks only once

2022-11-14 Thread Hanna Reitz
ome `bool parent_quiesced`, but: Reviewed-by: Hanna Reitz

Re: [PATCH 13/13] block: Remove poll parameter from bdrv_parent_drained_begin_single()

2022-11-14 Thread Hanna Reitz
files changed, 6 insertions(+), 10 deletions(-) Well, “drained_begin” does not mean “drain”, so... Reviewed-by: Hanna Reitz

Re: [PATCH 11/13] block: Remove ignore_bds_parents parameter from drain functions

2022-11-14 Thread Hanna Reitz
, 32 insertions(+), 60 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 02/13] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end()

2022-11-14 Thread Hanna Reitz
drv-drain.c | 64 ++-- 1 file changed, 46 insertions(+), 18 deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-10 Thread Hanna Reitz
On 10.11.22 15:01, Kevin Wolf wrote: Am 07.11.2022 um 16:13 hat Hanna Reitz geschrieben: Hi, v1 cover letter: https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00389.html bdrv_replace_child_noperm() drains the child via bdrv_parent_drained_{begin,end}_single(). When it removes

[PATCH] tests/stream-under-throttle: New test

2022-11-10 Thread Hanna Reitz
Test streaming a base image into the top image underneath two throttle nodes. This was reported to make qemu 7.1 hang (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as a regression test. Signed-off-by: Hanna Reitz --- This is a regression test for https://lists.nongnu.org

Re: [PATCH for-7.2 3/5] block/mirror: Fix NULL s->job in active writes

2022-11-10 Thread Hanna Reitz
On 10.11.22 13:10, Kevin Wolf wrote: Am 09.11.2022 um 17:54 hat Hanna Reitz geschrieben: There is a small gap in mirror_start_job() before putting the mirror filter node into the block graph (bdrv_append() call) and the actual job being created. Before the job is created, MirrorBDSOpaque.job

[PATCH for-7.2 4/5] iotests/151: Test that active mirror progresses

2022-11-09 Thread Hanna Reitz
background requests even while active requests are in flight. Have a new test case in 151 verify this. Signed-off-by: Hanna Reitz --- tests/qemu-iotests/151 | 180 - tests/qemu-iotests/151.out | 4 +- 2 files changed, 181 insertions(+), 3 deletions(-) diff

[PATCH for-7.2 5/5] iotests/151: Test active requests on mirror start

2022-11-09 Thread Hanna Reitz
Have write requests happen to the source node right when we start a mirror job. The mirror filter node may encounter MirrorBDSOpaque.job being NULL, but this should not cause a segfault. Signed-off-by: Hanna Reitz --- tests/qemu-iotests/151 | 53

[PATCH for-7.2 3/5] block/mirror: Fix NULL s->job in active writes

2022-11-09 Thread Hanna Reitz
requests would see MirrorBDSOpaque.job == NULL. Have our filter node handle that case gracefully. Signed-off-by: Hanna Reitz --- block/mirror.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 5b6f42392c..251adc5ae0

[PATCH for-7.2 1/5] block/mirror: Do not wait for active writes

2022-11-09 Thread Hanna Reitz
. With this change, we will need to explicitly keep track of how many bytes are in flight in active requests so that job_progress_set_remaining() in mirror_run() can set the correct number of remaining bytes. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2123297 Signed-off-by: Hanna Reitz --- block

[PATCH for-7.2 2/5] block/mirror: Drop mirror_wait_for_any_operation()

2022-11-09 Thread Hanna Reitz
mirror_wait_for_free_in_flight_slot() is the only remaining user of mirror_wait_for_any_operation(), so inline the latter into the former. Signed-off-by: Hanna Reitz --- block/mirror.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/block/mirror.c b

[PATCH for-7.2 0/5] block/mirror: Do not wait for active writes

2022-11-09 Thread Hanna Reitz
with a working test case. Patch 4 is that test case (I hope it works on your end, too), and patch 5 is a test case for the fix in patch 3. Hanna Reitz (5): block/mirror: Do not wait for active writes block/mirror: Drop mirror_wait_for_any_operation() block/mirror: Fix NULL s->job in act

[PATCH v2 3/3] block: Start/end drain on correct AioContext

2022-11-07 Thread Hanna Reitz
deadlock. Closes: https://gitlab.com/qemu-project/qemu/-/issues/1215 Reviewed-by: Kevin Wolf Signed-off-by: Hanna Reitz --- block/io.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 34b30e304e..b9424024f9 100644 --- a/block/io.c +++ b/b

[PATCH v2 0/3] block: Start/end drain on correct AioContext

2022-11-07 Thread Hanna Reitz
™t use the literal suggestion, but made it a bit more verbose) Hanna Reitz (3): block: Make bdrv_child_get_parent_aio_context I/O block-backend: Update ctx immediately after root block: Start/end drain on correct AioContext include/block/block-global-state.h | 1 - include/block/bloc

[PATCH v2 2/3] block-backend: Update ctx immediately after root

2022-11-07 Thread Hanna Reitz
Reviewed-by: Kevin Wolf Signed-off-by: Hanna Reitz --- block/block-backend.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index ed2f4b67a2..b48c91f4e1 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2158,6

[PATCH v2 1/3] block: Make bdrv_child_get_parent_aio_context I/O

2022-11-07 Thread Hanna Reitz
done, all implementations explicitly are I/O code, so we can mark bdrv_child_get_parent_aio_context() as I/O code, too, so callers know it is safe to run from both GS and I/O contexts. Signed-off-by: Hanna Reitz --- include/block/block-global-state.h | 1 - include/block/block-io.h | 2 ++ inc

Re: [PATCH v2] vl: defuse PID file path resolve error

2022-11-07 Thread Hanna Reitz
deletions(-) Reviewed-by: Hanna Reitz

Re: [PATCH 2/3] iotests: Test qemu-img checksum

2022-11-07 Thread Hanna Reitz
On 30.10.22 18:38, Nir Soffer wrote: On Wed, Oct 26, 2022 at 4:31 PM Hanna Reitz wrote: On 01.09.22 16:32, Nir Soffer wrote: > Add simple tests creating an image with all kinds of extents, different > formats, different backing chain, different protocol, and dif

Re: [PATCH 3/3] qemu-img: Speed up checksum

2022-11-07 Thread Hanna Reitz
On 30.10.22 18:38, Nir Soffer wrote: On Wed, Oct 26, 2022 at 4:54 PM Hanna Reitz wrote: On 01.09.22 16:32, Nir Soffer wrote: > Add coroutine based loop inspired by `qemu-img convert` design. > > Changes compared to `qemu-img convert`: > > - State for t

Re: [PATCH 1/3] qemu-img: Add checksum command

2022-11-07 Thread Hanna Reitz
On 30.10.22 18:37, Nir Soffer wrote: On Wed, Oct 26, 2022 at 4:00 PM Hanna Reitz wrote: On 01.09.22 16:32, Nir Soffer wrote: > The checksum command compute a checksum for disk image content using the > blkhash library[1]. The blkhash library is not packag

Re: [PATCH] vl: change PID file path resolve error to warning

2022-10-27 Thread Hanna Reitz
Reported-by: Dominik Csapak Suggested-by: Thomas Lamprecht Signed-off-by: Fiona Ebner --- Reviewed-by: Hanna Reitz

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Hanna Reitz
n clone () from /lib/x86_64-linux-gnu/libc.so.6 Changing GLOBAL_STATE_CODE in IO_CODE is allowed, since GSC callers are allowed to call IO_CODE. Resolves: #1272 Signed-off-by: Emanuele Giuseppe Esposito --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Hanna Reitz

Re: [PATCH 3/3] qemu-img: Speed up checksum

2022-10-26 Thread Hanna Reitz
On 01.09.22 16:32, Nir Soffer wrote: Add coroutine based loop inspired by `qemu-img convert` design. Changes compared to `qemu-img convert`: - State for the entire image is kept in ImgChecksumState - State for single worker coroutine is kept in ImgChecksumworker. - "Writes" are always

Re: [PATCH 2/3] iotests: Test qemu-img checksum

2022-10-26 Thread Hanna Reitz
On 01.09.22 16:32, Nir Soffer wrote: Add simple tests creating an image with all kinds of extents, different formats, different backing chain, different protocol, and different image options. Since all images have the same guest visible content they must have the same checksum. To help

Re: [PATCH 1/3] qemu-img: Add checksum command

2022-10-26 Thread Hanna Reitz
On 01.09.22 16:32, Nir Soffer wrote: The checksum command compute a checksum for disk image content using the blkhash library[1]. The blkhash library is not packaged yet, but it is available via copr[2]. Example run: $ ./qemu-img checksum -p fedora-35.qcow2

[PATCH 1/3] block: bdrv_child_get_parent_aio_context is not GS

2022-09-23 Thread Hanna Reitz
rbitrarily. Signed-off-by: Hanna Reitz --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index bc85f46eed..7f2a9d4df0 100644 --- a/block.c +++ b/block.c @@ -1499,7 +1499,7 @@ const BdrvChildClass child_of_bds = {

[PATCH 0/3] blcok: Start/end drain on correct AioContext

2022-09-23 Thread Hanna Reitz
ure if it beginning a drain can end up in blk_get_aio_context() before blk->ctx has been updated. Hanna Reitz (3): block: bdrv_child_get_parent_aio_context is not GS block-backend: Update ctx immediately after root block: Start/end drain on correct AioContext block.c | 2 +- block

[PATCH 2/3] block-backend: Update ctx immediately after root

2022-09-23 Thread Hanna Reitz
igned-off-by: Hanna Reitz --- block/block-backend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index d4a5df2ac2..abdb5ff5af 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2156,6 +2156,7 @@ s

[PATCH 3/3] block: Start/end drain on correct AioContext

2022-09-23 Thread Hanna Reitz
deadlock. Closes: https://gitlab.com/qemu-project/qemu/-/issues/1215 Signed-off-by: Hanna Reitz --- block/io.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 0a8cbefe86..7df1129b3b 100644 --- a/block/io.c +++ b/block/io.c @@ -71,9 +71,10

[PATCH 2/3] block/qed: Keep auto_backing_file if possible

2022-08-03 Thread Hanna Reitz
Just like qcow2, qed invokes its open function in its .bdrv_co_invalidate_cache() implementation. Therefore, just like done for qcow2 in HEAD^, update auto_backing_file only if the backing file string in the image header differs from the one we have read before. Signed-off-by: Hanna Reitz

[PATCH 3/3] iotests/backing-file-invalidation: Add new test

2022-08-03 Thread Hanna Reitz
Add a new test to see what happens when you migrate a VM with a backing chain that has json:{} backing file strings, which, when opened, will be resolved to plain filenames. Signed-off-by: Hanna Reitz --- .../tests/backing-file-invalidation | 152 ++ .../tests/backing

[PATCH 1/3] block/qcow2: Keep auto_backing_file if possible

2022-08-03 Thread Hanna Reitz
anged in the image header since we last read it. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1117 Signed-off-by: Hanna Reitz --- block/qcow2.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index c6c6692fb7..a

[PATCH 0/3] block: Keep auto_backing_file post-migration

2022-08-03 Thread Hanna Reitz
o generate a json:{} filename for the image is because it considered the backing file overridden. Hence it must put the actual backing file options into a 'backing' object in the json:{} filename. Hanna Reitz (3): block/qcow2: Keep auto_backing_file if possible block/qed: Keep

Re: [RFC PATCH 8/8] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 196 - block/block-backend.c | 33

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. From this point onwards, ->can_set_aio_ctx

Re: [RFC PATCH 6/8] block-backend: implement .change_aio_ctx in child_root

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(), but implements a new transaction so that if all check pass, the new transaction's .commit will take care of changing the BlockBackend AioContext.

Re: [RFC PATCH 5/8] block: implement .change_aio_ctx in child_of_bds

2022-07-15 Thread Hanna Reitz
Giuseppe Esposito --- block.c | 9 + 1 file changed, 9 insertions(+) Reviewed-by: Hanna Reitz

Re: [RFC PATCH 4/8] blockjob: implement .change_aio_ctx in child_job

2022-07-15 Thread Hanna Reitz
about in patch 3), so I’ll just give a Reviewed-by: Hanna Reitz

Re: [RFC PATCH 3/8] RFC: block: use transactions as a replacement of ->{can_}set_aio_context()

2022-07-14 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: - RFC because I am not sure about the AioContext locks. - Do we need to take the new AioContext lock? what does it protect? - Taking the old AioContext lock is required now, because of bdrv_drained_begin calling AIO_WAIT_WHILE that

Re: [RFC PATCH 2/8] transactions: add tran_add_back

2022-07-14 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: First change the transactions from a QLIST to QSIMPLEQ, then use it to implement tran_add_tail, which allows adding elements to the end of list transactions. The subject still calls it `tran_add_back()` (perhaps from a preliminary

Re: [RFC PATCH 1/8] block.c: assert bs->aio_context is written under BQL and drains

2022-07-14 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Also here ->aio_context is read by I/O threads and written under BQL. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Hanna Reitz

[PATCH 1/2] block/parallels: Fix buffer-based write call

2022-07-14 Thread Hanna Reitz
to bdrv_co_pread() - the subsequent bdrv_co_pwritev() call stayed this way, and so still expects a QEMUIOVector pointer instead of a plain buffer. We must change that to be a bdrv_co_pwrite() call. Fixes: a4072543ccdddbd241d5962d ("block/parallels: use buffer-based io") Signed-off-by: H

[PATCH 2/2] iotests/131: Add parallels regression test

2022-07-14 Thread Hanna Reitz
Test an allocating write to a parallels image that has a backing node. Before HEAD^, doing so used to give me a failed assertion (when the backing node contains only `42` bytes; the results varies with the value chosen, for `0` bytes, for example, all I get is EIO). Signed-off-by: Hanna Reitz

[PATCH 0/2] block/parallels: Fix buffer-based write call

2022-07-14 Thread Hanna Reitz
it should be), and add a regression test demonstrating the problem. Hanna Reitz (2): block/parallels: Fix buffer-based write call iotests/131: Add parallels regression test block/parallels.c | 4 ++-- tests/qemu-iotests/131 | 35 ++- tests/qemu

Re: [RFC v3 8/8] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-07-14 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: Register guest RAM using BlockRAMRegistrar and set the BDRV_REQ_REGISTERED_BUF flag so block drivers can optimize memory accesses in I/O requests. This is for vdpa-blk, vhost-user-blk, and other I/O interfaces that rely on DMA mapping/unmapping.

Re: [RFC v3 7/8] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-07-14 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGISTERED_BUF on I/O

Re: [RFC v3 6/8] stubs: add memory_region_from_host() and memory_region_get_fd()

2022-07-14 Thread Hanna Reitz
+ stubs/meson.build | 1 + 2 files changed, 14 insertions(+) create mode 100644 stubs/memory.c Reviewed-by: Hanna Reitz

Re: [RFC v3 5/8] block: add BlockRAMRegistrar

2022-07-14 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: Emulated devices and other BlockBackend users wishing to take advantage of blk_register_buf() all have the same repetitive job: register RAMBlocks with the BlockBackend using RAMBlockNotifier. Add a BlockRAMRegistrar API to do this. A later commit will

Re: [RFC v3 4/8] block: add BDRV_REQ_REGISTERED_BUF request flag

2022-07-14 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: Block drivers may optimize I/O requests accessing buffers previously registered with bdrv_register_buf(). Checking whether all elements of a request's QEMUIOVector are within previously registered buffers is expensive, so we need a hint from the user to

Re: [RFC v3 3/8] block: pass size to bdrv_unregister_buf()

2022-07-13 Thread Hanna Reitz
(-) Reviewed-by: Hanna Reitz

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-07-13 Thread Hanna Reitz
On 08.07.22 06:17, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring and virtio-blk-vhost-vdpa with additional drivers under development. One of the reasons for developing libblkio is that other

[PULL 35/35] vl: Unlink absolute PID file path

2022-07-12 Thread Hanna Reitz
$ kill $(cat qemu.pid) $ file qemu.pid qemu.pid: ASCII text (qemu.pid should be gone after the process has terminated.) Signed-off-by: Hanna Reitz Message-Id: <20220609122701.17172-4-hre...@redhat.com> Reviewed-by: Daniel P. Berrangé --- softmmu/vl.c | 30 ++

[PULL 31/35] qsd: Do not use error_report() before monitor_init

2022-07-12 Thread Hanna Reitz
error_report() only works once monitor_init_globals_core() has been called, which is not the case when parsing the --daemonize option. Use fprintf(stderr, ...) instead. Fixes: 2525edd85fec53e23fda98974a15e3b3c8957596 ("qsd: Add --daemonize") Signed-off-by: Hanna Reitz

[PULL 25/35] block: Implement blk_pdiscard() using generated_co_wrapper

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-14-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h| 3 --- include/sysemu/block-backend-io.h | 3 ++- block

[PULL 18/35] block: Implement blk_{pread, pwrite}() using generated_co_wrapper

2022-07-12 Thread Hanna Reitz
From: Alberto Faria We need to add include/sysemu/block-backend-io.h to the inputs of the block-gen.c target defined in block/meson.build. Signed-off-by: Alberto Faria Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-7-afa...@redhat.com> Signed-off-by: Hanna Reitz ---

[PULL 32/35] iotests/297: Have mypy ignore unused ignores

2022-07-12 Thread Hanna Reitz
0.950 mypy, as far as I can tell; just for different `ignore` lines). Signed-off-by: Hanna Reitz Message-Id: <20220621092536.19837-1-hre...@redhat.com> Acked-by: John Snow --- tests/qemu-iotests/mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/mypy.

[PULL 22/35] block: Change blk_pwrite_compressed() param order

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Swap 'buf' and 'bytes' around for consistency with other I/O functions. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-11-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-b

[PULL 30/35] block: Remove remaining unused symbols in coroutines.h

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Some can be made static, others are unused generated_co_wrappers. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-19-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h

[PULL 34/35] vl: Conditionally register PID file unlink notifier

2022-07-12 Thread Hanna Reitz
Currently, the exit notifier for unlinking the PID file is registered unconditionally. Limit it to only when we actually do create a PID file. Signed-off-by: Hanna Reitz Message-Id: <20220609122701.17172-3-hre...@redhat.com> Reviewed-by: Daniel P. Berrangé --- softmmu/vl.

[PULL 33/35] qsd: Unlink absolute PID file path

2022-07-12 Thread Hanna Reitz
$ kill $(cat qsd.pid) $ file qsd.pid qsd.pid: ASCII text (qsd.pid should be gone after the process has terminated.) Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2092322 Signed-off-by: Hanna Reitz Message-Id: <20220609122701.17172-2-hre...@redhat.com> Reviewed-by: Daniel P. Be

[PULL 19/35] block: Add blk_{preadv,pwritev}()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Implement them using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-8-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 6 + test

[PULL 28/35] block: Add blk_co_truncate()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Also convert blk_truncate() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-17-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.

[PULL 24/35] block: Implement blk_pwrite_zeroes() using generated_co_wrapper

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-13-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 5 +++-- block/block-backend.c | 8

[PULL 15/35] block: Change blk_{pread,pwrite}() param order

2022-07-12 Thread Hanna Reitz
that file was updated manually. Overly-long lines were then fixed by hand. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-4-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 4 +-- b

[PULL 11/35] tests/qemu-iotests: hotfix for 307, 223 output

2022-07-12 Thread Hanna Reitz
From: John Snow Fixes: 58a6fdcc Signed-off-by: John Snow Tested-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé Message-Id: <20220616142659.3184115-2-js...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz --- tests/qemu-iotests/223.out | 4 ++-- tests/qemu-iotes

[PULL 29/35] block: Reorganize some declarations in block-backend-io.h

2022-07-12 Thread Hanna Reitz
Bonzini Message-Id: <20220705161527.1054072-18-afa...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 77 +-- block/block-backend.c | 22 + 2 files changed, 54 insertions(+), 45 del

[PULL 21/35] block: Export blk_pwritev_part() in block-backend-io.h

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Also convert it into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-10-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h| 5 - i

[PULL 27/35] block: Add blk_co_ioctl()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Also convert blk_ioctl() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-16-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h

[PULL 07/35] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-07-12 Thread Hanna Reitz
the BDRV_REQ_MAY_UNMAP flag when appropriate, which it didn't previously. Signed-off-by: Alberto Faria Message-Id: <20220609152744.3891847-8-afa...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz --- include/block/block-io.h | 15 +-- bloc

[PULL 23/35] block: Add blk_co_pwrite_compressed()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Also convert blk_pwrite_compressed() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-12-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backen

[PULL 17/35] block: Make blk_co_pwrite() take a const buffer

2022-07-12 Thread Hanna Reitz
From: Alberto Faria It does not mutate the buffer. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-6-afa...@redhat.com> Signed-off-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 2 +- 1 file changed, 1 ins

[PULL 20/35] block: Add blk_[co_]preadv_part()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Implement blk_preadv_part() using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-9-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h

[PULL 26/35] block: Implement blk_flush() using generated_co_wrapper

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-15-afa...@redhat.com> Signed-off-by: Hanna Reitz --- block/coroutines.h| 2 -- include/sysemu/block-backend-io.h | 2 +- block

[PULL 03/35] block: Make bdrv_{pread,pwrite}() return 0 on success

2022-07-12 Thread Hanna Reitz
. The few callers that rely on the previous behavior are adjusted accordingly by hand. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Message-Id: <20220609152744.3891847-4-afa...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz ---

[PULL 16/35] block: Make 'bytes' param of blk_{pread, pwrite}() an int64_t

2022-07-12 Thread Hanna Reitz
From: Alberto Faria For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz Message-Id: <20220705161527.1054072-5-afa...@redhat.com> Signed-off-by: Hanna

[PULL 14/35] block: Add a 'flags' param to blk_pread()

2022-07-12 Thread Hanna Reitz
, buf, bytes, 0) It had no effect on hw/block/nand.c, presumably due to the #if, so that file was updated manually. Overly-long lines were then fixed by hand. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Greg Kurz Reviewed-by: Hanna Reitz Message-Id

[PULL 12/35] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-07-12 Thread Hanna Reitz
From: John Snow In certain container environments we may not have FUSE at all, so skip the test in this circumstance too. Signed-off-by: John Snow Message-Id: <20220616142659.3184115-3-js...@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz ---

[PULL 02/35] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order

2022-07-12 Thread Hanna Reitz
-Ogievskiy Message-Id: <20220609152744.3891847-3-afa...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by: Hanna Reitz --- include/block/block-io.h | 10 +++--- block/blklogwrites.c | 6 ++-- block/bochs.c| 10 +++--- block/cloop.c

[PULL 10/35] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()

2022-07-12 Thread Hanna Reitz
From: Alberto Faria Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush() separately. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id: <20220609152744.3891847-11-afa...@redhat.com> Reviewed-by: Hanna Reitz Signed-off-by:

[PULL 09/35] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn

2022-07-12 Thread Hanna Reitz
viewed-by: Hanna Reitz Signed-off-by: Hanna Reitz --- block/parallels.c | 2 +- block/qcow2-snapshot.c | 6 +++--- block/qcow2.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index f22444efff..8b23b9580d 100644 --- a

  1   2   3   4   5   6   7   8   9   10   >