Re: [Qemu-devel] [PATCH 16/18] nbd: Support NBD_CMD_CLOSE

2016-04-09 Thread Alex Bligh
On 10 Apr 2016, at 00:12, Eric Blake wrote: > Qemu clients _already_ do the safe actions of waiting for all inflight > requests to complete, then sending one final NBD_CMD_FLUSH, before > attempting to send NBD_CMD_DISC. If I knew how to make qemu guarantee > that the NBD_CMD_DISC hits the wire

Re: [Qemu-devel] [PATCH 16/18] nbd: Support NBD_CMD_CLOSE

2016-04-09 Thread Eric Blake
On 04/09/2016 04:50 AM, Alex Bligh wrote: > > On 8 Apr 2016, at 23:05, Eric Blake wrote: > >> NBD_CMD_DISC is annoying: the server is not required to reply, >> so the client has no choice but to disconnect once it has sent >> the message; but depending on timing, the server can see the >> discon

Re: [Qemu-devel] [PATCH 16/18] nbd: Support NBD_CMD_CLOSE

2016-04-09 Thread Alex Bligh
On 8 Apr 2016, at 23:05, Eric Blake wrote: > NBD_CMD_DISC is annoying: the server is not required to reply, > so the client has no choice but to disconnect once it has sent > the message; but depending on timing, the server can see the > disconnect prior to reading the request, and treat things

[Qemu-devel] [PATCH 16/18] nbd: Support NBD_CMD_CLOSE

2016-04-08 Thread Eric Blake
NBD_CMD_DISC is annoying: the server is not required to reply, so the client has no choice but to disconnect once it has sent the message; but depending on timing, the server can see the disconnect prior to reading the request, and treat things as an abrupt exit rather than a clean shutdown (which