On 3/30/20 2:59 PM, Eric Blake wrote:
nbdkit 1.2 as a server waits for read() to see EOF, even after the client has sent NBD_CMD_DISC. That was fixed in mbdkit 1.4; and most modern NBD servers are smarter than this (they close() the write end of their traffic soon after NBD_CMD_DISC). But it's easy enough to revert nbdkit commit c70616f8 to get back to a server with the same behavior as the older nbdkit, at which point both 'cd /path/to/libnbd && make check PATH=/path/to/nbdkit'
Making the obvious correction: cd /path/to/libnbd && make check PATH=/path/to/nbdkit:$PATH
and 'cd /path/to/nbdkit && /path/to/libnbd/run make check' will hang without this series.
In short, this series is restoring the shutdown(SHUT_WR) call that got lost from plugins/nbd/nbd.c when nbdkit switched to libnbd in commit ab7760fc.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org