|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 3/9] nbd/server.c: add missing coroutine_fn annotations |
Date: | Thu, 3 Nov 2022 17:58:55 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 |
On 11/3/22 14:42, Emanuele Giuseppe Esposito wrote:
There are probably more missing, but right now it is necessary that we extend coroutine_fn to block{allock/status}_to_extents, because they use bdrv_* functions calling the generated_co_wrapper API, which checks for the qemu_in_coroutine() case. Signed-off-by: Emanuele Giuseppe Esposito<eesposit@redhat.com>
generated_co_wrappers should only be called from functions that are *not* coroutine_fn. If they are coroutine_fn, they can call the bdrv_co_* version directly.
See for example https://patchew.org/QEMU/20221013123711.620631-1-pbonzini@redhat.com/20221013123711.620631-17-pbonzini@redhat.com/.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |