Module Name: src
Committed By: snj
Date: Sat Feb 6 21:02:44 UTC 2016
Modified Files:
src/lib/libquota [netbsd-7-0]: quota_nfs.c
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1098):
lib/libquota/quota_nfs.c: revision 1.5
Some NFS servers return RPC_PROGNOTREGISTERED instead of RPC_PROGVERSMISMATCH
when they don't support EXT_RQUOTAVERS but support RQUOTAVERS, so
retry with RQUOTAVERS for both RPC_PROGNOTREGISTERED and RPC_PROGVERSMISMATCH
return code.
Fix issue against a NetApp server reported by 6bone on current-users
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 src/lib/libquota/quota_nfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libquota/quota_nfs.c
diff -u src/lib/libquota/quota_nfs.c:1.4 src/lib/libquota/quota_nfs.c:1.4.4.1
--- src/lib/libquota/quota_nfs.c:1.4 Wed Jun 11 08:43:01 2014
+++ src/lib/libquota/quota_nfs.c Sat Feb 6 21:02:43 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: quota_nfs.c,v 1.4 2014/06/11 08:43:01 martin Exp $ */
+/* $NetBSD: quota_nfs.c,v 1.4.4.1 2016/02/06 21:02:43 snj Exp $ */
/*-
* Copyright (c) 2011 Manuel Bouyer
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_nfs.c,v 1.4 2014/06/11 08:43:01 martin Exp $");
+__RCSID("$NetBSD: quota_nfs.c,v 1.4.4.1 2016/02/06 21:02:43 snj Exp $");
#include <sys/types.h>
#include <sys/param.h> /* XXX for DEV_BSIZE */
@@ -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;