Improve some existing tests to cover client safety valves for oversize
requests, and add a new test that tests libnbd behavior on server
errors to the same sort of requests. The new test requires a parallel
patch posted to nbdkit to teach 'nbdkit eval' how to forcefully
disconnect the server on
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 buffer is fatal. It's time to teach libnbd to
honor qemu's max buffer by
I'm getting closer to posting v2 of my 64-bit NBD extension patches.
On the way, I noticed that libnbd was not obeying block-size maximum
constraints, which becomes all the more important when we want to
allow for even larger buffer sizes for servers that support it.
Eric Blake (2):
api: Add
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
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 set of reserved return values to 9-15. We figure
it is unlikely that
I think this addresses all the feedback given on v1. Instead of
packing things into 3 new status values, and using silent/noisy stderr
as the deciding factor between returning OK or ERROR (which in turn
required either code duplication or a nasty goto for control flow),
this version uses 5 new
We are about to define specific meaning to more return status values.
To make it easier to probe if nbdkit is new enough to honor such
definitions (and thus whether it makes sense to write a script that
tries to utilize such special return values), it is worth advertising
the max known status
On Wed, Nov 02, 2022 at 01:36:26PM +, Richard W.M. Jones wrote:
> > > -=item 4, 5, 6, 7
> > > +=item S<4>
> >
> > The S<> notation seems new here (so it's going to be inconsistent with
> > the rest of this file, I think).
>
> I was going to mention this too. The S<> notation is used to
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 -- unlike CD-ROMs (for which we create a device
model in the target, albeit with no medium inserted), empty floppies
should not