Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
On Tue, Nov 15, 2022 at 06:40:33PM +0100, Laszlo Ersek wrote: > On 11/15/22 17:02, Richard W.M. Jones wrote: > > On Thu, Nov 10, 2022 at 04:08:57PM +0100, Laszlo Ersek wrote: > >> Per perlpod(1), the canonical Formatting Code for this would be Z<>, as > >> in (untested): > >> > >> =item Z<>6 > >>

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Laszlo Ersek
On 11/15/22 17:02, Richard W.M. Jones wrote: > On Thu, Nov 10, 2022 at 04:08:57PM +0100, Laszlo Ersek wrote: >> Per perlpod(1), the canonical Formatting Code for this would be Z<>, as >> in (untested): >> >> =item Z<>6 >> >> However, I can't see a single instance of Z<> in the v2v projects, so it

Re: [Libguestfs] [libnbd PATCH] api: Generate flag values as unsigned

2022-11-15 Thread Richard W.M. Jones
On Fri, Nov 11, 2022 at 11:27:51AM -0600, Eric Blake wrote: > C says that performing bitwise math on ints can lead to corner-case > undefined values. When we document something as being usable as a > flag with bitwise-OR and similar, we should ensure the values are > unsigned, to avoid those

Re: [Libguestfs] [libnbd PATCH 1/2] api: Add LIBNBD_STRICT_PAYLOAD to honor qemu 32M write limit

2022-11-15 Thread Richard W.M. Jones
On Wed, Nov 09, 2022 at 05:26:06PM -0600, Eric Blake wrote: > Modern qemu tends to advertise a strict 32M payload limit. Yet we > default to allowing the user to attempt up to 64M in pwrite. For > pread, qemu will reply with EINVAL but keep the connection up; but for > pwrite, an overlarge

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
On Wed, Nov 09, 2022 at 02:43:53PM -0600, Eric Blake wrote: > Make it possible for the sh and eval plugins to disconnect a client or > shut down the entire nbdkit server by use of special return values. > Prior to this patch we had reserved 4-7 for future use; this defines > 4-8, and extends the

Re: [Libguestfs] [nbdkit PATCH v2 2/2] sh: Add exit status triggers for nbdkit_{shutdown, disconnect}

2022-11-15 Thread Richard W.M. Jones
On Thu, Nov 10, 2022 at 04:08:57PM +0100, Laszlo Ersek wrote: > Per perlpod(1), the canonical Formatting Code for this would be Z<>, as > in (untested): > > =item Z<>6 > > However, I can't see a single instance of Z<> in the v2v projects, so it > could cause compatibility problems. I guess let's

Re: [Libguestfs] [nbdkit PATCH v2 1/2] sh: Advertise max known status in --dump-plugin

2022-11-15 Thread Richard W.M. Jones
On Wed, Nov 09, 2022 at 02:43:52PM -0600, Eric Blake wrote: > @@ -51,7 +51,9 @@ typedef enum exit_code { >OK = 0, >ERROR = 1, /* all script error codes are mapped to this */ >MISSING = 2, /* method missing */ > - RET_FALSE = 3/* script exited with code 3

Re: [Libguestfs] [p2v PATCH] disks.c: skip SCSI floppy drives with no disk inserted

2022-11-15 Thread Laszlo Ersek
On 11/15/22 11:35, Richard W.M. Jones wrote: > On Fri, Nov 11, 2022 at 03:24:18PM +0100, Laszlo Ersek wrote: >> Hi Rich, >> >> On 11/09/22 14:52, Laszlo Ersek wrote: >>> A SCSI floppy drive with no disk inserted looks like a normal /dev/sd* >>> node, but causes the nbdkit file plugin to fail with

Re: [Libguestfs] [p2v PATCH] disks.c: skip SCSI floppy drives with no disk inserted

2022-11-15 Thread Richard W.M. Jones
On Fri, Nov 11, 2022 at 03:24:18PM +0100, Laszlo Ersek wrote: > Hi Rich, > > On 11/09/22 14:52, Laszlo Ersek wrote: > > A SCSI floppy drive with no disk inserted looks like a normal /dev/sd* > > node, but causes the nbdkit file plugin to fail with ENOMEDIUM. Filter out > > such devices altogether