[PULL v2 2/2] iotests: test NBD+TLS+iothread

2024-06-03 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake Message-ID: <20240531180639.1392905-6-ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++

[PULL v2 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-06-03 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PULL v2 0/2] NBD patches for 2024-05-30

2024-06-03 Thread Eric Blake
Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS+iothread io/channel-tls.c | 26 ++-- io/channel-websock.c | 1 + tests/qemu-iotests/tests/nbd-tls-iothread

[PATCH v3 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++ tests/qemu-iotests/tests/nbd-tls-iothread.out | 54 ++ 2 files changed, 222 insertions(

[PATCH v3 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-31 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PATCH v3 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-31 Thread Eric Blake
In v3: - 2/2: fix iotest filtering [kwolf] v2 was here: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg03517.html and this time, I'll wait for R-b before sending my v2 pull request: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg06206.html Eric Blake (2): qio: Inherit

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
On Fri, May 31, 2024 at 04:36:20PM GMT, Kevin Wolf wrote: > Am 18.05.2024 um 04:50 hat Eric Blake geschrieben: > > Prevent regressions when using NBD with TLS in the presence of > > iothreads, adding coverage the fix to qio channels made in the > > previous patch.

[PULL 2/2] iotests: test NBD+TLS+iothread

2024-05-30 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake Message-ID: <20240518025246.791593-6-ebl...@redhat.com> --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++ tests/qemu-iotests/tests/nbd-

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Adding a bit of self-review (in case you want to amend this before pushing, instead of waiting for me to get back online), On Fri, May 17, 2024 at 09:50:15PM GMT, Eric Blake wrote: > Prevent regressions when using NBD with TLS in the presence of > iothreads, adding coverage the fix

Re: [PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
On Fri, May 17, 2024 at 09:50:13PM GMT, Eric Blake wrote: > In v2: > - correct list email address > - add iotest > - add R-b > > I'm offline next week, and have been communicating with Stefan who may > want to push this through his block tree instead of waiting for me to >

[PATCH v2 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-17 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Prevent regressions when using NBD with TLS in the presence of iothreads, adding coverage the fix to qio channels made in the previous patch. CC: qemu-sta...@nongnu.org Signed-off-by: Eric Blake --- tests/qemu-iotests/tests/nbd-tls-iothread | 170 ++ tests/qemu-iotests/tests

[PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
In v2: - correct list email address - add iotest - add R-b I'm offline next week, and have been communicating with Stefan who may want to push this through his block tree instead of waiting for me to get back. Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS

[PATCH] qio: Inherit follow_coroutine_ctx across TLS

2024-05-15 Thread Eric Blake
bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake --- Maybe we should turn ioc->follow_

[PULL 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-25 Thread Eric Blake
option negotiation as also being coroutine_fn. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake Message-ID: <20240408160214.1200629-6-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy [eblake: drop one spurious coroutine_fn marking] Signed-off-by: Eric Blake --

[PULL 0/2] NBD patches for 2024-04-25

2024-04-25 Thread Eric Blake
Eric Blake (1): nbd/server: Mark negotiation functions as coroutine_fn Zhu Yangyang (1): nbd/server: do not poll within a coroutine context nbd/nbd-internal.h | 10 - nbd/client.c | 28 ++-- nbd/common.c

[PULL 1/2] nbd/server: do not poll within a coroutine context

2024-04-25 Thread Eric Blake
the callback, whether or not it required a yield or main loop. Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation") Signed-off-by: Zhu Yangyang [eblake: move callbacks to their use point, add assertions] Signed-off-by: Eric Blake Message-ID: <20240408160214.

Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib

2024-04-19 Thread Eric Blake
need to > tweak the parameter of parse_volume_options() (where we use the > result of g_uri_get_path() as input). > > Reviewed-by: Eric Blake > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Thomas Huth > --- > block/gluster.c | 71

Re: [PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-19 Thread Eric Blake
CentOS Stream 8 will be archived >and no further updates will be provided." > > Thus upgrade our CentOS Stream container to major version 9 now. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Thomas Huth -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] tests/unit: Remove debug statements in test-nested-aio-poll.c

2024-04-19 Thread Eric Blake
6164 > < io_poll_ready > 88/100 qemu:unit / test-nested-aio-pollOK > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/unit/test-nested-aio-poll.c | 7 --- > 1 file changed, 7 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v3 01/13] tests: Remove Ubuntu 20.04 container

2024-04-19 Thread Eric Blake
gt; Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Thomas Huth > --- -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

MAINTAINERS tweak [was: [PATCH for-9.1 0/9] Switch to glib URI parsing code]

2024-04-15 Thread Eric Blake
es, where the last email I found from Peter was https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg00574.html, which asked to update MAINTAINERS to his new address, and that has not made it in so far... -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 13/13] util/uri: Remove the old URI parsing code

2024-04-12 Thread Eric Blake
-- > include/qemu/uri.h | 99 --- > util/uri.c | 1466 > util/meson.build |2 +- > 3 files changed, 1 insertion(+), 1566 deletions(-) > delete mode 100644 include/qemu/uri.h > delete mode 100644 util/uri.c Nice. Revi

Re: [PATCH v2 12/13] block/ssh: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
equal(qp_name, "host_key_check")) { > +qdict_put_str(options, "host_key_check", qp_value); > +} else { > +warn_report("Unsupported parameter '%s' in URI.", qp_name); Do we want the trailing '.' in warn_report?

Re: [PATCH v2 11/13] block/nfs: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
} > +if (parse_uint_full(qp_value, 0, )) { > +error_setg(errp, "Illegal value for NFS parameter: %s", ...but since we're touching it, I prefer 'Invalid' over 'Illegal' (any error message implying that you broke a law when you passed in bad data is a bit aggressive). Not a show-stopper to leave it alone. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 10/13] block/nbd: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
mp() here to match the RFC; again, worth a separate patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
On Fri, Apr 12, 2024 at 09:40:18AM -0500, Eric Blake wrote: > > @@ -364,57 +363,57 @@ static int > > qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf, > > QAPI_LIST_PREPEND(gconf->server, gsconf); > > > > /* transport */ > > -if (!uri-&

Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
luster")) { > +uri_scheme = g_uri_get_scheme(uri); > +if (!uri_scheme || !strcmp(uri_scheme, "gluster")) { Pre-existing, but per RFC 3986, we should probably be using strcasecmp for scheme comparisons (I'm not sure if g_uri_parse guarantees a lower-case return, even when the user passed in upper case). That can be a separate patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-10 Thread Eric Blake
to those). So on that grounds, it is okay for a function marked coroutine_fn to call another function not marked coroutine_fn - it just makes the auditing harder to ensure that you aren't violating your promise of no non-blocking calls. It's too close to 9.0-rc3 for my comfort to include this patch series. Even though this bug can cause wedged migrations, I'd feel more comfortable with preparing the pull request for this series (including your fix for dropping this one annotation) for 9.1 and for qemu-stable once the release is complete. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-09 Thread Eric Blake
On Tue, Apr 09, 2024 at 09:30:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 08.04.24 19:00, Eric Blake wrote: > > nbd_negotiate() is already marked coroutine_fn. And given the fix in > > the previous patch to have nbd_negotiate_handle_starttls not create > > and

[PATCH v5 1/2] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Eric Blake
the callback, whether or not it required a yield or main loop. Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation") Signed-off-by: Zhu Yangyang [eblake: move callbacks to their use point, add assertions] Signed-off-by: Eric Blake --- nbd/nbd-internal.h | 10 -

[PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-08 Thread Eric Blake
option negotiation as also being coroutine_fn. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- nbd/server.c | 102 +-- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index

[PATCH v5 for-9.0? 0/2] Fix NBD TLS poll in coroutine

2024-04-08 Thread Eric Blake
v4 was here: https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg00624.html Since then: add some asserts [Vladimir], add second patch with more coroutine_fn annotations [Vladimir] Eric Blake (1): nbd/server: Mark negotiation functions as coroutine_fn Zhu Yangyang (1): nbd/server: do

Re: [PATCH v4] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Eric Blake
On Mon, Apr 08, 2024 at 11:46:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 05.04.24 20:44, Eric Blake wrote: > > From: Zhu Yangyang > > > > Coroutines are not supposed to block. Instead, they should yield. > > > > The client performs TLS upgrade

[PATCH v4] nbd/server: do not poll within a coroutine context

2024-04-05 Thread Eric Blake
g [eblake: move callbacks to their use point] Signed-off-by: Eric Blake --- v3: https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg00375.html in v4, factor even the struct to the .c files, avoiding a union [Vladimir] nbd/nbd-internal.h | 10 -- nbd/client.c

Re: [PATCH v3] nbd/server: do not poll within a coroutine context

2024-04-05 Thread Eric Blake
On Fri, Apr 05, 2024 at 05:10:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 04.04.24 04:42, Eric Blake wrote: > > From: Zhu Yangyang > > > > Coroutines are not supposed to block. Instead, they should yield. > > > > The client performs TLS upgrade

[PATCH v3] nbd/server: do not poll within a coroutine context

2024-04-03 Thread Eric Blake
g [eblake: move callbacks to their use point] Signed-off-by: Eric Blake --- After looking at this more, I'm less convinced that there is enough common code here to even be worth trying to share in common.c. This takes the essence of the v2 patch, but refactors it a bit. v2: https://lists.gnu.o

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-03 Thread Eric Blake
t for an unconditional one time through the for loop body. What's worse, different compiler versions will change behavior over time. Making the code ugly to pacify a particular compiler, when that compiler might improve in the future, is a form of chasing windmills. > > All in all, I

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-02 Thread Eric Blake
nlock(var), var2 = NULL) > > > probably, it would be simpler for compiler to understand the logic this way. > Could you check? Wouldn't that attach __attribute__((cleanup(xxx))) to var2, at which point we could cause the compiler to call xxx((void*)(true)) if the user does an earl

Re: [PATCH v2 1/1] nbd/server: do not poll within a coroutine context

2024-04-01 Thread Eric Blake
nbd_server_tls_handshake, >, >NULL, >NULL); > > - if (!data.complete) { > -g_main_loop_run(data.loop); > +while (!data.complete) { > +qemu_coroutine_yield(); > } > -g_main_loop_unref(data.loop); > + > if (data.error) { > object_unref(OBJECT(tioc)); > error_propagate(errp, data.error); > -- > 2.33.0 > Thanks for the updated patch - it looks like we are heading in a good direction. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
t;socket". Maybe it is worth an explicit addition to the NBD URI spec to mention that we intend to be case-sensitive (in the parts where it can be; I'm not sure if the schema part must be handled case-insensitively without re-reading the RFCs), and therefore that 'Socket=' does NOT have the same meaning as 'socket='. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
intentional change? No one actually passes an explicit ":0" port on purpose, but we do have to worry about malicious URIs. > g_free(port_str); > } > > out: > if (qp) { > -query_params_free(qp); > +g_hash_table_destroy(qp); > } > -uri_free(uri); > +g_uri_unref(uri); > return ret; It may be possible to eliminate the out label altogether, if GHashTable has the appropriate auto-free magic. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 00/19] -Werror=maybe-uninitialized fixes

2024-03-28 Thread Eric Blake
e-positive > tests: fix -Werror=maybe-uninitialized > hw/nvme: fix -Werror=maybe-uninitialized > hw/virtio: fix -Werror=maybe-uninitialized > RFC: hw/virtio: a potential leak fix > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Eric Blake
/client-connection.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/nbd/client-connection.c b/nbd/client-connection.c > index f9da67c87e..b11e266807 100644 > --- a/nbd/client-connection.c > +++ b/nbd/client-connection.c > @@

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Eric Blake
work has no spaces does not mean that your S-o-b has to follow suit). It is also permissible to list your name in native characters alongside or in place of the Anglicized version; for example, 'git log --author="Stefano Dong"' shows this technique. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-27 Thread Eric Blake
`self != co' failed. so I obviously got something wrong. It may be possible to use block_gen_c to turn nbd_receive_negotiate and nbd_receive_export_list into co_wrapper functions, if I can audit that all of their code goes through qio (and is therefore coroutine-safe), but that work is still ongoing. At a

Re: [PATCH for-9.1 v2 04/11] vhost-user-server: don't abort if we can't set fd non-blocking

2024-03-26 Thread Eric Blake
} This now ignores all errors even on pre-existing fds where we NEED non-blocking, rather than just the specific (expected) error we are seeing on MacOS. Should this code be a bit more precise about checking that -ret == EXXX for the expected errno value we are ignoring for the specific fds

Re: [PATCH for-9.1 v2 03/11] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-03-26 Thread Eric Blake
advertised, instead of panicking? > vmsg_set_reply_u64(vmsg, features); > return true; > } > -- > 2.44.0 > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 v2 02/11] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-03-26 Thread Eric Blake
kay, although I might have used < instead of <=. > +vu_panic(dev, "Error while writing: %s", strerror(errno)); > +return false; > +} At any rate, noticing the error is the correct thing to do. > + > if (vmsg->size) { > do { >

Re: [PATCH for-9.1 v2 01/11] libvhost-user: set msg.msg_control to NULL when it is empty

2024-03-26 Thread Eric Blake
subprojects/libvhost-user/libvhost-user.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff --git a/subprojects/libvhost-user/libvhost-user.c > b/subprojects/libvhost-user/libvhost-user.c > index a879149fef..22bea0c775 100644 > --- a/subproject

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-25 Thread Eric Blake
;b... s/b>->/b->/ > + */ > +if (!co->co_queue_next.sqe_next && > +self->co_queue_wakeup.sqh_last != >co_queue_next.sqe_next) { > +QSIMPLEQ_INSERT_TAIL(>co_queue_wakeup, co, co_queue_next); > + } > } else { &g

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-13 Thread Eric Blake
0 ++ > 2 files changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Eric Blake
ferent. But that's a bigger task for gcc, and not one for this group. > > Signed-off-by: Richard W.M. Jones > --- > block/blkio.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 2/5] qapi: Drop redundant documentation of conditional

2024-01-29 Thread Eric Blake
ame redundant in commit 901a34a400a (qapi: add 'If:' > section to generated documentation) added the latter. Drop the > former. > > Signed-off-by: Markus Armbruster > --- > qapi/misc-target.json | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Eric Blake -- E

Re: [PATCH 1/5] qapi: Drop redundant documentation of inherited members

2024-01-29 Thread Eric Blake
type" is ""event"" > Additional members depend on the value of "meta-type". > > The last line became redundant when commit 88f63467c57 (qapi2texi: > Generate reference to base type members) added the lines preceding it. > Drop it. > > Blockdev

Re: [PATCH 3/5] qapi: Elide "Potential additional modes" from generated docs

2024-01-29 Thread Eric Blake
I've made up my > mind. > > Signed-off-by: Markus Armbruster > --- > qapi/block-export.json | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] iotests: don't run tests requiring cached writes in '-nocache' mode

2024-01-25 Thread Eric Blake
ort makes sense. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/271 | 1 + > tests/qemu-iotests/308 | 2 ++ > tests/qemu-iotests/common.rc | 7 +++ > tests/qemu-iotests/tests/file-io-error | 1 + > 4 files changed,

Re: [PATCH] iotests/264: Use iotests.sock_dir for socket creation

2024-01-25 Thread Eric Blake
gt; This commit basically aligns iotests/264 with the rest of iotests. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/264 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/tests/qemu-iotests/264 b/tests

Re: [PATCH] iotests/277: Use iotests.sock_dir for socket creation

2024-01-24 Thread Eric Blake
gt; This commit basically aligns iotests/277 with the rest of iotests. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/277 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/tests/qemu-iotests/277 b/tests

Re: [PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2024-01-02 Thread Eric Blake
make NBDClient->refcount atomic. > > Signed-off-by: Stefan Hajnoczi > --- > nbd/server.c | 23 ++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 12/12] block: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
ssion that could lead to a bug; so I'm okay with your action there. > > Signed-off-by: Stefan Hajnoczi > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 11/12] job: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:52PM -0500, Stefan Hajnoczi wrote: > The AioContext lock no longer exists. > > Signed-off-by: Stefan Hajnoczi > --- > include/qemu/job.h | 20 > 1 file changed, 20 deletions(-) > Reviewed-by: Eric Blake -- Eric Blak

Re: [PATCH 10/12] scsi: remove outdated AioContext lock comment

2023-11-30 Thread Eric Blake
> lock is unnecessary. > > Signed-off-by: Stefan Hajnoczi > --- > hw/scsi/scsi-disk.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 09/12] docs: remove AioContext lock from IOThread docs

2023-11-30 Thread Eric Blake
- > 1 file changed, 15 insertions(+), 30 deletions(-) > > diff --git a/docs/devel/multiple-iothreads.txt > b/docs/devel/multiple-iothreads.txt > index a3e949f6b3..4865196bde 100644 > --- a/docs/devel/multiple-iothreads.txt Reviewed-by: Eric Blake -- Eric Blake,

Re: [PATCH 08/12] aio: remove aio_context_acquire()/aio_context_release() API

2023-11-30 Thread Eric Blake
the compiler to > check whether the graph lock is being used correctly. > > And me, well, I'm just here to add some pizzazz to the QEMU multi-queue > block layer :). Thank you to everyone who helped with this effort, > including Eric Blake, code reviewer extraordinaire, and others who I'v

Re: [PATCH 07/12] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED()

2023-11-30 Thread Eric Blake
> --- > include/block/aio-wait.h | 16 > 1 file changed, 4 insertions(+), 12 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 06/12] scsi: remove AioContext locking

2023-11-30 Thread Eric Blake
hw/scsi/scsi-disk.c | 28 > hw/scsi/virtio-scsi.c | 18 -- > 4 files changed, 4 insertions(+), 58 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 05/12] block: remove AioContext locking

2023-11-30 Thread Eric Blake
nless user opts in via environment variable. > - */ > -if (getenv("QEMU_TEST_FLAKY_TESTS")) { > -g_test_add_func("/blockjob/complete_in_standby", > test_complete_in_standby); > -} Looks like you ripped out this entire test, because it is no longer viable. I might have mentioned it in the commit message, or squashed the removal of this test into the earlier 02/12 patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
even when no image header will be updated (default false; since 9.0). or s/mask/hide/ if that sounds better. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 2/2] block: stream: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
apper. Same long name as in 1/2; if we come up with a nicer name (my proposal in 1/2 was backing-mask-protocol; but I'm open to others), we should keep the two patches consistent. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 04/12] graph-lock: remove AioContext locking

2023-11-30 Thread Eric Blake
lock_ctx() becomes meaningless and they can be collapsed > into one function. > > Signed-off-by: Stefan Hajnoczi > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 03/12] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-11-30 Thread Eric Blake
qemu_rec_mutex_unlock(>lock); > +/* TODO remove this function */ > } > > QEMU_DEFINE_STATIC_CO_TLS(AioContext *, my_aiocontext) > -- > 2.42.0 Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 02/12] tests: remove aio_context_acquire() tests

2023-11-30 Thread Eric Blake
t; 1 file changed, 1 insertion(+), 66 deletions(-) The rest of this series should not hold up 8.2. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-11-30 Thread Eric Blake
/virtio-scsi.h | 3 +- > hw/scsi/virtio-scsi.c | 62 ++--- > 2 files changed, 43 insertions(+), 22 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] vmdk: Don't corrupt desc file in vmdk_write_cid

2023-11-27 Thread Eric Blake
26 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake Are we trying to get this into 8.2, since it is a data corruption? -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: Converting images to stdout

2023-11-20 Thread Eric Blake
ut files could be presented in raw format using > qemu-storage-daemon. Yes, getting seekable input from any other format is easy enough; it's the streaming output that is the trickier task. > > And that's the general idea, comments and questions are welcome. > > Thanks! > &g

Re: [PATCH] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2023-11-08 Thread Eric Blake
> +if (eva->event == QAPI_EVENT_BLOCK_IO_ERROR) { > +return !strcmp(qdict_get_str(eva->data, "device"), > + qdict_get_str(evb->data, "device")); > +} > + At any rate, the idea makes sense for me. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 19/24] block: Introduce bdrv_co_change_backing_file()

2023-11-03 Thread Eric Blake
On Fri, Nov 03, 2023 at 11:33:47AM +0100, Kevin Wolf wrote: > Am 30.10.2023 um 14:57 hat Eric Blake geschrieben: > > On Fri, Oct 27, 2023 at 05:53:28PM +0200, Kevin Wolf wrote: > > > bdrv_change_backing_file() is called both inside and outside coroutine > > > conte

Re: [PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-11-03 Thread Eric Blake
> > bdrv_replace_node(commit_top_bs, top, _abort); > > > +bdrv_drained_end(top); > > > +bdrv_graph_wrunlock(); > > > > ...but here you do it in the opposite order. Intentional? > > No, this is actually wrong. bdrv_drained_begin() has

Re: [PATCH 04/24] block: Mark bdrv_root_attach_child() GRAPH_WRLOCK

2023-11-03 Thread Eric Blake
On Fri, Nov 03, 2023 at 10:45:11AM +0100, Kevin Wolf wrote: > Am 27.10.2023 um 22:22 hat Eric Blake geschrieben: > > On Fri, Oct 27, 2023 at 05:53:13PM +0200, Kevin Wolf wrote: > > > Instead of taking the writer lock internally, require callers to already > >

Re: [PATCH v2 1/1] qemu-img: do not erase destination file in qemu-img dd command

2023-11-01 Thread Eric Blake
nical debt; we're better off putting lipstick on a pig. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v4 03/10] block/mirror: move dirty bitmap to filter

2023-10-31 Thread Eric Blake
+ > 1 file changed, 13 insertions(+), 4 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v4 02/10] block/mirror: set actively_synced even after the job is ready

2023-10-31 Thread Eric Blake
iewed-by: Vladimir Sementsov-Ogievskiy > --- > > No changes in v4. > > block/mirror.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v4 01/10] blockjob: introduce block-job-change QMP command

2023-10-31 Thread Eric Blake
iles changed, 82 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 24/24] block: Protect bs->file with graph_lock

2023-10-30 Thread Eric Blake
- > block/qed.c | 12 ++-- > block/raw-format.c | 9 ++--- > block/replication.c | 5 - > block/vmdk.c | 14 -- > 15 files changed, 97 insertions(+), 41 deletions(-) > Revie

Re: [PATCH 23/24] block: Take graph lock for most of .bdrv_open

2023-10-30 Thread Eric Blake
fail: Why the change in indentation? At least emacs intentionally prefers to indent top-level labels 1 column in, so that they cannot be confused with function declarations in the first column. But that's cosmetic. > +bdrv_graph_rdunlock_main_loop(); > +fail_unlocked: > g_free(s->l1_table); > qemu_vfree(s->l2_cache); > g_free(s->cluster_cache); Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 22/24] vhdx: Take locks for accessing bs->file

2023-10-30 Thread Eric Blake
; block/vhdx-log.c | 40 ++-- > block/vhdx.c | 18 +++--- > 3 files changed, 39 insertions(+), 28 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 21/24] qcow2: Take locks for accessing bs->file

2023-10-30 Thread Eric Blake
now or queued for the next flush, we still keep the same bs->file), so it looks right after all - these really are operations where we don't want the graph changed out from underneath us while we are modifying the qcow2 header. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 20/24] block: Add missing GRAPH_RDLOCK annotations

2023-10-30 Thread Eric Blake
2 +- > block/vdi.c | 9 - > block/vhdx.c | 6 +++--- > 16 files changed, 55 insertions(+), 60 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2023-10-30 Thread Eric Blake
> # Since: 2.12 > ## > { 'struct': 'BlockdevCreateOptionsQcow2', > @@ -5039,7 +5075,14 @@ > '*preallocation': 'PreallocMode', > '*lazy-refcounts': 'bool', > '*refcount-bits': 'int', > -'*compression-type':'Qcow2CompressionT

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

2023-10-30 Thread Eric Blake
stand that drivers may be written with sectors in mind, but any time we mix units in the public interface, it gets awkward. I'd lean towards having bytes here, with a requirement that it be a multiple of 512. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 19/24] block: Introduce bdrv_co_change_backing_file()

2023-10-30 Thread Eric Blake
e block. This shows why I personally dislike aligning =, but I tolerate it when it is already prevailing style. Still, it feels weird to be inconsistent within the same patch. At any rate, that's cosmetic, and not a correctness issue. Up to you if you want to ignore my commentary in this case. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 18/24] blkverify: Add locking for request_fn

2023-10-30 Thread Eric Blake
anged, 11 insertions(+), 5 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 17/24] block: Protect bs->backing with graph_lock

2023-10-27 Thread Eric Blake
We know this is a > test > + * and nothing else is running, so don't bother with TSA. > + */ > +static void coroutine_mixed_fn TSA_NO_TSA > +test_drv_cb_common(BlockBackend *blk, enum drain_type drain_type, > + bool recursive) Fair enough. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-10-27 Thread Eric Blake
_s->was_undrained = false; > > g_assert(parent_bs->quiesce_counter == old_drain_count); > +bdrv_drained_begin(old_child_bs); > +bdrv_drained_begin(new_child_bs); > +bdrv_graph_wrlock(NULL); Why is this locking on NULL instead of new_child_bs? > bdrv_replace_node(old_child_bs, new_child_bs, _abort); > +bdrv_graph_wrunlock(); > +bdrv_drained_end(new_child_bs); > +bdrv_drained_end(old_child_bs); > g_assert(parent_bs->quiesce_counter == new_drain_count); > > if (!old_drain_count && !new_drain_count) { -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 15/24] block: Mark bdrv_replace_node_common() GRAPH_WRLOCK

2023-10-27 Thread Eric Blake
oContext and both must be drained. > + * > * With auto_skip=true bdrv_replace_node_common skips updating from parents > * if it creates a parent-child relation loop or if parent is block-job. Useful doc addition, even though the commit message doesn't mention it. I see no problem wit

Re: [PATCH 14/24] block: Inline bdrv_set_backing_noperm()

2023-10-27 Thread Eric Blake
etions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 13/24] block: Mark bdrv_set_backing_hd_drained() GRAPH_WRLOCK

2023-10-27 Thread Eric Blake
hanged, 8 insertions(+), 5 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 12/24] block: Mark bdrv_cow_child() and callers GRAPH_RDLOCK

2023-10-27 Thread Eric Blake
lock/block_int-io.h | 5 +++-- > block/stream.c | 2 +- > qemu-img.c | 11 --- > 3 files changed, 12 insertions(+), 6 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 11/24] block: Mark bdrv_filter_child() and callers GRAPH_RDLOCK

2023-10-27 Thread Eric Blake
ude/block/block_int-io.h | 4 ++-- > block.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > Deceptively short compared to some of the others in this series. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

  1   2   3   4   5   6   7   8   9   10   >