[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 09/11] block: make BlockLimits::max_pdiscard 64bit
From: |
Eric Blake |
Subject: |
Re: [PATCH v5 09/11] block: make BlockLimits::max_pdiscard 64bit |
Date: |
Mon, 7 Jun 2021 10:05:34 -0500 |
User-agent: |
NeoMutt/20210205 |
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 <vsementsov@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 <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v5 09/11] block: make BlockLimits::max_pdiscard 64bit,
Eric Blake <=