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

Re: [Nbd] [PATCHv6] Remove NBD_OPT_BLOCK_SIZE; add specific requests to NBD_OPT_INFO



On 04/28/2016 10:54 AM, Wouter Verhelst 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?

This one is correct - if the client requests NBD_INFO_BLOCK_SIZE, then
the server MUST NOT fail with NBD_REP_ERR_BLOCK_SIZE_REQD, regardless of
whether it was NBD_OPT_INFO or NBD_OPT_GO.  Thus,
NBD_REP_ERR_BLOCK_SIZE_REQD can only be returned by servers in cases
where the client used NBD_OPT_INFO or NBD_OPT_GO, but did not request
NBD_INFO_BLOCK_SIZE.

I also think we may want to add wording that when this particular error
is returned, the server MUST first send an NBD_INFO_BLOCK_SIZE
advertisement before the error, so that the client can have the block
size information available without needing another round trip, in order
for the client to make its decision on whether to include
NBD_INFO_BLOCK_SIZE in its next request for NBD_OPT_GO or to give up now.

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

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: