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

Re: [Nbd] [PATCH v4 2/2] doc: Add details on block sizes



On Fri, Apr 15, 2016 at 11:39:12AM +0100, Alex Bligh wrote:
> 
> On 15 Apr 2016, at 08:09, Wouter Verhelst <w@...112...> wrote:
> 
> >> If a server advertises a minimum
> >> +block size, the advertised export size MUST be an integer multiple of
> >> +that block size.
> > 
> > I think this can be a SHOULD without problem?
> 
> Actually I think this should be a MUST. If the server is imposing
> restrictions, they should be consistent.

Which is why I said SHOULD, not MAY.

> The client actually can't access the export beyond the integer multiple
> without violating the spec, so in my mind it's up to the server to round the
> size down.

Sure. My point is that the client would have to have a <= test anyway,
in which case it doesn't matter if the size isn't a nice integer
multiple. It's not proper, and we should discourage people from doing it
wrong (which is what SHOULD does), but it doesn't cause many problems if
you did it wrong anyway.

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12



Reply to: