Re: [PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-18 Thread Eric Blake
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

Re: [PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-18 Thread Eric Blake
On Thu, Apr 17, 2025 at 04:17:55PM -0400, Stefan Hajnoczi wrote: > On Thu, Apr 17, 2025 at 01:39:06PM -0500, Eric Blake wrote: > > This patch is purely mechanical, changing bool want_zero into a new > > enum BlockStatusMode. As of this patch, all implementations are > > unchanged (the old want_zer

Re: [PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-18 Thread Stefan Hajnoczi
On Thu, Apr 17, 2025 at 01:39:06PM -0500, Eric Blake wrote: > This patch is purely mechanical, changing bool want_zero into a new > enum BlockStatusMode. As of this patch, all implementations are > unchanged (the old want_zero==true is now mode==BDRV_BSTAT_PRECISE), > but the callers in io.c are s

[PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-17 Thread Eric Blake
This patch is purely mechanical, changing bool want_zero into a new enum BlockStatusMode. As of this patch, all implementations are unchanged (the old want_zero==true is now mode==BDRV_BSTAT_PRECISE), but the callers in io.c are set up so that future patches will be able to differente between whet