[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/12] block-backend: blk_check_byte_request(): int64_t bytes
From: |
Eric Blake |
Subject: |
Re: [PATCH 01/12] block-backend: blk_check_byte_request(): int64_t bytes |
Date: |
Wed, 6 Oct 2021 10:09:47 -0500 |
User-agent: |
NeoMutt/20210205-815-1dd940 |
On Wed, Oct 06, 2021 at 03:17:07PM +0200, Vladimir Sementsov-Ogievskiy wrote:
> Rename size and make it int64_t to correspond to modern block layer,
> which always uses int64_t for offset and bytes (not in blk layer yet,
> which is a task for following commits).
>
> All callers pass int or unsigned int.
>
> So, for bytes in [0, INT_MAX] nothing is changed, for negative bytes we
> now fail on "bytes < 0" check instead of "bytes > INT_MAX" check.
>
> Note, that blk_check_byte_request() still doesn't allow requests
> exceeding INT_MAX.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/block-backend.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 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 11/12] block-backend: blk_pread, blk_pwrite: rename count parameter to bytes, Vladimir Sementsov-Ogievskiy, 2021/10/06
[PATCH 03/12] block-backend: convert blk_co_pwritev_part to int64_t bytes, Vladimir Sementsov-Ogievskiy, 2021/10/06
[PATCH 05/12] block-backend: rename _do_ helper functions to _co_do_, Vladimir Sementsov-Ogievskiy, 2021/10/06