On Thu, Jun 01, 2023 at 01:51:29PM +0200, Paolo Bonzini wrote: > Include both coroutine and non-coroutine versions, the latter being > co_wrapper_mixed_bdrv_rdlock of the former. > > Reviewed-by: Eric Blake <ebl...@redhat.com> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > block/io.c | 18 +++++------------- > include/block/block-io.h | 18 ++++++++++++------ > 2 files changed, 17 insertions(+), 19 deletions(-)
Always funny to see adding functions by reducing line count, thanks to the wrapper generator. > +++ b/include/block/block-io.h > @@ -128,17 +128,23 @@ int coroutine_fn GRAPH_RDLOCK > bdrv_co_zone_append(BlockDriverState *bs, > BdrvRequestFlags flags); > > bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs); > -int bdrv_block_status(BlockDriverState *bs, int64_t offset, > - int64_t bytes, int64_t *pnum, int64_t *map, > - BlockDriverState **file); > + > +int coroutine_fn GRAPH_RDLOCK > +bdrv_co_block_status(BlockDriverState *bs, int64_t offset, > + int64_t bytes, int64_t *pnum, > + int64_t *map, BlockDriverState **file); Given that you line-wrapped this one at the function name, > +int co_wrapper_mixed_bdrv_rdlock bdrv_block_status(BlockDriverState *bs, > int64_t offset, > + int64_t bytes, int64_t > *pnum, > + int64_t *map, > BlockDriverState **file); shouldn't you do likewise here? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org