block: mark mixed functions that can suspend

The marking should be extended transitively to all functions that call
these ones, so that static analysis can be done much more efficiently.
However, this is a start and makes it possible to use vrc's path-based
searches to find potential bugs where coroutine_fns call blocking functions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2023-04-12 11:23:00 +02:00
parent 1bce34aaa9
commit e2dbca0337
4 changed files with 8 additions and 7 deletions

View file

@ -570,8 +570,8 @@ static void coroutine_fn bdrv_qed_open_entry(void *opaque)
qemu_co_mutex_unlock(&s->table_lock);
}
static int bdrv_qed_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
static int coroutine_mixed_fn bdrv_qed_open(BlockDriverState *bs, QDict *options,
int flags, Error **errp)
{
QEDOpenCo qoc = {
.bs = bs,