This allows NFS quotas to query ZFS quotas. Note that it only works with querying (quota administration still needs to be done via the normal methods on the servers). It also generalizes some of the quota support in the commands and libraries, so it's not checking only for ufs, so it should also work on any other filesystem that supports the VFS calls. Although obviously I've only tested it with ZFS.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Is it possible to provide a switch to disable the SETQUOTA RPC? (Assuming I'm understanding correctly that no additional authentication is done before it's permitted; rpc.rquotad runs at root privilege so when it issues vfs_quotactl it would not fail because insufficient privilege).
By the way I think there should be a CLI tool that invokes SETQUOTA (Linux have a package called quota-tools) for completeness.
include/rpcsvc/rquota.x | ||
---|---|---|
10 ↗ | (On Diff #44019) | Since this was moved to header and was already commented out, maybe just delete the whole ifndef lint block here? |
lib/libutil/quotafile.c | ||
136 ↗ | (On Diff #44019) | qf is leaked here? |
libexec/rpc.rquotad/rquotad.c | ||
305 ↗ | (On Diff #44019) | opoen: typo. Should be open. |
307 ↗ | (On Diff #44019) | Is the pointer value meaningful for a system administrator? |
Is it possible to provide a switch to disable the SETQUOTA RPC?
I'm not sure what you mean by a switch there?
include/rpcsvc/rquota.x | ||
---|---|---|
10 ↗ | (On Diff #44019) | I have no objection to that :). |
lib/libutil/quotafile.c | ||
136 ↗ | (On Diff #44019) | Fixed, will be in next version I upload in a bit |
libexec/rpc.rquotad/rquotad.c | ||
307 ↗ | (On Diff #44019) | It's for debug, so I consider it more meaningful for a developer. I print out the entire set of function arguments, so I included the pointer. That's about it. |
I don't have any code in there right now that handles the SETQUOTA RPC, so I'm still confused. Want to discuss it in email?
Oh right, it was me who was confused (somehow I thought you have implemented the RPC already, but it's only in the kernel for ZFS). LGTM now.
Hey Guys, it's possible that this could have caused a regression with quota on NFS. Please take a look at: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239552