qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/26] blkdebug: add missing coroutine_fn annotations


From: Paolo Bonzini
Subject: Re: [PATCH 06/26] blkdebug: add missing coroutine_fn annotations
Date: Wed, 5 Oct 2022 17:11:38 -0400



Il mer 5 ott 2022, 06:32 Kevin Wolf <kwolf@redhat.com> ha scritto:
Hm... blkdebug_debug_event() is called from bdrv_debug_event(), which is
not coroutine_fn. And I think that it's not coroutine_fn is correct:
For example, with 'qemu-img snapshot -c' you get img_snapshot() ->
bdrv_snapshot_create() -> qcow2_snapshot_create() ->
qcow2_alloc_clusters() -> BLKDBG_EVENT. I'm sure many other calls in
qcow2 can be reached from non-coroutine context as well.

It almost looks like your code analysis didn't consider calls through
function pointers?

No, that is not what happened. Rather it's that the analysis goes the other way round: because SUSPEND rules call qemu_coroutine_yield(), clang wants all the callers to be coroutine_fn too. It is technically incorrect that bdrv_debug_events sometimes are placed outside coroutine context, and QEMU would crash if those events were associated with a suspend rule.

I guess I (or you) can just drop this patch?

Paolo 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]