Subject: RE: fsctl(2) [was: Re: Interface to change NFS exports]
To: None <tech-kern@netbsd.org>
From: Gordon Waidhofer <gww@traakan.com>
List: tech-kern
Date: 09/13/2005 20:17:36
> > Interfaces like statvfs() can report results more precisely
> > than file system globals. For example, f_bavail and f_favail can
> > be derived to reflect quotas -- it says how much is actually
> > available to the calling uid.
> 
> Oh dear, that turns into a rats nest rather quickly.  The trick is  
> dealing with group quotas.  What if your uid has no quota, but your  
> primary gid (or any of your secondary supplemental groups) has one?   
> What are the correct semantics?  I think the most common usage model  
> for quotas is to set a quota for a group (say "students") and ensure  
> that the containing directories that those users will write files in  
> always have the appropriate group ownership.

I just checked what we do. We only min() with the uid's quota limit.
The group quota is not checked. It's a good point.

I believe NetApp returns statfs results adjusted for quotas.
I don't know particulars. I also think I heard they have
directory-based quotas. Anybody know?

Regards,
	-gww