On 04/14/2016 03:12 PM, Alex Bligh wrote:

Sorry for reviving an old thread, but just a heads-up to implementors:

> Improve the documentation as per the mailing list discussion.
> Here's what we decided (broadly).
> 
> * One side MAY drop the connection if the other end violates a
>   MUST condition.
...
> ---

> +
> +On a server shutdown, the server SHOULD wait for inflight
> +requests to be serviced prior to initiating a hard disconnect.
> +A server MAY speed this process up by issuing error replies.
> +The error value issued in respect of these requests and
> +any subsequently received requests SHOULD be `ESHUTDOWN`.
> +
> +If the client receives an `ESHUTDOWN` error it MUST initiate
> +a soft disconnect.
> +

> @@ -960,6 +1057,7 @@ The following error values are defined:
>  * `ENOSPC` (28), No space left on device.
>  * `EOVERFLOW` (75), Value too large; SHOULD NOT be sent outside of the
>    experimental `STRUCTURED_REPLY` extension; see below.
> +* `ESHUTDOWN` (108), Server has been shut down.
>  

Note that ESHUTDOWN, although present on both Linux and BSD, is not
specified by POSIX, and is therefore not present on all platforms.  This
should not matter to the protocol itself (we've hard-coded that an error
value of 108 MEANS that the server is trying to shut down and will
reject all further transmission requests from the client, regardless of
whether either the server or the client actually has an ESHUTDOWN error,
and regardless of whether a platform's ESHUTDOWN has the value of 108).
But it CAN make for some interesting compilation scenarios if you are
trying to port code to more than one platform, such as mingw.

I don't think we have to change anything in the spec, so much as me
posting this email just as a heads-up in case anyone else hits the
problem (I just hit it in qemu while trying to add ESHUTDOWN support).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to