[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] docs: Clarify that some options should be send-once



Some options, like NBD_OPT_STARTTLS or the experimental
NBD_OPT_STRUCTURED_REPLY, only need to be sent once, so
clients should not expect any particular server behavior
if they mistakenly send the option again.  Document this
once up-front, rather than repeating it for every option
that falls in this category.

Signed-off-by: Eric Blake <eblake@redhat.com>
---

Per https://lists.debian.org/nbd/2017/nbd-201710/msg00024.html

 doc/proto.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/proto.md b/doc/proto.md
index 8545478..2aed1e1 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -197,6 +197,11 @@ reply to any option it has sent (note that some options e.g.
 `NBD_OPT_LIST` have multiple replies, and the final reply is
 the last of those).

+Some messages the client sends instruct the server to change some of
+its internal state.  The client SHOULD NOT send such messages more
+than once; if it does, the server MAY fail the repeated message with
+`NBD_REP_ERR_INVALID`.
+
 #### Termination of the session during option haggling

 There are three possible mechanisms to end option haggling:
-- 
2.13.6


Reply to: