> > What about using a hash table instead?
>
> The problem with a hash table is that it's very much dependant on the
> size of the table as to where a particular record gets placed in the
> file, and also works best with a fairly large proportion of unused
> entries.
Yes. But usage ~50% isn't so bad... I'll write hash table and benchmark it
at least :-).
> I'd prefer to see a sorted file used for quotas, with the uid or gid
> stored as part of the record structure in the file. If the records are
> maintained in sorted order by uid or gid, then a binary search on the
> file will quickly find any record therein, or confirm that a record
> isn't present.
<snip>
> OK, it'll be slower than reserving an entry for every possible uid or
> gid and thus being able to go straight to the relevant record, but on
> the other hand, it can take up considerably less disc space since only
> the records for uid's or gid's with access to that partition need be
> stored in its quota file. It's not even much of a slowdown either.
It won't be much slower that current implementation as it climbs tree. But
this is hidden in ext2 implementation :-). I see the main problem in inserts
and deletes. I agree they are not very often but spending 2 seconds on one
insert seems too much to me :-). I'm searching the net for some interresting
structures :-).
Honza.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/