tech-kern archive

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

Re: radix tree implementation for quota ?

On Mon, Nov 29, 2010 at 02:34:08AM +0700, Robert Elz wrote:
> [...]
>   | how does it work with a NFS server ?
> NFS didn't exist at the time ... but as I understand it, the server
> implements its own limits, not the client, which is as it should be.

my question was related to "when the last ref to some user's file is made",
not where the policy should be implemented (I agree it should be on the
server side).

>   | If this is integrated in the journal (which I want to do), they will
>   | become much more frequent.
> Yes, plus if you're doing this, you really need to maintain usage all
> the time, on all filesytems, not only when quotas are enabled.

It could be a filesystem option, set or not at newfs time and changeable
by tunefs. This could require a fsck after changing it, but that's not
really an issue.

> There's no need to check usages when not enabled (obviously) but
> usages would need to be counted (on any filesystem where quotas might be
> enabled, which could be set at newfs time).

I think there are really 2 different strategies for this, with different
a) the limits are keep with usage in the filesystem metadata.
  On persistent-storage filesystems, this means limits are enforced as
  soon as the filesystem is mounted read/write.
  On ephemeral filesystems, this mean we need a way to reload the
  limits from a persistent storage at mount time, or later.
b) the limits are keep in arbitrary place. This means that limits cannot
   be enforced as soon as the filesystem is mounted read/write, but
   at a later time, after all filesystems have been mounted when the
   equivalent of 'quotaon' is run. For ephemeral filesystems it's not
   much different from solution a).

I think I prefer solution a) 

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

Home | Main Index | Thread Index | Old Index