tech-userlevel archive

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

Re: fs-independent quotas



On 21 October 2011 15:48, Manuel Bouyer <bouyer%antioche.eu.org@localhost> 
wrote:
> On Fri, Oct 21, 2011 at 03:37:43PM +0200, Michal Suchanek wrote:

>> > Nor in the tree-based dictionnary, or in the multidimentionnal array.
>>
>> No, in an array the unused locations do exist.
>
> I don't understand this. If you have a 2-dimention array
> quota[id][type], and quota[class=group] doesn't exist for this filesytem,
> you have quota[class=group]=NULL and no memory associated with it.

Yes, you don't.

What you describe is a dictionary, not an array.

In a dictionary a branch may end prematurely.

An array does not have branches, it's a full n-dimensional cube
serialized into a linear memory. You access it by referencing
array_pointer + index-n * element_size + index-(n-1) * element_size *
size-n + index-(n-2) * element_size * size-n * size-(n-1) ...

Thanks

Michal


Home | Main Index | Thread Index | Old Index