[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] block/file-posix: Do not force-cap *pnum
From: |
Eric Blake |
Subject: |
Re: [PATCH 3/6] block/file-posix: Do not force-cap *pnum |
Date: |
Fri, 18 Jun 2021 15:16:47 -0500 |
User-agent: |
NeoMutt/20210205 |
On Thu, Jun 17, 2021 at 05:52:44PM +0200, Max Reitz wrote:
> bdrv_co_block_status() does it for us, we do not need to do it here.
>
> The advantage of not capping *pnum is that bdrv_co_block_status() can
> cache larger data regions than requested by its caller.
We should update the documentation in include/block/block_int.h to
mention that the driver's block_status callback may treat *pnum as a
soft cap, and that returning a larger value is fine.
But I agree with this change in the individual drivers, as long as we
remember to make our global contract explicit that we can now rely on
it ;)
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 0/6] block: block-status cache for data regions, Max Reitz, 2021/06/17
- [PATCH 1/6] block: Drop BDS comment regarding bdrv_append(), Max Reitz, 2021/06/17
- [PATCH 2/6] block: block-status cache for data regions, Max Reitz, 2021/06/17
- [PATCH 3/6] block/file-posix: Do not force-cap *pnum, Max Reitz, 2021/06/17
- [PATCH 4/6] block/gluster: Do not force-cap *pnum, Max Reitz, 2021/06/17
- [PATCH 5/6] block/nbd: Do not force-cap *pnum, Max Reitz, 2021/06/17