On Sat, Sep 24, 2022 at 2:42 PM Paolo Bonzini <pbonz...@redhat.com> wrote: > Because at the time I wrote the patch, blk_pwrite_zeroes() was a > coroutine_fn. :) > > It is called from bdrv_co_create_opts_simple which is coroutine_fn and > performs I/O, so it should be a coroutine_fn. I have a few more patches > to not go through the generated_co_wrappers, but I was curious to see > if we could automate those changes through your tool.
The static analyzer [1] should find all such cases, e.g.: ./static-analyzer.py -c no_coroutine_fn build block coroutine_fn and generated_co_wrapper must be adjusted for this to work on master: #define coroutine_fn __attribute__((__annotate__("coroutine_fn"))) #define generated_co_wrapper __attribute__((__annotate__("no_coroutine_fn"))) [1] https://gitlab.com/albertofaria/qemu/-/tree/static-analysis