]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd/server: Mark negotiation functions as coroutine_fn
authorEric Blake <eblake@redhat.com>
Mon, 8 Apr 2024 16:00:44 +0000 (11:00 -0500)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 28 Apr 2024 12:16:47 +0000 (15:16 +0300)
commitf7b46e82cec023597da0e2cc65d911626bae9d6c
treef592d3bdfc426c6555d3fc660f8dedf105b61c68
parenta0823c276671b0253f77cf5a1550995c3d06050f
nbd/server: Mark negotiation functions as coroutine_fn

nbd_negotiate() is already marked coroutine_fn.  And given the fix in
the previous patch to have nbd_negotiate_handle_starttls not create
and wait on a g_main_loop (as that would violate coroutine
constraints), it is worth marking the rest of the related static
functions reachable only during option negotiation as also being
coroutine_fn.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20240408160214.1200629-6-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[eblake: drop one spurious coroutine_fn marking]
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 4fa333e08dd96395a99ea8dd9e4c73a29dd23344)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: fixups in nbd/server.c for v8.1.0-1366-gfd358d83901d
 "nbd/server: Refactor list of negotiated meta contexts")
nbd/server.c