NFSv4 quota support

From Linux NFS

Revision as of 21:03, 1 April 2021 by Bfields (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NFSv3 had the RQUOTA protocol. NFSv4 has three read-only attributes (see and following) that support quotas, but Linux has not implemented them.

The linux implementation of RQUOTA seems to live along with the local filesystem quota utilites at The same "quota" tool can make calls to either local filesystems or RQUOTA calls to the server. People can continue using RQUOTA with NFSv4, but one of the goals of the NFSv4 protocol was to move all functionality into the single NFS protocol (among other reasons, to simplify firewall traversal), so ideally we should make it possible to query quotas over NFSv4 as well.

I can't find any real documentation of the RQUOTA protocol, only the .x file:

Some local filesystems quotas seem to be managed using an actual on-disk file whose format is understood by both the kernel filesystem code and the userspace "quota" tool. That isn't an appropriate interface for the NFS filesystem. But filesystems are also able to hide the on-disk quota information and system calls to get and set quotas. Perhaps NFS could use some subset of that interface (see quotactl(2)), or perhaps it needs to define its own simpler calls.

The NFSv4 attributes take a filehandle, and are meant to report quotas associated with the given filehandle (exactly what "associated with" means is left unspecified). By contrast, RQUOTA and quotactl can take things like uids, gids, and project ids, and both get and set a wider variety of quotas (like number of files, for example).

Given that, I wonder whether the NFSv4 attributes are worth implementing, or (if we decide the feature is necessary), if we'd be better off defining additional operations closer to the ones in RQUOTA.

Personal tools