As promised, draft patches for vfs-level quota cleanup are here: http://www.netbsd.org/~dholland/tmp/quota/
It is a 53-part patch series, or if you prefer: http://www.netbsd.org/~dholland/tmp/quota/concatenated http://www.netbsd.org/~dholland/tmp/quota/onediff contain the whole thing concatenated, or as a single start-to-end diff, respectively. The single diff isn't all that straightforward to follow, but it's less than half the size. The patches change the VFS-level quota interface to use C structures for data transfer (mostly the same struct quotakey/quotaval as used by the userland libquota API) instead of proplib. Anyone still wondering if this is a good idea should examine patch C-51, which updates the COMPAT_50 code for the historic quotactl() to call the new interface instead of the proplib interface. The new code is half the size of the old code, much clearer, and has many fewer error paths... much like everywhere else, but in this particular patch the effects are localized and easily observed. The interface is defined in <sys/quotactl.h> and is meant to be extended to also be the user-to-kernel interface; this will involve removing the interpreter code for quota proplib RPC packets (which is now all centralized in vfs_quotactl.c) and replacing it with simple conventional copyin code for struct quotactl_args. I don't have patches for this yet, and there's additional userland cleanup that needs to be done first. What you see here is itself hot off the presses. These patches are untested; or more accurately, they've been tested as far as discovering a lethal bug, probably bad proplib refcounting, in patch C-09. The patches after that might or might not work. They do compile though and unless some very major surprise appears in testing (unlikely) the code is in approximately its final form. So if in the course of reading the diffs you should happen to notice something screwed up, please let me know. In order to avoid holding up netbsd-6 I intend to commit this as soon as I can get patches C-09 through C-53 debugged, which will probably not be before next weekend and had better not be much after next weekend. If you object violently, please speak up ASAP. (On the other hand, if you're just going to rant about how I'm on an anti-proplib jihad, please spare us. That is hardly the case and you know it.) One final note: quota2_handle_cmd_cursorget() is now kind of a mess. I intend to tidy it up once I have it running in approximately its current form, but I don't want to launch into that until I *do* have it running, just in case that itself requires substantial editing. -- David A. Holland [email protected]
