Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nfs client and quota



On Wed, Jan 27, 2016 at 04:06:08PM +0100, 6bone%6bone.informatik.uni-leipzig.de@localhost wrote:
> On Mon, 25 Jan 2016, Manuel Bouyer wrote:
> 
> >Date: Mon, 25 Jan 2016 15:28:49 +0100
> >From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
> >To: 6bone%6bone.informatik.uni-leipzig.de@localhost
> >Cc: current-users%netbsd.org@localhost
> >Subject: Re: nfs client and quota
> >
> >On Mon, Jan 25, 2016 at 02:57:08PM +0100, 6bone%6bone.informatik.uni-leipzig.de@localhost wrote:
> >>Where can I find the file getnfsquota.c?
> >>
> >>"find /usr/src/ -name getnfsquota.c -type f" reports no result.
> >
> >I probably looked at old sources, in netbsd-7 it's function
> >__quota_nfs_get in lib/libquota/quota_nfs.c
> >
> >
> 
> at file lib/libquota/quota_nfs.c:180
> 
> ret = callaurpc(host, RQUOTAPROG, EXT_RQUOTAVERS, RQUOTAPROC_GETQUOTA,
> (xdrproc_t)xdr_ext_getquota_args, &ext_gq_args,
> (xdrproc_t)xdr_getquota_rslt, &gq_rslt);
> 
> returns (RPC_PROGNOTREGISTERED=15)

OK, it returns RPC_PROGNOTREGISTERED instead of RPC_PROGVERSMISMATCH.
Can you try the attached patch ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: quota_nfs.c
===================================================================
RCS file: /cvsroot/src/lib/libquota/quota_nfs.c,v
retrieving revision 1.4
diff -u -p -u -r1.4 quota_nfs.c
--- quota_nfs.c	11 Jun 2014 08:43:01 -0000	1.4
+++ quota_nfs.c	27 Jan 2016 19:01:24 -0000
@@ -179,7 +179,8 @@ __quota_nfs_get(struct quotahandle *qh, 
 	ret = callaurpc(host, RQUOTAPROG, EXT_RQUOTAVERS,
 	    RQUOTAPROC_GETQUOTA, (xdrproc_t)xdr_ext_getquota_args,
 	    &ext_gq_args, (xdrproc_t)xdr_getquota_rslt, &gq_rslt);
-	if (ret == RPC_PROGVERSMISMATCH && rpcqtype == RQUOTA_USRQUOTA) {
+	if ((ret == RPC_PROGVERSMISMATCH || ret == RPC_PROGNOTREGISTERED)
+	    && rpcqtype == RQUOTA_USRQUOTA) {
 		/* try RQUOTAVERS */
 		gq_args.gqa_pathp = path;
 		gq_args.gqa_uid = qk->qk_id;


Home | Main Index | Thread Index | Old Index