Change ZFS quotas to return EINVAL when not present (matches man page).
UFS will return EINVAL when quotas are not enabled on a filesystem; ZFS' equivalent involves not having quotas (there is not way to enable or disable quotas as such). My initial implementation had it return ENOENT, but quotactl(2) indicates EINVAL is more appropriate. MFC after: 2 weeks Approved by: mav Reviewed by: markj Reported by: Emrion <kmachine@free.fr> Sponsored by: iXsystems Inc PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234413
This commit is contained in:
parent
48266154de
commit
82e20c0a72
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342928
@ -144,7 +144,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, struct dqblk64 *dqp)
|
||||
quotaobj = isgroup ? zfsvfs->z_groupquota_obj : zfsvfs->z_userquota_obj;
|
||||
|
||||
if (quotaobj == 0 || zfsvfs->z_replay) {
|
||||
error = ENOENT;
|
||||
error = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
(void)sprintf(buf, "%llx", (longlong_t)id);
|
||||
|
Loading…
Reference in New Issue
Block a user