[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] block: rename the bdrv_co_block_status static function
From: |
Eric Blake |
Subject: |
Re: [PATCH 1/4] block: rename the bdrv_co_block_status static function |
Date: |
Fri, 21 Apr 2023 09:55:47 -0500 |
User-agent: |
NeoMutt/20230407 |
On Wed, Apr 05, 2023 at 12:32:13PM +0200, Paolo Bonzini wrote:
> bdrv_block_status exists as a wrapper for bdrv_block_status_above,
> but the name of the (hypothetical) coroutine version, bdrv_co_block_status,
> is squatted by a random static function. Rename it to bdrv_do_block_status.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/io.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
[Hmm - I notice I have a local branch that tries to address an issue
where a 4k-sector overlay backed by a 512-byte backing image can
report unaligned block status, and touches this maze of functions to
support a way to get block status forced to a given alignment. I
should try and revive that once this series lands...]
>
> diff --git a/block/io.c b/block/io.c
> index db438c765757..e86090b7692b 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -2230,7 +2230,7 @@ int bdrv_flush_all(void)
> * set to the host mapping and BDS corresponding to the guest offset.
> */
> static int coroutine_fn GRAPH_RDLOCK
> -bdrv_co_block_status(BlockDriverState *bs, bool want_zero,
> +bdrv_do_block_status(BlockDriverState *bs, bool want_zero,
This is still marked coroutine. Do we want to go with the longer name
bdrv_co_do_block_status, to make it obvious that it is both coroutine
and a local helper? Or is the fact that it is static to this file
enough to elide the _co?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}*, Paolo Bonzini, 2023/04/05
- [PATCH 1/4] block: rename the bdrv_co_block_status static function, Paolo Bonzini, 2023/04/05
- Re: [PATCH 1/4] block: rename the bdrv_co_block_status static function,
Eric Blake <=
- [PATCH 2/4] block: complete public block status API, Paolo Bonzini, 2023/04/05
- [PATCH 3/4] block: switch to co_wrapper for bdrv_is_allocated_*, Paolo Bonzini, 2023/04/05
- [PATCH 4/4] block: convert more bdrv_is_allocated* and bdrv_block_status* calls to coroutine versions, Paolo Bonzini, 2023/04/05
- Re: [PATCH 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}*, Paolo Bonzini, 2023/04/21