On Mon, Jan 06, 2025 at 11:05:09AM -0600, Eric Blake wrote:
 On Mon, Jan 06, 2025 at 04:53:52PM +0000, Richard W.M. Jones wrote:
 > The QueryAllocatedBlocks API has (another) frustrating feature.  It
 > can only query whole "chunks" (128 sectors).  If the disk size is not
 > aligned to the chunk size (say the size was 129 sectors) then there's
 > a bit at the end which cannot be queried.  Furthermore, the API gives
 > an error in this case instead of being helpful:
 > 
 >   VixDiskLib_QueryAllocatedBlocks: One of the parameters was invalid
 > 
 > Fixes: 
https://issues.redhat.com/browse/RHEL-71694
 > ---
 >  tests/Makefile.am                       |  5 +-
 >  plugins/vddk/worker.c                   | 28 ++++++++-
 >  tests/test-vddk-real-unaligned-chunk.sh | 82 +++++++++++++++++++++++++
 >  3 files changed, 112 insertions(+), 3 deletions(-)
 
 ACK v2 series 
Thanks, this was pushed as:
fe855addae vddk: Include <stdbool.h>
2ba76db4a0 vddk: Cache the disk size in the handle
24fd7df460 vddk: do_extents: Mark some local variables const
2f4d71f8f7 vddk: do_extents: Exit the function if we hit req_one condition
fd918f3d1a vddk: do_extents: Avoid reading partial chunk beyond the end of the disk
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
Read my programming and virtualization blog: 
http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit