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

2022-11-14 Thread Hanna Reitz
nit/test-bdrv-drain.c | 64 ++-- 1 file changed, 46 insertions(+), 18 deletions(-) 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 13/13] block: Remove poll parameter from bdrv_parent_drained_begin_single()

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

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

2022-11-14 Thread Hanna Reitz
ons(-) I too would like parent_quiesce_counter to become `bool parent_quiesced`, but: Reviewed-by: Hanna Reitz

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

2022-11-14 Thread Hanna Reitz
block/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: [PULL 00/11] Block layer patches

2022-11-14 Thread Hanna Reitz
h to false 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() bl

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

2022-11-14 Thread Hanna Reitz
| 17 ++--- block/stream.c | 20 ++-- 3 files changed, 27 insertions(+), 13 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 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

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 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 drained_e

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

2022-11-14 Thread Hanna Reitz
c | 4 ++-- 1 file changed, 2 insertions(+), 2 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
6 files 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 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: [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 v2 00/15] block: Simplify drain

2022-11-24 Thread Hanna Reitz
e sure that we'll never get coroutine surprises in drain code. - Patch 14 (was 12): More and reworded comments to make things hopefully a bit clearer Thanks! Reviewed-by: Hanna Reitz

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

2022-08-03 Thread Hanna Reitz
why bdrv_refresh_filename() decided to 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: Ke

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

2022-08-03 Thread Hanna Reitz
changed 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 c6c6692f

[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 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 v2 00/10] block: Attempt on fixing 030-reported errors

2021-11-11 Thread Hanna Reitz
operm() in bdrv_replace_child_abort() from patch 9 here (and also keep passing &s->child instead of s->childp). It is already relevant now that s->childp is valid only if new_bs is NULL. Patch 9: - The comment this used to add to bdrv_replace_child_abort() is now alread

[PATCH v2 01/10] stream: Traverse graph after modification

2021-11-11 Thread Hanna Reitz
instead of before. Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/stream.c b/block/stream.c index 97bee482dc..e45113aed6 100644 --- a/block/stream.c

[PATCH v2 03/10] block: Unite remove_empty_child and child_free

2021-11-11 Thread Hanna Reitz
those checks into bdrv_child_free() and drop bdrv_remove_empty_child(). Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c

[PATCH v2 02/10] block: Manipulate children list in .attach/.detach

2021-11-11 Thread Hanna Reitz
become NULL. BDS parents generally assume that their children's .bs pointer is never NULL, so this is actually a bug fix. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bloc

[PATCH v2 05/10] block: Pass BdrvChild ** to replace_child_noperm

2021-11-11 Thread Hanna Reitz
ff-by: Hanna Reitz --- block.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index c7d5aa5254..d668156eca 100644 --- a/block.c +++ b/block.c @@ -87,7 +87,7 @@ static BlockDriverState *bdrv_open_inherit(const char *filename, static

[PATCH v2 04/10] block: Drop detached child from ignore list

2021-11-11 Thread Hanna Reitz
on, and freeing the ignore list in blocks separated by empty lines. Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 19bff4f95c..c7d5aa52

[PATCH v2 06/10] block: Restructure remove_file_or_backing_child()

2021-11-11 Thread Hanna Reitz
As of a future patch, bdrv_replace_child_tran() will take a BdrvChild ** pointer. Prepare for that by getting such a pointer and using it where applicable, and (dereferenced) as a parameter for bdrv_replace_child_tran(). Signed-off-by: Hanna Reitz --- block.c | 21 - 1 file

[PATCH v2 08/10] block: Let replace_child_tran keep indirect pointer

2021-11-11 Thread Hanna Reitz
e it passes to bdrv_replace_child_tran(), and giving up that reference only in the transaction .clean() handler. Signed-off-by: Hanna Reitz --- block.c | 83 ++--- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c in

[PATCH v2 10/10] iotests/030: Unthrottle parallel jobs in reverse

2021-11-11 Thread Hanna Reitz
See the comment for why this is necessary. Signed-off-by: Hanna Reitz --- tests/qemu-iotests/030 | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 5fb65b4bef..567bf1da67 100755 --- a/tests/qemu-iotests/030 +++ b

[PATCH v2 07/10] transactions: Invoke clean() after everything else

2021-11-11 Thread Hanna Reitz
ch is just a bit nicer.) Signed-off-by: Hanna Reitz --- include/qemu/transactions.h | 3 +++ util/transactions.c | 8 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/qemu/transactions.h b/include/qemu/transactions.h index 92c5965235..2f2060acd9 100644 --- a/in

