From owner-svn-src-stable@freebsd.org Tue Dec 4 12:16:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B04130A53B; Tue, 4 Dec 2018 12:16:27 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "goliath.siemens.de", Issuer "Siemens Issuing CA Internet Server 2017" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB6F4762FF; Tue, 4 Dec 2018 12:16:22 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id wB4CDHaw012243 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Dec 2018 13:13:17 +0100 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id wB4CDG0J030338; Tue, 4 Dec 2018 13:13:16 +0100 Received: (from user@localhost) by curry.mchp.siemens.de (8.15.2/8.15.2) id wB4CDHOM033482; Date: Tue, 4 Dec 2018 13:13:16 +0100 From: Andre Albsmeier To: Sean Eric Fagan 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> References: <201809290044.w8T0iNfu004260@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201809290044.w8T0iNfu004260@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Rspamd-Queue-Id: AB6F4762FF X-Spamd-Result: default: False [-3.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+exists:192.35.17.28.spf.siemens.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[siemens.com]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.99)[-0.993,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-0.00)[country: DE(-0.01)]; MX_GOOD(-0.01)[gordi.siemens.com,hephaistos.siemens.com,meleagros.siemens.com,hylas.siemens.com,zetes.siemens.com,paxos.siemens.com,balduin.siemens.com]; NEURAL_HAM_SHORT(-0.78)[-0.778,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15465, ipnet:192.35.16.0/22, country:DE]; RCVD_IN_DNSWL_HI(-0.50)[28.17.35.192.list.dnswl.org : 127.0.13.3] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2018 12:16:27 -0000 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