[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,
From: |
Eric Blake |
Subject: |
Re: [PATCH v5 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t |
Date: |
Thu, 23 Jun 2022 16:26:33 -0500 |
User-agent: |
NeoMutt/20220429-136-41baff |
On Thu, Jun 09, 2022 at 04:27:40PM +0100, Alberto Faria wrote:
> For consistency with other I/O functions, and in preparation to
> implement bdrv_{pread,pwrite}() using generated_co_wrapper.
>
> unsigned int fits in int64_t, so all callers remain correct.
>
> bdrv_check_request32() is called further down the stack and causes -EIO
> to be returned if 'bytes' is negative or greater than
> BDRV_REQUEST_MAX_BYTES, which in turns never exceeds SIZE_MAX.
>
> Signed-off-by: Alberto Faria <afaria@redhat.com>
> ---
> block/coroutines.h | 4 ++--
> include/block/block_int-io.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 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
- [PATCH v5 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper, Alberto Faria, 2022/06/09
- [PATCH v5 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}(), Alberto Faria, 2022/06/09
- [PATCH v5 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order, Alberto Faria, 2022/06/09
- [PATCH v5 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success, Alberto Faria, 2022/06/09
- [PATCH v5 04/10] crypto: Make block callbacks return 0 on success, Alberto Faria, 2022/06/09
- [PATCH v5 05/10] block: Make bdrv_co_pwrite() take a const buffer, Alberto Faria, 2022/06/09
- [PATCH v5 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper, Alberto Faria, 2022/06/09
- [PATCH v5 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t, Alberto Faria, 2022/06/09
- Re: [PATCH v5 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t,
Eric Blake <=
- [PATCH v5 08/10] block: Add bdrv_co_pwrite_sync(), Alberto Faria, 2022/06/09
- [PATCH v5 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn, Alberto Faria, 2022/06/09
- [PATCH v5 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty(), Alberto Faria, 2022/06/09
- Re: [PATCH v5 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper, Alberto Faria, 2022/06/23