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

Re: [Xen-devel] [PATCH] blkif.h: enhance comments related to the discard feature



>>> On 24.01.14 at 15:30, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> On Thu, Jan 23, 2014 at 08:19:40AM +0000, Jan Beulich wrote:
>> >>> On 22.01.14 at 22:14, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 
>> >>> wrote:
>> > On Fri, Jan 17, 2014 at 03:09:13PM +0000, Jan Beulich wrote:
>> >> >>> On 14.01.14 at 22:57, Olaf Hering <olaf@xxxxxxxxx> wrote:
>> >> > @@ -323,9 +324,14 @@
>> >> >   *     For full interoperability, block front and backends should 
>> >> > publish
>> >> >   *     identical ring parameters, adjusted for unit differences, to the
>> >> >   *     XenStore nodes used in both schemes.
>> >> > - * (4) Devices that support discard functionality may internally 
>> >> > allocate
>> >> > - *     space (discardable extents) in units that are larger than the
>> >> > - *     exported logical block size.
>> >> > + * (4) Devices that support discard functionality may internally 
>> >> > allocate 
> 
>> >> > space
>> >> > + *     (discardable extents) in units that are larger than the 
>> >> > exported 
>> >> > logical
>> >> > + *     block size. If the backing device has such discardable extents 
>> >> > the
>> >> > + *     backend must provide both discard-granularity and 
>> >> > discard-alignment.
>> >                     ^^^^ - MAY
>> 
>> I think the intention is to say that these two should go together,
>> i.e. specifying just one of them is a mistake.
> 
> The 'and' in that sentence covers that I think?

Not with my reading of it - when using "must", it's clear that both
need to be present. When using "may", one can read it that
providing just one is fine too. But I agree that the wording with
"must" isn't fully correct either. I'd go for "should", and extend the
sentence by "; providing just one of the two may be considered an
error by the frontend".

Jan

> My reading with 'must' is that 'features-discard' MUST have both
> discard-granularity and discard-alignment. But that is not the case
> - even if the device does support them - it does not have to
> expose them.
> 
>> 
>> Jan
>> 
>> >> > + *     Backends supporting discard should include discard-granularity 
>> >> > and
>> >                                         ^^^^^ - MAY
>> >> > + *     discard-alignment even if it supports discarding individual 
> sectors.
>> >> > + *     Frontends should assume discard-alignment == 0 and 
> discard-granularity 
>> >> > ==
>> >> > + *     sector size if these keys are missing.
>> >> >   * (5) The discard-alignment parameter allows a physical device to be
>> >> >   *     partitioned into virtual devices that do not necessarily begin 
>> >> > or
>> >> >   *     end on a discardable extent boundary.
>> 
>> 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.