After a few hours of learning C, I have created a patch for the quota-fs plugin that should provide complete support for filesystem-based quotas. The patch was made off of the latest CVS version, which includes support for XFS filesystems.
Currently, the quota-fs plugin only reports the storage quota for the user.
With this patch and the plugin enabled (quota = fs), the GETQUOTA command now reports both the storage (block) and message (inode) quotas.
Also, this patch examines both user and group disk quotas, and returns the quota information nearest to the limit. For example, if I had a user usage of 200 with 400 limit and a group usage of 100 with 200 limit, it would return the usage of 100 and limit of 200. This is because I only have 100 left before I reach my group limit, but I have 200 left before I reach my user limit. If, for storage, the user is closer than the group, and for messages, the group is closer than the user, the reported quota will be the user's for the storage and the group's for the messages.
The only catch is that as far as I know, Solaris does not natively support group-based quotas. Otherwise, this should work on Linux (xfs, ext2, & ext3), BSD, and AIX. I have only tested it on Linux with ext3 disk (it's all I have access to), but it should compile everywhere else.
Both the patch to the current CVS version, and the full quota-fs.c are attached. Please give it a try and see how you like it. Then, Timo, could you add it to the official code?
Thanks, Scott Alter