On 9 Apr 2016, at 22:12, Eric Blake <ebl...@redhat.com> wrote: >> Disconnection >> ============= >> >> Client side >> ----------- >> >> Where the client wishes to disconnect safely, it MUST follow the following >> procedure: >> >> * First it must wait until there are no inflight commands, i.e. every >> request that it has sent has been replied to. From this point onwards >> it MUST NOT send further commands. >> >> * Second, if the flag NBD_FLAG_SEND_FLUSH is set, it must sent a >> NBD_CMD_FLUSH command, and wait for the reply. >> >> * At this point it closes the TCP session. > > And I think qemu already complies with this.
(apologies for the 2 messages) I'm suggesting we don't send NBD_CMD_DISC at all. Qemu certainly tries to send NBD_CMD_DISC. It just doesn't always get there (over TLS) - possibly because of lack of a gnutls_bye(). I'm suggesting we simply document as safe disconnections without NBD_CMD_DISC provided the above procedure has been gone through. And to use NBD_CMD_DISC you should go through the procedure too. That makes NBD_CMD_DISC a bit pointless, as you can equally well just disconnect. -- Alex Bligh
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________ Nbd-general mailing list Nbd-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nbd-general