On Mon, Sep 07, 2026 at 01:07:42PM +0200, Niklas Cassel wrote:
> diff --git a/block/io.c b/block/io.c
> index cef23ee5bc..64e2f2b046 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -3355,6 +3355,16 @@ int coroutine_fn bdrv_co_zone_append(BlockDriverState
> *bs, int64_t *offset,
> return ret;
> }
>
> + /*
> + * Zone write pointers are kept and reported in units of
> BDRV_SECTOR_SIZE,
> + * so an append that would leave a write pointer at a finer granularity
> + * cannot be represented. Drivers may impose a coarser granularity of
> their
> + * own, see BlockLimits.write_granularity.
> + */
> + if (!QEMU_IS_ALIGNED(qiov->size, BDRV_SECTOR_SIZE)) {
> + return -EINVAL;
> + }
> +
> bdrv_inc_in_flight(bs);
> if (!drv || !drv->bdrv_co_zone_append || bs->bl.zoned == BLK_Z_NONE) {
> co.ret = -ENOTSUP;When looking at bdrv_co_zone_append() and surrounding functions, I noticed that the CoroutineIOCompletion co local variable is not used except for the co.ret field. The co local could be replaced with "int ret" to make the function more concise. If you feel like it, feel free to add a patch that cleans up these functions.
signature.asc
Description: PGP signature
