On Wed, May 05, 2021 at 10:49:59AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We are going to support 64 bit discard requests. Now update the
> limit variable. It's absolutely safe. The variable is set in some
> drivers, and used in bdrv_co_pdiscard().
> 
> Update also max_pdiscard variable in bdrv_co_pdiscard(), so that
> bdrv_co_pdiscard() is now prepared to 64bit requests. The remaining

s/to/for/

> logic including num, offset and bytes variables is already
> supporting 64bit requests.
> 
> So the only thing that prevents 64 bit requests is limiting
> max_pdiscard variable to INT_MAX in bdrv_co_pdiscard().
> We'll drop this limitation after updating all block drivers.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
> ---
>  include/block/block_int.h | 11 ++++++-----
>  block/io.c                |  3 ++-
>  2 files changed, 8 insertions(+), 6 deletions(-)
>

Deceptively simple for what it entails, but I agree that we are safe.

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply via email to