tech-kern archive

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

Re: radix tree implementation for quota ?

On Sun, Nov 28, 2010 at 06:08:48PM +0100, Ignatios Souvatzis wrote:
> hi,
> On Sun, Nov 28, 2010 at 05:53:59PM +0100, Manuel Bouyer wrote:
> > Hello,
> > our FFS quota system is pretty outdated and is less and less suitable
> > for modern storage (quotacheck is long and can't be avoided). I'm thinking
> > about coding a new quota system with would be more closely integrated
> > with the filesystem, where quotas would be integrated with filesystem
> > metadata (maybe as part of a hidden indode, the same way WAPBL has a
> > inode for in-filesystem log). With this, quotas can be checked by 
> > fsck_ffs(8)
> > at almost 0 cost in time, and it can be covered by WAPBL, completely
> > eliminating the need for quotacheck(8) on reboot.
> uhm, but our current quota implementation - at least as described by
> the 4.3BSD paper - does that, only that the inode isn't hidden...

And it's not necesserely part of the filesystem itself. The quota file
can live anywere (including on a NFS or TMPFS fileystem if you want),
which implies quotacheck has to be run after all filesystems have been
mounted read/write.
My goal is to integrate quotacheck in fsck_ffs, and I don't think this can
be done sanely if the quota informations can be stored in a different
place than the filesystem being checked.

> > One open question is how to store quota informations on disk.
> > At this time we use one big array indexed by uid or gid. This can
> > be very space-consuming
> Why? It's a sparse file unless you copy it using cp.

it's not a sparce file if you have e.g. a 16k/2k filesystem, and one allocated
uid every 512 (you use 32 bytes per filesystem block).

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index