On Mon, Jan 06, 2025 at 04:53:47PM +0000, Richard W.M. Jones wrote:
> In v2:
> 
> - Cache the disk size in the handle, as Eric suggested in his review of v1
> 
> - Add a new patch to bail from the function if we hit the req_one condition.
> 
> I wasn't convinced that we would always do the right thing in the
> req_one case.  In particular, that we might add the extra extent in
> this case (which would be wrong since it would extend from the end of
> the last req_one extent to the end of the request).  Bailing from the
> whole function avoids this possibility.

Our driver code says that for plugins, req_one is a hint and the code
is free to ignore it (that's because the driver ensures that we clamp
down the answer to the client's original length according to true
req_one semantics, if the plugin ignored the hint).  But being safer
in the plugin doesn't hurt, so your work isn't wasted.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
_______________________________________________
Libguestfs mailing list -- guestfs@lists.libguestfs.org
To unsubscribe send an email to guestfs-le...@lists.libguestfs.org

Reply via email to