-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetBSD using compatibility layer for quota #1225
Comments
This is NetBSD 9.3. It's best to test on NetBSD 10 as well. |
No change in NetBSD 10.0
|
It looks like meson fails to detect libquota on NetBSD, and then ends up with some deprecated 4.4BSD API... |
On netbsd-10, the meson script gives me
and then
but
|
Where does the check for "getfsquota()" come from? I can't find that function in any NetBSD younger than 10 yrs. Maybe this will help? |
This one makes it look better:
|
Breaks the build, because other parts (etc/afpd/nfsquota.c) are still using the old, deprecated quota interface. Looks like moving to libquota needs a lot more work. |
So this means NetBSD has gone in a radically different direction than the other BSDs (and Solaris-likes) with their SunRPC style quota implementation? |
There is a longish tech-kern thread on redesigning the NetBSD quota support from 2011 ( libquota proposal ), coincidentally initiated by Netatalk build problems. It looks like FreeBSD implements the same API, but in libutil. The old interface is still available, if the kernel option QUOTA is present. |
I struggle to understand the function of nfsquota.c -- is that supposed to deal with shares that reside on a nfs volume? The question is whether that functionality can be implemented in terms of libquota calls, or whether you actually need to go lowlevel here. |
getnfsquota() is the only function exported from nfsquota.c. It is only called from a section in quota.c that will be '#ifdef HAVE_LIBQUOTA'ed out. IOW, for libquota support nfsquota.c shouldn't be compiled, however you do that in meson. |
In Meson, you exclude a file from compilation by modifying the list of source file that you pass to the executable or library target. It could look like this in etc/afpd/meson.build for instance
Here's a hack that demonstrates how it can be done: #1768 I wonder, does NetBSD (and FreeBSD) linquota have their own native equivalent to getnfsquota()? |
Thanks, I'll play around with that. To my understanding, the point of libquota is a filesystem independent API, to avoid rummaging around in low-level data structures. So yes, I would expect that it accesses nfs quota, too. |
Reopening since the fix caused a severe regression #1900 |
We have a user report now that there's a deadlock for them when connecting with System 7 clients with the latest code running on NetBSD. Disabling quota altogether made it work again. For the time being, I'm leaning towards disabling quota by default when building on NetBSD. (Until we find a permanent solution.) |
On Fri, 28 Feb 2025 13:27:33 -0800, Daniel Markstedt wrote:
We have a user report now that there's a deadlock for them when
connecting with System 7 clients with the latest code running on
NetBSD. Disabling quota altogether made it work again. For the time
being, I'm leaning towards disabling quota by default when building
on NetBSD. (Until we find a permanent solution.)
Hi Daniel,
that makes sense, yes - and I might do the same for the pkgsrc package.
I do have file quotas set on the workplace server, though, so I'll have
to dig into this some time.
Cheerio,
Hauke
…--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-21344
|
In the latest main branch code:
The text was updated successfully, but these errors were encountered: