On Thu, Jul 12, 2012 at 07:14:07PM +0000, David Holland wrote: > > > > How do I enable new quota on a tmpfs? > > > > > > You don't; tmpfs doesn't support quotas. It could nowadays, but > > > someone has to do the coding :( > > > > How is the new NetBSD 6 quota system implemented ? I thought it was > > in the VFS layer but apparently it's still filesystem-specific. > > It has to be, because the quota state has to, you know, be stored > somewhere.
...and to actually answer the question, the fs-independent quota system is a data model, a client interface, and transport/request routing code under the covers. Plus the userlevel tools, which use the client interface. The fs-dependent quota system takes care of storing the quota information, storing/maintaining the usage information, enforcement based on the usage information, and also recovering/restoring consistency of the usage information after crashing. It is possible that some of the enforcement logic could be made fs-independent, but it's probably difficult without knowing how the filesystem allocates resources. E.g. if you write() to fill in holes in a file, outside the filesystem it's very difficult to know that you're increasing your block usage, or for that matter by how much when indirect blocks are (might be) involved. -- David A. Holland [email protected]
