Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2018 13:13:16 +0100
From:      Andre Albsmeier <Andre.Albsmeier@siemens.com>
To:        Sean Eric Fagan <sef@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   Re: svn commit: r339008 - in stable/11: include/rpcsvc lib/libutil libexec/rpc.rquotad sys/cddl/contrib/opensolaris/uts/common/fs/zfs usr.bin/quota
Message-ID:  <20181204121316.GA6385@bali>
In-Reply-To: <201809290044.w8T0iNfu004260@repo.freebsd.org>
References:  <201809290044.w8T0iNfu004260@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 29-Sep-2018 at 00:44:23 +0000, Sean Eric Fagan wrote:
> Author: sef
> Date: Sat Sep 29 00:44:23 2018
> New Revision: 339008
> URL: https://svnweb.freebsd.org/changeset/base/339008
> 
> Log:
>   MFC r336017,r338799
>   
>   r336017
>   	This exposes ZFS user and group quotas via the normal
>   	quatactl(2) mechanism.  (Read-only at this point, however.)
>   	In particular, this is to allow rpc.rquotad query quotas
>   	for NFS mounts, allowing users to see their quotas on the
>   	hosts using the datasets.
>   
>   	The changes specifically:
>   
>   	* Add new RPC entry points for querying quotas.
>   	* Changes the library routines to allow non-UFS quotas.

This broke repquota on my UFS. I fixed it with:

--- lib/libutil/quotafile.c.ORI	2018-09-29 11:56:05.000000000 +0200
+++ lib/libutil/quotafile.c	2018-12-04 13:00:04.450826000 +0100
@@ -125,18 +125,18 @@
 	strlcpy(qf->fsname, fs->fs_file, sizeof(qf->fsname));
 	if (stat(qf->fsname, &st) != 0)
 		goto error;
 	qf->dev = st.st_dev;
 	qcmd = QCMD(Q_GETQUOTASIZE, quotatype);
+	serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname));
 	if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) == 0)
 		return (qf);
 	/* We only check the quota file for ufs */
 	if (strcmp(fs->fs_vfstype, "ufs")) {
 		errno = 0;
 		goto error;
 	}
-	serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname));
 	if (serrno == 0) {
 		errno = EOPNOTSUPP;
 		goto error;
 	}
 	qf->accmode = openflags & O_ACCMODE;


Apparently it wants qf->qfname to be filled in by hasquota(). No idea
if calling hasquota() hurts for non-UFS...

	-Andre



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