Re: [Libguestfs] [nbdkit] ARRAY_SIZE [was: vddk: Demote another "phone home" error message to debug]

2022-07-07 Thread Laszlo Ersek
On 07/07/22 22:45, Richard W.M. Jones wrote: > On Thu, Jul 07, 2022 at 03:10:19PM -0500, Eric Blake wrote: >> There's also a question of whether the error message when the >> constraint fails is going to be legible enough to give the developer a >> hint as to what they did wrong when they pass in

Re: [Libguestfs] [nbdkit] ARRAY_SIZE [was: vddk: Demote another "phone home" error message to debug]

2022-07-07 Thread Richard W.M. Jones
On Thu, Jul 07, 2022 at 03:10:19PM -0500, Eric Blake wrote: > There's also a question of whether the error message when the > constraint fails is going to be legible enough to give the developer a > hint as to what they did wrong when they pass in a non-array type; but > I'm less worried about

Re: [Libguestfs] [nbdkit] ARRAY_SIZE [was: vddk: Demote another "phone home" error message to debug]

2022-07-07 Thread Eric Blake
On Thu, Jul 07, 2022 at 08:24:43PM +0100, Richard W.M. Jones wrote: > On Thu, Jul 07, 2022 at 01:46:28PM -0500, Eric Blake wrote: > > I see that is now done as part of 0fa23df5c. While > > include/array-size.h looks okay, I personally have a tough time with > > include/compiler-macros.h

Re: [Libguestfs] [PATCH libnbd v4 1/2] copy: Store the preferred block size in the operations struct

2022-07-07 Thread Richard W.M. Jones
On Thu, Jul 07, 2022 at 01:54:55PM -0500, Eric Blake wrote: > > + if (S_ISREG (stat.st_mode)) /* Regular file. */ > > +return file_create (filename, fd, > > +stat.st_size, (uint64_t) stat.st_blksize, false, > > d); > > Is the cast to uint64_t actually needed? No

Re: [Libguestfs] [PATCH libnbd v4 2/2] copy: Use preferred block size for copying

2022-07-07 Thread Eric Blake
On Thu, Jun 30, 2022 at 05:43:57PM +0100, Richard W.M. Jones wrote: > You're not supposed to read or write NBD servers at a granularity less > than the advertised minimum block size. nbdcopy has ignored this > requirement, and this is usually fine because the NBD servers we care > about support

Re: [Libguestfs] [nbdkit] ARRAY_SIZE [was: vddk: Demote another "phone home" error message to debug]

2022-07-07 Thread Richard W.M. Jones
On Thu, Jul 07, 2022 at 01:46:28PM -0500, Eric Blake wrote: > I see that is now done as part of 0fa23df5c. While > include/array-size.h looks okay, I personally have a tough time with > include/compiler-macros.h BUILD_BUG_ON_ZERO(expr). Every time I > encounter a similarly-named macro in other

Re: [Libguestfs] [PATCH libnbd v4 1/2] copy: Store the preferred block size in the operations struct

2022-07-07 Thread Eric Blake
On Thu, Jun 30, 2022 at 05:43:56PM +0100, Richard W.M. Jones wrote: > This will be used in a subsequent commit. At the moment the preferred > block size for all sources / destinations is simply calculated and > stored. > --- > copy/file-ops.c | 4 +++- > copy/main.c | 29

Re: [Libguestfs] [nbdkit] ARRAY_SIZE [was: vddk: Demote another "phone home" error message to debug]

2022-07-07 Thread Eric Blake
On Thu, Jul 07, 2022 at 12:58:53PM +0200, Laszlo Ersek wrote: > On 07/07/22 11:02, Richard W.M. Jones wrote: > > Reported-by: Ming Xie > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2104720 > > --- > I think it's time for us to introduce the ARRAY_SIZE macro. > > Can you do that first

Re: [Libguestfs] [PATCH libnbd v4 0/2] copy: Use preferred block size for copying

2022-07-07 Thread Eric Blake
On Thu, Jun 30, 2022 at 05:43:55PM +0100, Richard W.M. Jones wrote: > v3 was: > https://listman.redhat.com/archives/libguestfs/2022-June/029336.html > > v4 makes almost all of the recommended changes from Laszlo's reviews. > > I have dropped the third patch (the one which stablises >

Re: [Libguestfs] [PATCH nbdkit] vddk: Demote another "phone home" error message to debug

2022-07-07 Thread Richard W.M. Jones
On Thu, Jul 07, 2022 at 12:58:53PM +0200, Laszlo Ersek wrote: > I think it's time for us to introduce the ARRAY_SIZE macro. Yeah I thought about that while I was writing the patch :-) I'll do as you suggest, thanks. Rich. -- Richard Jones, Virtualization Group, Red Hat

Re: [Libguestfs] [PATCH nbdkit] vddk: Demote another "phone home" error message to debug

2022-07-07 Thread Laszlo Ersek
On 07/07/22 11:02, Richard W.M. Jones wrote: > Reported-by: Ming Xie > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2104720 > --- > plugins/vddk/vddk.c | 31 --- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/plugins/vddk/vddk.c

[Libguestfs] [PATCH nbdkit] vddk: Demote another "phone home" error message to debug

2022-07-07 Thread Richard W.M. Jones
Reported-by: Ming Xie Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2104720 --- plugins/vddk/vddk.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index dbd3fdbe..1ed9fc53 100644 ---