[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/12] block-backend: update blk_co_pwrite() and blk_co_pread
From: |
Eric Blake |
Subject: |
Re: [PATCH 14/12] block-backend: update blk_co_pwrite() and blk_co_pread() wrappers |
Date: |
Thu, 7 Oct 2021 15:38:06 -0500 |
User-agent: |
NeoMutt/20210205-818-e2615c |
On Thu, Oct 07, 2021 at 07:52:43PM +0200, Vladimir Sementsov-Ogievskiy wrote:
> Make bytes argument int64_t to be consistent with modern block-layer.
> Callers should be OK with it as type becomes wider.
>
> What is inside functions?
>
> - Conversion from int64_t to size_t. Still, we
> can't have a buffer larger than SIZE_MAX, therefore bytes should not be
> larger than SIZE_MAX as well. Add and assertion.
s/and/an/
>
> - Passing to blk_co_pwritev() / blk_co_preadv() which already has
> int64_t bytes argument.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> include/sysemu/block-backend.h | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- Re: [PATCH 08/12] block-backend: convert blk_foo wrappers to use int64_t bytes parameter, (continued)
- [PATCH 02/12] block-backend: make blk_co_preadv() 64bit, Vladimir Sementsov-Ogievskiy, 2021/10/06
- [PATCH 07/12] block-backend: drop blk_prw, use block-coroutine-wrapper, Vladimir Sementsov-Ogievskiy, 2021/10/06
- [PATCH 09/12] block-backend: convert blk_co_copy_range to int64_t bytes, Vladimir Sementsov-Ogievskiy, 2021/10/06
- [PATCH 13/12] block-backend: fix blk_co_flush prototype to mention coroutine_fn, Vladimir Sementsov-Ogievskiy, 2021/10/07
- [PATCH 14/12] block-backend: update blk_co_pwrite() and blk_co_pread() wrappers, Vladimir Sementsov-Ogievskiy, 2021/10/07
- Re: [PATCH 14/12] block-backend: update blk_co_pwrite() and blk_co_pread() wrappers,
Eric Blake <=