[PATCH v2 09/10] block: Let replace_child_noperm free children

2021-11-11 Thread Hanna Reitz
tran() must have had a non-NULL .bs pointer initially. Make a note of that and assert it. Signed-off-by: Hanna Reitz --- block.c | 102 +++- 1 file changed, 79 insertions(+), 23 deletions(-) diff --git a/block.c b/block.c index a40027161c.

Re: [PATCH v4 02/25] include/block/block: split header into I/O and global state API

2021-11-11 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: block.h currently contains a mix of functions: some of them run under the BQL and modify the block layer graph, others are instead thread-safe and perform I/O in iothreads. It is not easy to understand which function is part of which group (I/O

Re: [PATCH v4 03/25] assertions for block global state API

2021-11-11 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "block/block.h" include as it seems it is not necessary anymore, together with "qemu/iov.h" block-backend-comm

Re: [PATCH v4 05/25] block/block-backend.c: assertions for block-backend

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

Re: [PATCH v4 03/25] assertions for block global state API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

Re: [PATCH v4 06/25] include/block/block_int: split header into I/O and global state API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-common.h contains the structures shared between the two headers, and the functions that can't be categorized as I/O or global state. A

Re: [PATCH v4 02/25] include/block/block: split header into I/O and global state API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: block.h currently contains a mix of functions: some of them run under the BQL and modify the block layer graph, others are instead thread-safe and perform I/O in iothreads. It is not easy to understand which function is part of which group (I/O

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "block/block.h" include as it seems it is not necessary anymore, together with "qemu/iov.h" block-backend-comm

Re: [PATCH v4 07/25] assertions for block_int global state API

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 17 + block/backup.c | 1 + block/block-backend.c | 3 +++ block/commit.c

Re: [PATCH v4 08/25] block: introduce assert_bdrv_graph_writable

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: We want to be sure that the functions that write the child and parent list of a bs are under BQL and drain. BQL prevents from concurrent writings from the GS API, while drains protect from I/O. TODO: drains are missing in some functions using

Re: [PATCH v4 10/25] assertions for blockjob_int.h

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- blockjob.c | 4 1 file changed, 4 insertions(+) diff --git a/blockjob.c b/blockjob.c index 4bad1408cb..fbd6c7d873 100644 --- a/blockjob.c +++ b/blockjob.c @@

Re: [PATCH v4 12/25] assertions for blockob.h global state API

2021-11-12 Thread Hanna Reitz
Subject: s/blockob.h/blockjob.h/ On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- blockjob.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/blockjob.c b/blockjob.c index fbd6c7d873..4982f6a2b5 10

Re: [PATCH v4 13/25] include/sysemu/blockdev.h: move drive_add and inline drive_def

2021-11-12 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: drive_add is only used in softmmu/vl.c, so it can be a static function there,and drive_def is only a particular use case of qemu_opts_parse_noisily, so it can be inlined. Also remove drive_mark_claimed_by_board, as it is only defined but not i

Re: [PATCH v4 14/25] include/systemu/blockdev.h: global state API

2021-11-12 Thread Hanna Reitz
Subject: s/systemu/sysemu/ On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: blockdev functions run always under the BQL lock. Signed-off-by: Emanuele Giuseppe Esposito --- include/sysemu/blockdev.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/i

Re: [PATCH v4 19/25] block_int-common.h: split function pointers in BlockDriver

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similar to the header split, also the function pointers in BlockDriver can be split in I/O and global state. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/block_int-common.h | 458

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 94bff5c757..40c4729b8d 100644 --- a/block.c +++ b/block.c [

Re: [PATCH v2 09/10] block: Let replace_child_noperm free children

2021-11-15 Thread Hanna Reitz
On 12.11.21 17:10, Vladimir Sementsov-Ogievskiy wrote: 11.11.2021 15:08, Hanna Reitz wrote: In most of the block layer, especially when traversing down from other BlockDriverStates, we assume that BdrvChild.bs can never be NULL.  When it becomes NULL, it is expected that the corresponding

Re: [PATCH v2 10/10] iotests/030: Unthrottle parallel jobs in reverse

2021-11-15 Thread Hanna Reitz
On 12.11.21 17:25, Vladimir Sementsov-Ogievskiy wrote: 11.11.2021 15:08, Hanna Reitz wrote: See the comment for why this is necessary. Signed-off-by: Hanna Reitz ---   tests/qemu-iotests/030 | 11 ++-   1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-15 Thread Hanna Reitz
On 15.11.21 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 94bff5c757

Re: [PATCH v4 21/25] block_int-common.h: split function pointers in BdrvChildClass

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/block/block_int-common.h | 51 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/include/block/block_int-comm

Re: [PATCH v4 22/25] block_int-common.h: assertions in the callers of BdrvChildClass function pointers

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- block.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block.c b/block.c index 40c4729b8d..da80e89ad4 100644 --- a/block.c +++ b/block.c [...]

Re: [PATCH v4 24/25] job.h: split function pointers in JobDriver

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: The job API will be handled separately in another serie. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi --- include/qemu/job.h | 16 1 file changed, 16 insertions(+) diff --git a/include/qemu/job.

Re: [PATCH v4 03/25] assertions for block global state API

2021-11-15 Thread Hanna Reitz
On 15.11.21 13:27, Emanuele Giuseppe Esposito wrote: @@ -586,12 +589,14 @@ void bdrv_unapply_subtree_drain(BdrvChild *child, BlockDriverState *old_parent)   void coroutine_fn bdrv_co_drain(BlockDriverState *bs)   {   assert(qemu_in_coroutine()); +    assert(qemu_in_main_thread());   bd

Re: [PATCH v4 00/25] block layer: split block APIs in global state and I/O

2021-11-15 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Currently, block layer APIs like block-backend.h contain a mix of functions that are either running in the main loop and under the BQL, or are thread-safe functions and run in iothreads performing I/O. The functions running under BQL also take

Re: [PULL 00/13] Block layer patches

2021-11-16 Thread Hanna Reitz
g O_DIRECT -------- Hanna Reitz (10):    stream: Traverse graph after modification    block: Manipulate children list in .attach/.detach    block: Unite remove_empty_child and child_free    block: Drop detached child from ignore list    block: Pass BdrvChild ** to replace_ch

[PATCH v2 for-6.2] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-16 Thread Hanna Reitz
w_probe_alignment(). Signed-off-by: Kevin Wolf Message-Id: <20211104113109.56336-1-kw...@redhat.com> Reviewed-by: Hanna Reitz Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-13-kw...@redhat.com> [hreitz: Fix iotest 142 for block sizes gre

Re: [PATCH v4 05/25] block/block-backend.c: assertions for block-backend

2021-11-16 Thread Hanna Reitz
On 16.11.21 11:15, Emanuele Giuseppe Esposito wrote: On 12/11/2021 12:01, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be

Re: [PATCH v4 06/25] include/block/block_int: split header into I/O and global state API

2021-11-16 Thread Hanna Reitz
On 16.11.21 11:24, Emanuele Giuseppe Esposito wrote: On 12/11/2021 13:17, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-common.h contains the structures

[PULL v2 00/13] Block patches

2021-11-16 Thread Hanna Reitz
ed to apply all patches from the pull request mails (including their message IDs) ---- Hanna Reitz (10): stream: Traverse graph after modification block: Manipulate children list in .attach/.detach block: Unite remove_empty_chi

[PULL v2 03/13] block: Unite remove_empty_child and child_free

2021-11-16 Thread Hanna Reitz
those checks into bdrv_child_free() and drop bdrv_remove_empty_child(). Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <2021120829.81329-4-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-4-kw

[PULL v2 04/13] block: Drop detached child from ignore list

2021-11-16 Thread Hanna Reitz
on, and freeing the ignore list in blocks separated by empty lines. Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <2021120829.81329-5-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-5-kw...@r

[PULL v2 05/13] block: Pass BdrvChild ** to replace_child_noperm

2021-11-16 Thread Hanna Reitz
ff-by: Hanna Reitz Message-Id: <2021120829.81329-6-hre...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-6-kw...@redhat.com> Signed-off-by: Hanna Reitz --- block.c | 23 --- 1 file changed, 12

[PULL v2 07/13] transactions: Invoke clean() after everything else

2021-11-16 Thread Hanna Reitz
ch is just a bit nicer.) Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-8-hre...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-8-kw...@redhat.com> Signed-off-by: Hanna Reitz --- include/qemu/transaction

[PULL v2 13/13] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-16 Thread Hanna Reitz
w_probe_alignment(). Signed-off-by: Kevin Wolf Message-Id: <20211104113109.56336-1-kw...@redhat.com> Reviewed-by: Hanna Reitz Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-13-kw...@redhat.com> [hreitz: Fix iotest 142 for block sizes gre

[PULL v2 02/13] block: Manipulate children list in .attach/.detach

2021-11-16 Thread Hanna Reitz
become NULL. BDS parents generally assume that their children's .bs pointer is never NULL, so this is actually a bug fix. Signed-off-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <2021120829.81329-3-hre...@redhat.com> Signed-off-by: Kevin Wolf

[PULL v2 12/13] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-16 Thread Hanna Reitz
hat.com> Signed-off-by: Hanna Reitz --- softmmu/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index b5aaae4b8c..01ec420e61 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -593,8 +593,8 @@ c

[PULL v2 06/13] block: Restructure remove_file_or_backing_child()

2021-11-16 Thread Hanna Reitz
As of a future patch, bdrv_replace_child_tran() will take a BdrvChild ** pointer. Prepare for that by getting such a pointer and using it where applicable, and (dereferenced) as a parameter for bdrv_replace_child_tran(). Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-7-

[PULL v2 09/13] block: Let replace_child_noperm free children

2021-11-16 Thread Hanna Reitz
tran() must have had a non-NULL .bs pointer initially. Make a note of that and assert it. Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-10-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-10-kw...@redhat.com> Signed-off-by: Hanna Re

[PULL v2 10/13] iotests/030: Unthrottle parallel jobs in reverse

2021-11-16 Thread Hanna Reitz
See the comment for why this is necessary. Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-11-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-11-kw...@redhat.com> Signed-off-by: Hanna Reitz --- tests/qemu-iotests/030 | 11 +++

[PULL v2 08/13] block: Let replace_child_tran keep indirect pointer

2021-11-16 Thread Hanna Reitz
e it passes to bdrv_replace_child_tran(), and giving up that reference only in the transaction .clean() handler. Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-9-hre...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf Message-Id: <2025145409.17

[PULL v2 11/13] docs: Deprecate incorrectly typed device_add arguments

2021-11-16 Thread Hanna Reitz
Wolf Message-Id: <2025145409.176785-12-kw...@redhat.com> Signed-off-by: Hanna Reitz --- docs/about/deprecated.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 600031210d..c03fcf951f 100644 --- a/docs/about/dep

[PULL v2 01/13] stream: Traverse graph after modification

2021-11-16 Thread Hanna Reitz
instead of before. Signed-off-by: Hanna Reitz Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <2021120829.81329-2-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-2-kw...@redhat.com> Signed-off-by: Hanna Reitz

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-16 Thread Hanna Reitz
On 16.11.21 15:24, Emanuele Giuseppe Esposito wrote: On 12/11/2021 13:30, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "

Re: [PATCH v4 07/25] assertions for block_int global state API

2021-11-16 Thread Hanna Reitz
On 16.11.21 16:43, Emanuele Giuseppe Esposito wrote: On 12/11/2021 14:51, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   block

Re: Failing QEMU iotests

2021-11-17 Thread Hanna Reitz
On 17.11.21 11:07, Thomas Huth wrote:  Hi! I think it has been working fine for me a couple of weeks ago, but when I now run:  make check SPEED=slow I'm getting a couple of failing iotests... not sure whether these are known issues already, so I thought I'd summarize them here: Thanks! **

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Hanna Reitz
On 17.11.21 12:33, Emanuele Giuseppe Esposito wrote: On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   1 file changed, 17 insertions

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Hanna Reitz
On 17.11.21 14:09, Emanuele Giuseppe Esposito wrote: On 17/11/2021 13:51, Hanna Reitz wrote: On 17.11.21 12:33, Emanuele Giuseppe Esposito wrote: On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito

Re: [PATCH v4 24/25] job.h: split function pointers in JobDriver

2021-11-17 Thread Hanna Reitz
On 17.11.21 14:43, Emanuele Giuseppe Esposito wrote: On 15/11/2021 16:11, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: The job API will be handled separately in another serie. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   include

[PATCH 0/2] iotests: Fix crypto algorithm failures

2021-11-17 Thread Hanna Reitz
unsupported algorithm (patch 2). Hanna Reitz (2): iotests: Use aes-128-cbc iotests/149: Skip on unsupported ciphers tests/qemu-iotests/149 | 23 ++- tests/qemu-iotests/206 | 4 ++-- tests/qemu-iotests/206.out | 6 +++--- tests/qemu-iotests/210 | 4 ++-- tests

[PATCH 1/2] iotests: Use aes-128-cbc

2021-11-17 Thread Hanna Reitz
lead to different key slot offsets and so change the reference output more, which is why I went with aes-128.) Signed-off-by: Hanna Reitz --- tests/qemu-iotests/206 | 4 ++-- tests/qemu-iotests/206.out | 6 +++--- tests/qemu-iotests/210 | 4 ++-- tests/qemu-iotests/210.out | 6 +++--- 4

[PATCH 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
(because it requires password-less sudo), and so it seems better and easier to skip it. When this test is intentionally run to check LUKS compatibility, it seems better not to limit the algorithms but keep the list extensive. Signed-off-by: Hanna Reitz --- tests/qemu-iotests/149 | 23

Re: [PATCH 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
On 17.11.21 16:01, Hanna Reitz wrote: Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could taylor the algorithm list to what gnutls supports, but this is a

[PATCH v2 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
(because it requires password-less sudo), and so it seems better and easier to skip it. When this test is intentionally run to check LUKS compatibility, it seems better not to limit the algorithms but keep the list extensive. Signed-off-by: Hanna Reitz --- tests/qemu-iotests/149 | 23

[PATCH v2 0/2] iotests: Fix crypto algorithm failures

2021-11-17 Thread Hanna Reitz
02/2:[0008] [FC] 'iotests/149: Skip on unsupported ciphers' Hanna Reitz (2): iotests: Use aes-128-cbc iotests/149: Skip on unsupported ciphers tests/qemu-iotests/149 | 23 ++- tests/qemu-iotests/206 | 4 ++-- tests/qemu-iotests/206.out | 6 +++--- te

[PATCH v2 1/2] iotests: Use aes-128-cbc

2021-11-17 Thread Hanna Reitz
lead to different key slot offsets and so change the reference output more, which is why I went with aes-128.) Signed-off-by: Hanna Reitz --- tests/qemu-iotests/206 | 4 ++-- tests/qemu-iotests/206.out | 6 +++--- tests/qemu-iotests/210 | 4 ++-- tests/qemu-iotests/210.out | 6 +++--- 4

Re: [PATCH v2 13/13] blockdev: Drop unused drive_get_next()

2021-11-18 Thread Hanna Reitz
umbers implicitly by execution order. If the order changes, or new calls appear "in the middle", unit numbers change. ABI break. Hard to spot in review. The previous commits eliminated all uses. Drop the function. Cc: Kevin Wolf Cc: Hanna Reitz Signed-off-by: Markus Armbruster ---

Re: [PATCH] block/vvfat.c fix leak when failure occurs

2021-11-18 Thread Hanna Reitz
On 16.11.21 13:57, Daniella Lee wrote: Function vvfat_open called function enable_write_target and init_directories, and these functions malloc new memory for BDRVVVFATState::qcow_filename, BDRVVVFATState::used_clusters, and BDRVVVFATState::cluster_buff. When the specified folder does not exist

Re: [PATCH] block/vvfat.c fix leak when failure occurs

2021-11-18 Thread Hanna Reitz
you don’t want to. I hope that made it clear...?  Don’t hesitate to ask more if it didn’t (or for any other questions you might have). Hanna On Thu, Nov 18, 2021 at 4:34 PM Hanna Reitz wrote: On 16.11.21 13:57, Daniella Lee wrote: > Function vvfat_open called function enable_write_

Re: [PATCH v4 08/25] block: introduce assert_bdrv_graph_writable

2021-11-18 Thread Hanna Reitz
On 18.11.21 10:55, Emanuele Giuseppe Esposito wrote: On 12/11/2021 15:40, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: We want to be sure that the functions that write the child and parent list of a bs are under BQL and drain. BQL prevents from concurrent writings

Re: [PATCH v4 00/25] block layer: split block APIs in global state and I/O

2021-11-18 Thread Hanna Reitz
On 18.11.21 15:04, Paolo Bonzini wrote: On 11/15/21 17:03, Hanna Reitz wrote: and second fuse_do_truncate(), which calls blk_set_perm(). Here it seems that a non-growable export is still growable as long as nobody is watching. :)  Is this the desired behavior? Yes, absolutely.  “Growable

Re: [PATCH v4 00/25] block layer: split block APIs in global state and I/O

2021-11-18 Thread Hanna Reitz
On 18.11.21 14:50, Paolo Bonzini wrote: On 11/15/21 17:03, Hanna Reitz wrote: I only really see four solutions for this: (1) We somehow make the amend job run in the main context under the BQL and have it prevent all concurrent I/O access (seems bad) (2) We can make the permission functions

Re: [PATCH v2 2/2] iotests/149: Skip on unsupported ciphers

2021-11-18 Thread Hanna Reitz
On 17.11.21 16:46, Daniel P. Berrangé wrote: On Wed, Nov 17, 2021 at 04:17:07PM +0100, Hanna Reitz wrote: Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could

Re: [PATCH] block vvfat.c fix leak when failure occurs

2021-11-23 Thread Hanna Reitz
On 19.11.21 12:25, Daniella Lee wrote: Based on your suggestions. I made a new patch which contians: 1.format detection 2.replace calloc with g_malloc0 in enable_write_target function 3.use g_free without null pointer detection in vvfat_open function 4.delete line "ret = 0", use return ret direct

Re: [PATCH-for-6.2 v3 1/2] hw/block/fdc: Kludge missing floppy drive to fix CVE-2021-20196

2021-11-23 Thread Hanna Reitz
set to 0) and for then later !blk_is_inserted() (drv->drive not changed (so I guess it stays TYPE_NONE?), but last_sect and max_track are set to 0xff).  Not sure if that’s a problem.  Probably not, given that I think drv->disk and drv->drive both stay TYPE_NONE. Reviewed-by: Hanna Reitz +} +

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Hanna Reitz
On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: From: Alexander Bulekov Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: AddressSanitizer:DEADLYSIGNAL ===

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Hanna Reitz
On 23.11.21 14:49, Philippe Mathieu-Daudé wrote: On 11/23/21 14:42, Hanna Reitz wrote: On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: From: Alexander Bulekov Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-san

Re: [PATCH-for-6.2 1/2] hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)

2021-11-23 Thread Hanna Reitz
he entire reason for this wall of text is that I wonder why the commit message goes into so much detail quoting the spec, while I can’t find it applies.) Reviewed-by: Hanna Reitz * 5.2.5 DATA TRANSFER TERMINATION The 82078 supports terminal count explicitly through the TC pin and implic

[PULL 0/3] Block patches

2021-11-23 Thread Hanna Reitz
test fixes for the gnutls crypto backend Daniella Lee (1): block/vvfat.c fix leak when failure occurs Hanna Reitz (2): iotests: Use aes-128-cbc iotests/149: Skip on unsupported ciphers block/vvfat.c

[PULL 1/3] block/vvfat.c fix leak when failure occurs

2021-11-23 Thread Hanna Reitz
: Daniella Lee Message-Id: <2029112553.35-1-daniellalee...@gmail.com> [hreitz: Took commit message from v1] Signed-off-by: Hanna Reitz --- block/vvfat.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index 05e78e

  1   2   3   4   5   6   7   8   9   10   >