Merge branch 'master' into extension-info
authorAlex Bligh <alex@alex.org.uk>
Sat, 17 Dec 2016 12:04:17 +0000 (12:04 +0000)
committerAlex Bligh <alex@alex.org.uk>
Sat, 17 Dec 2016 12:04:17 +0000 (12:04 +0000)
Signed-off-by: Alex Bligh <alex@alex.org.uk>
1  2 
doc/proto.md

diff --cc doc/proto.md
@@@ -1000,8 -774,12 +1015,8 @@@ of the newstyle negotiation
  
  - `NBD_OPT_STRUCTURED_REPLY` (8)
  
-     Defined by the experimental `STRUCTURED_REPLY` [extension](https://github.com/yoe/nbd/blob/extension-structured-reply/doc/proto.md).
+     Defined by the experimental `STRUCTURED_REPLY` [extension](https://github.com/NetworkBlockDevice/nbd/blob/extension-structured-reply/doc/proto.md).
  
 -- `NBD_OPT_BLOCK_SIZE` (9)
 -
 -    Defined by the experimental `INFO` [extension](https://github.com/NetworkBlockDevice/nbd/blob/extension-info/doc/proto.md).
 -
  #### Option reply types
  
  These values are used in the "reply type" field, sent by the server
@@@ -1031,89 -808,7 +1046,93 @@@ during option haggling in the fixed new
  
  * `NBD_REP_INFO` (3)
  
++<<<<<<< HEAD
 +    A detailed description about an aspect of an export.  The response
 +    to `NBD_OPT_INFO` and `NBD_OPT_GO` includes zero or more of these
 +    messages prior to a final error reply, or at least one before an
 +    `NBD_REP_ACK` reply indicating success.  The server MUST send an
 +    `NBD_INFO_EXPORT` information type at some point before sending an
 +    `NBD_REP_ACK`, so that `NBD_OPT_GO` can provide a superset of the
 +    information given in response to `NBD_OPT_EXPORT_NAME`; all other
 +    information types are optional.  A particular information type
 +    SHOULD only appear once for a given export unless documented
 +    otherwise.
 +
 +    A client MUST NOT rely on any particular ordering amongst the
 +    `NBD_OPT_INFO` replies, and MUST ignore information types that it
 +    does not recognize.
 +
 +    The acceptable values for the header *length* field are determined
 +    by the information type, and includes the 2 bytes for the type
 +    designator, in the following general layout:
 +
 +    - 16 bits, information type (e.g. `NBD_INFO_EXPORT`)  
 +    - *length - 2* bytes, information payload  
 +
 +    The following information types are defined:
 +
 +    * `NBD_INFO_EXPORT` (0)
 +
 +      Mandatory information before a successful completion of
 +      `NBD_OPT_INFO` or `NBD_OPT_GO`.  Describes the same information
 +      that is sent in response to the older `NBD_OPT_EXPORT_NAME`,
 +      except that there are no trailing zeroes whether or not
 +      `NBD_FLAG_C_NO_ZEROES` was negotiated.  *length* MUST be 12, and
 +      the reply payload is interpreted as follows:
 +
 +      - 16 bits, `NBD_INFO_EXPORT`  
 +      - 64 bits, size of the export in bytes (unsigned)  
 +      - 16 bits, transmission flags  
 +
 +    * `NBD_INFO_NAME` (1)
 +
 +      Represents the server's canonical name of the export. The name
 +      MAY differ from the name presented in the client's option
 +      request, and the information item MAY be omitted if the client
 +      option request already used the canonical name.  This
 +      information type represents the same name that would appear in
 +      the name portion of an `NBD_REP_SERVER` in response to
 +      `NBD_OPT_LIST`. The *length* MUST be at least 2, and the reply
 +      payload is interpreted as:
 +
 +      - 16 bits, `NBD_INFO_NAME`  
 +      - String: name of the export, *length - 2* bytes  
 +
 +    * `NBD_INFO_DESCRIPTION` (2)
 +
 +      A description of the export, suitable for direct display to the
 +      human being.  This information type represents the same optional
 +      description that may appear after the name portion of an
 +      `NBD_REP_SERVER` in response to `NBD_OPT_LIST`. The *length*
 +      MUST be at least 2, and the reply payload is interpreted as:
 +
 +      - 16 bits, `NBD_INFO_DESCRIPTION`  
 +      - String: description of the export, *length - 2* bytes  
 +
 +    * `NBD_INFO_BLOCK_SIZE` (3)
 +
 +      Represents the server's advertised block size constraints; see the
 +      "Block size constraints" section for more details on what these
 +      values represent, and on constraints on their values.  The server
 +      MUST send this info if it is requested and it intends to enforce
 +      block size constraints other than the defaults. After
 +      sending this information in response to an `NBD_OPT_GO` in which
 +      the client specifically requested `NBD_INFO_BLOCK_SIZE`, the server
 +      can legitimately assume that any client that continues the session
 +      will support the block size constraints supplied (note that this
 +      assumption cannot be made solely on the basis of an `NBD_OPT_INFO`
 +      with an `NBD_INFO_BLOCK_SIZE` request, or an `NBD_OPT_GO` without
 +      an explicit `NBD_INFO_BLOCK_SIZE` request). The *length* MUST be 14,
 +      and the reply payload is interpreted as:
 +
 +      - 16 bits, `NBD_INFO_BLOCK_SIZE`  
 +      - 32 bits, minimum block size  
 +      - 32 bits, preferred block size  
 +      - 32 bits, maximum block size  
 +
++=======
+     Defined by the experimental `INFO` [extension](https://github.com/NetworkBlockDevice/nbd/blob/extension-info/doc/proto.md).
++>>>>>>> master
  
  There are a number of error reply types, all of which are denoted by
  having bit 31 set. All error replies MAY have some data set, in which
@@@ -1162,10 -854,7 +1181,10 @@@ case that data is an error message stri
  
  * `NBD_REP_ERR_BLOCK_SIZE_REQD` (2^32 + 8)
  
 -    Defined by the experimental `INFO` [extension](https://github.com/NetworkBlockDevice/nbd/blob/extension-info/doc/proto.md).
 +    The server is unwilling to enter transmission phase for a given
 +    export unless the client first acknowledges (via
-     `NBD_OPT_BLOCK_SIZE`) that it will obey non-default block sizing
++    `NBD_INFO_BLOCK_SIZE`) that it will obey non-default block sizing
 +    requirements.
  
  ### Transmission phase