tech-userlevel archive

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

Re: fs-independent quotas



On Wed, 19 Oct 2011, David Holland wrote:
  - the quota key is:
       the quota *class*
       the id
       the quota *type*

  - the quota value is:
       the configured hard limit
       the configured soft limit
       the configured grace period
       the current usage
       the current grace expiry time (if any)

This seems sensible.

1. A file system type can have or not have support for quotas. If
there is no support for quotas, nothing else works.

2. Any given filesystem volume may have or not have quota data on it.
This is the filesystem code's problem and irrelevant to the
FS-independent logic.

3. Any given filesystem volume may be mounted with or without quotas
enabled. If quotas are not enabled, quota information is not available
and the quota utilities will not be able to do anything.

4. Once mounted, quotas can be either on or off. As far as the
FS-independent code is concerned, quotas being off means only that
they aren't enforced; that is, with quotas off operations that
increase usage do not fail with EDQUOT. When quotas are off, quota
information can still be inspected or updated.

I don't like the names "on" and "off" at level 4.  They are too vague,
and too easily confused with "enabled" or "not enabled" at level 3.

I'd suggest these names:

1. "supported" or "not supported" by the file system format
2. "present" or "not present" in the file system backing store
3. "enabled" or "not enabled" in the mounted file system
4. "enforced" or "not enforced" for the system/user/group/file system/???

I think you might want a fs-independent API to ask the file system whether or not quotas are supported or present. I suppose getschemaname answers the "present?" question, but I don't see anything that would help a user interface choose whether to display a message saying "quotas not supported, tough luck" or "quotas not enabled, would you like to enable quotas now?"

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index