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

Re: [PATCH 1/2] doc: Explicit mention that 0-length transactions are unspecified



On Mon, Nov 06, 2017 at 11:07:57AM -0600, Eric Blake wrote:
> On 11/06/2017 10:52 AM, Eric Blake wrote:
> > We don't want to forbid 0-length transactions between a client
> > and server that have some special semantics for it, but we also
> > don't want to define any particular semantics.  Best is to just
> > document that portable clients should not attempt it, and that
> > servers should tolerate clients that do it anyway (whether by a
> > successful no-op or by an error code, we don't care, as long as
> > the connection to the client is not killed).
> > 
> > While in the area, mention that a trim request may only cause a
> > trim action on a subset of the request.
> 
> I can split this into two patches on commit, if you think I crammed too
> much into one patch; it's just that both changes touch the same
> paragraph, so I took the lazy way out on the initial post.

No, don't worry about that.

LGTM, thanks.

> > @@ -1293,9 +1299,14 @@ The following request types exist:
> > 
> >  * `NBD_CMD_TRIM` (4)
> > 
> > -    A hint to the server that the data defined by len and offset is no
> > -    longer needed. A server MAY discard len bytes starting at offset, but
> > -    is not required to.
> > +    A hint to the server that the data defined by length and offset is
> > +    no longer needed. A server MAY discard *length* bytes starting at
> > +    offset, but is not required to; and MAY round *offset* up and
> > +    *length* down to meet internal alignment constraints so that only
> > +    a portion of the client's request is actually discarded. The
> > +    client SHOULD NOT request a trim length of 0; the behavior of a
> > +    server on such a request is unspecified although the server SHOULD
> > +    NOT disconnect.
> > 
> 
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
> 




-- 
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
     Hacklab


Reply to: