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' 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 (2):
  sockets: Add .shut_writes callback
  states: Add state for shutdown/gnutls_bye after NBD_CMD_DISC

 lib/internal.h                   |  4 +++-
 generator/state_machine.ml       | 19 +++++++++++++++++--
 generator/states-issue-command.c | 20 ++++++++++++++++++--
 lib/crypto.c                     | 21 +++++++++++++++++----
 lib/socket.c                     | 12 +++++++++++-
 5 files changed, 66 insertions(+), 10 deletions(-)

-- 
2.26.0.rc2

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to