]> git.proxmox.com Git - mirror_qemu.git/commit
nbd: Let server know when client gives up negotiation
authorEric Blake <eblake@redhat.com>
Fri, 14 Oct 2016 18:33:11 +0000 (13:33 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 08:28:55 +0000 (09:28 +0100)
commit2cdbf41362cbc9b977dd458b6508352e45f2cb42
tree2f42bfa227c6e05f5e0e106ea96f9ac4af48add3
parentc8a3a1b6c4034cf53cdbd953331c72f9573edb77
nbd: Let server know when client gives up negotiation

The NBD spec says that a client should send NBD_OPT_ABORT
rather than just dropping the connection, if the client doesn't
like something the server sent during option negotiation.  This
is a best-effort attempt only, and can only be done in places
where we know the server is still in sync with what we've sent,
whether or not we've read everything the server has sent.
Technically, the server then has to reply with NBD_REP_ACK, but
it's not worth complicating the client to wait around for that
reply.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-10-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/client.c