|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v2 07/26] block: add missing coroutine_fn annotations |
Date: | Sat, 14 May 2022 11:54:07 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 5/13/22 23:26, Eric Blake wrote:
+int coroutine_fn blk_pwrite_zeroes(BlockBackend *blk, int64_t offset, + int64_t bytes, BdrvRequestFlags flags)Tracking down all callers of blk_pwrite_zeroes is not as trivial as in the previous patches. But the very first one I checked: block.c: create_file_fallback_zero_first_sector() is neither marked coroutine_fn, nor does it have the "if (qemu_in_coroutine())" guard.
That one in particular _should_ be coroutine_fn; bdrv_co_create_opts_simple is the only caller. This is probably a limitation of the thread-safety annotations that I used to generate this patchset: the compiler does limited inter-procedural analysis which for us means missing some potential coroutine_fn additions.
But I agree that blk_pwrite_zeros shouldn't be a coroutine_fn, because of fuse_fallocate and block_load. Alberto, this function is another candidate for adding a blk_co_pwrite_zeros + a matching generated_co_wrapper.
Paolo
And block.c is not touched in this patch series, per the diffstat in 0/26. Am I missing something?
[Prev in Thread] | Current Thread | [Next in Thread] |