Re: [Libguestfs] [libnbd PATCH v3 08/22] block_status: Track 64-bit extents internally

2023-06-09 Thread Laszlo Ersek
Fair warning: this patch has made me both very excited and very uncomfortable; that's the reason my style might come across as needlessly "combative". I don't mean to be combative. It's just how my thoughts have come out, and (unfortunately) I need to go pick up my son now, and don't have time for

Re: [Libguestfs] [libnbd PATCH] maint: Tweak diff order of files under generator

2023-06-09 Thread Laszlo Ersek
On 6/9/23 03:18, Eric Blake wrote: > When reading a diff of files used to generate other code, it helps to > see API changes up front, and to see state machine changes in the > order in which states are generally encountered, while leaving > language binding changes for last. > > Signed-off-by: Er

Re: [Libguestfs] [libnbd PATCH v4 1/4] states: Document our reliance on type overlaps

2023-06-09 Thread Laszlo Ersek
On 6/9/23 04:17, Eric Blake wrote: > When I added structured replies to the NBD spec, I intentionally chose > a wire layout where the magic number and cookie overlap, even while > the middle member changes from uint32_t error to the pair uint16_t > flags and type. Based only on a strict reading of

Re: [Libguestfs] [libnbd PATCH v4 2/4] generator: Finish parsing structured header in states-reply.c

2023-06-09 Thread Laszlo Ersek
On 6/9/23 04:17, Eric Blake wrote: > Splitting the parse of a 20-byte structured reply header across two > source files (16 bytes overlapping with simple replies in > states-reply.c, the remaining 4 bytes in states-reply-structured.c) is > confusing. The upcoming addition of extended headers will

Re: [Libguestfs] [libnbd PATCH v3 08/22] block_status: Track 64-bit extents internally

2023-06-09 Thread Eric Blake
On Fri, Jun 09, 2023 at 11:39:27AM +0200, Laszlo Ersek wrote: > Fair warning: this patch has made me both very excited and very > uncomfortable; that's the reason my style might come across as > needlessly "combative". I don't mean to be combative. It's just how my > thoughts have come out, and (un

Re: [Libguestfs] [libnbd PATCH v4 2/4] generator: Finish parsing structured header in states-reply.c

2023-06-09 Thread Eric Blake
On Fri, Jun 09, 2023 at 05:22:36PM +0200, Laszlo Ersek wrote: > On 6/9/23 04:17, Eric Blake wrote: > > Splitting the parse of a 20-byte structured reply header across two > > source files (16 bytes overlapping with simple replies in > > states-reply.c, the remaining 4 bytes in states-reply-structur

Re: [Libguestfs] [libnbd PATCH] maint: Tweak diff order of files under generator

2023-06-09 Thread Eric Blake
On Fri, Jun 09, 2023 at 02:26:53PM +0200, Laszlo Ersek wrote: > On 6/9/23 03:18, Eric Blake wrote: > > When reading a diff of files used to generate other code, it helps to > > see API changes up front, and to see state machine changes in the > > order in which states are generally encountered, whi

Re: [Libguestfs] [libnbd PATCH v4 1/4] states: Document our reliance on type overlaps

2023-06-09 Thread Eric Blake
[Bah - I typed up a longer response, but lost it when accidentally trying to send through the wrong SMTP server, so now I have to remember what I had...] On Fri, Jun 09, 2023 at 02:45:56PM +0200, Laszlo Ersek wrote: > On 6/9/23 04:17, Eric Blake wrote: > > When I added structured replies to the NB

Re: [Libguestfs] [libnbd PATCH v3 08/22] block_status: Track 64-bit extents internally

2023-06-09 Thread Eric Blake
[fixing some of my editing errors] On Fri, Jun 09, 2023 at 10:42:25AM -0500, Eric Blake wrote: [...] > > The tl;dr summary of the above discourse: > There are two orthogonal communications going on: > > libnbd <-> server choice of NBD_REPLY_TYPE_BLOCK_STATUS{,_EXT} > app <-> libnbd choice o

Re: [Libguestfs] [libnbd PATCH] maint: Tweak diff order of files under generator

2023-06-09 Thread Eric Blake
On Fri, Jun 09, 2023 at 02:26:53PM +0200, Laszlo Ersek wrote: > On 6/9/23 03:18, Eric Blake wrote: > > When reading a diff of files used to generate other code, it helps to > > see API changes up front, and to see state machine changes in the > > order in which states are generally encountered, whi