Author: sef Date: Fri Jan 11 02:53:46 2019 New Revision: 342928 URL: https://svnweb.freebsd.org/changeset/base/342928
Log: 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 <[email protected]> Sponsored by: iXsystems Inc PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234413 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jan 11 02:09:48 2019 (r342927) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Jan 11 02:53:46 2019 (r342928) @@ -144,7 +144,7 @@ zfs_getquota(zfsvfs_t *zfsvfs, uid_t id, int isgroup, 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); _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
