On Fri, Apr 18, 2025 at 02:02:20PM -0500, Eric Blake wrote: > > I have trouble understanding what the exact semantics are of these modes > > are. Would it be possible to pass flags to block status calls that can > > be ORed together instead: WANT_OFFSET_VALID, WANT_ZERO, etc? The flags > > would be orthogonal and easier to understand than modes that seem to > > combine multiple flag behaviors. > > I can give that a try. If I'm understanding the request correctly, I > would map it as follows: > > BDRV_BSTAT_PRECISE => WANT_ZERO | WANT_OFFSET_VALID | WANT_ALLOCATED > BDRV_BSTAT_ALLOCATED => WANT_ALLOCATED > BDRV_BSTAT_ZERO => WANT_ZERO > > while still trying to keep it a mechanical conversion in this patch.
I've done that as a v2.5 reply to patch 1 and 2 of this series (the rest of the series is unchanged except for one obvious word change in the addition of bdrv_co_is_all_zeroes). If we like it better, I can resend the full series as v3. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org