Subject: revisiting quotas
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 05/28/2000 12:47:23
Hi,
I'm not happy with the way quota works currently: even after a clean reboot
quotacheck is run, which can take some time on a big filesystem.
My first though was to add a flag similar to the FFS clean flag, which can
tell if the quota file contains accurate informations. I've done this by
adding some fields at the head of the quota file (a magic number, a revision
number and flags). This means the format changes, I hacked quotacheck to
convert and old quota file to a new one. The clean flag is set by quotacheck,
or by the kernel at quotaoff time (which is called at umount time). It's
cleared at quotaon time.
This sheme works fine most of the time, but the fact that mount and quota are
separate can lead to inconsistencies: we can mount the filesystem and
change it, whithout changing quotas. To have a coherent system I think this
(quotacheck/quotaon) should be integrated in the filesystem: quotacheck
can be integrated to fsck, and quotaon can happen at mount time (this can
be controlled with tunefs for example). The counterpart is that we can't
have the quota file in an arbitrary place, but I don't think it's a real
problem: the quota file can live in the filesystem itself, we just have to
agree on a name (quota.users and quota.groups ?).
Comments please ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
--