On Fri, Feb 18, 2022 at 12:25:56PM +0000, Richard W.M. Jones wrote: > On Thu, Feb 17, 2022 at 04:44:56PM -0600, Eric Blake wrote: > > On Thu, Feb 17, 2022 at 10:00:52PM +0000, Richard W.M. Jones wrote: > > > On Thu, Feb 17, 2022 at 03:58:07PM -0600, Eric Blake wrote: > > > > The NBD protocol spec recommends EINVAL (rather than EIO) for requests > > > > that violate block size constraints. Do we want to hardcode EINVAL, > > > > or else tweak the error policy to allow the user to specify which > > > > errno to provide? > > > > > > I err on not overthinking this. I'll change it to EINVAL, and if ever > > > we need to choose another errno then we can add a knob for it. > > > > Just noticed this XXX comment that we should now be able to test with > > blocksize-policy of error: > > https://gitlab.com/nbdkit/libnbd/-/blob/master/tests/errors.c#L464 > > Wow, that test is huge! Looking at the history it seems to have > accreted new tests over several years. > > I've partially split it into smaller, more mangeable tests. There's > more to be done before I can add that check. I may have another go at > this later. > > https://gitlab.com/nbdkit/libnbd/-/commit/3f57d7a37a7c5a1d8495f3bc1880e22da38d9f65
I fixed this and added the test: https://gitlab.com/nbdkit/libnbd/-/commit/6f5fec2ec3728e67475087fa055c8bd05b268b8e and that test revealed a bug in the new filter (in nbdkit): https://gitlab.com/nbdkit/nbdkit/-/commit/f5dfd30f380ef1185f6fcca4e6345e0434fb8039 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs