svn commit: r339008 - in stable/11: include/rpcsvc lib/libutil libexec/rpc.rquotad sys/cddl/contrib/opensolaris/uts/common/fs/zfs usr.bin/quota
Andre Albsmeier
Andre.Albsmeier at siemens.com
Tue Dec 4 12:16:27 UTC 2018
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
More information about the svn-src-stable-11
mailing list