Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jan 2019 02:53:46 +0000 (UTC)
From:      Sean Eric Fagan <sef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342928 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201901110253.x0B2rkQD037376@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <kmachine@free.fr>
  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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901110253.x0B2rkQD037376>