[Libguestfs] [libnbd PATCH] RFC: api: Add set_request_block_size

Richard W.M. Jones rjones at redhat.com
Sun Feb 20 19:14:06 UTC 2022


On Thu, Feb 17, 2022 at 05:04:13PM -0600, Eric Blake wrote:
> WIP: I need to finish writing the actual interop-qemu-block-size.sh to
> demonstrate scenarios where qemu-nbd advertises a block size > 1 to
> clients that request it, but sticks to 1 otherwise (see
> https://gitlab.com/qemu-project/qemu/-/blob/master/nbd/server.c#L660).
> 
> Our testsuite coverage of nbd_get_block_size() is pretty sparse (a
> single line in tests/errors.c, which was skipping until patches to
> nbdkit finally made it possible to utilize).  But in the process of
> adding an interop test with qemu-nbd, I also noticed that qemu-nbd (at
> least version 6.2) exposes different block sizes to older clients that
> don't request block size than it does to newer clients which promise
> to obey block sizes.  We still want to request by default, but now we
> need a knob, similar to the existing set_full_info(), for overriding
> that default for testing purposes.

The idea seems sensible.

> @@ -20,6 +20,7 @@ include $(top_srcdir)/subdir-rules.mk
>  EXTRA_DIST = \
>  	dirty-bitmap.sh \
>  	interop-qemu-storage-daemon.sh \
> +  interop-qemu-block-size.sh \
>  	list-exports-nbd-config \
>  	list-exports-test-dir/disk1 \
>  	list-exports-test-dir/disk2 \
> @@ -141,6 +142,7 @@ TESTS += \
>  	socket-activation-qemu-nbd \
>  	dirty-bitmap.sh \
>  	structured-read.sh \
> +  interop-qemu-block-size.sh \
>  	$(NULL)

Is there an issue with the whitespace on these lines?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list