Re: [Nbd] [PATCHv6] Remove NBD_OPT_BLOCK_SIZE; add specific requests to NBD_OPT_INFO
- To: Wouter Verhelst <w@...112...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] [PATCHv6] Remove NBD_OPT_BLOCK_SIZE; add specific requests to NBD_OPT_INFO
- From: Alex Bligh <alex@...872...>
- Date: Thu, 28 Apr 2016 18:07:36 +0100
- Message-id: <C04BF6C3-094B-4E50-8C6F-7498BFFED2F0@...872...>
- In-reply-to: <20160428165409.GC3082@...3...>
- References: <1461833932-44607-1-git-send-email-alex@...872...> <20160428165409.GC3082@...3...>
On 28 Apr 2016, at 17:54, Wouter Verhelst <w@...112...> wrote:
>
> [...]
>> + request block size constraints using `NBD_INFO_BLOCK_SIZE` prior
>> + to entering transmission phase, because the server will be using
>> + non-default block sizes constraints. The server MUST NOT send this
>> + error if block size constraints were requested with
>> + `NBD_INFO_BLOCK_SIZE` with the `NBD_OPT_INFO` or `NBD_OPT_GO`
>
> only NBD_OPT_GO here?
No I think that one is right.
You can't send NBD_REP_ERR_BLOCK_SIZE_REQD in response to an NBD_OPT_INFO
if it's asked for NBD_INFO_BLOCK_SIZE.
If it has not asked for NBD_INFO_BLOCK_SIZE it is legitimate to error
the NBD_OPT_INFO with NBD_REP_ERR_BLOCK_SIZE_REQD so that the client knows
that if sends an NBD_OPT_GO with the same parameters it would get that
error, and hence it should either ask for block size constraints or
give up.
I'm going to apply v6 with your and Eric's changes (plus or minus
a couple of tiny grammar nits).
--
Alex Bligh
Reply to: