Source-Changes-HG archive

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

[src/netbsd-7]: src/lib/libquota Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/ff4b88c03554
branches:  netbsd-7
changeset: 799781:ff4b88c03554
user:      snj <snj%NetBSD.org@localhost>
date:      Sat Feb 06 21:01:39 2016 +0000

description:
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

diffstat:

 lib/libquota/quota_nfs.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 49c79e028da9 -r ff4b88c03554 lib/libquota/quota_nfs.c
--- a/lib/libquota/quota_nfs.c  Sat Feb 06 20:58:13 2016 +0000
+++ b/lib/libquota/quota_nfs.c  Sat Feb 06 21:01:39 2016 +0000
@@ -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.2.1 2016/02/06 21:01:39 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.2.1 2016/02/06 21:01:39 snj Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h> /* XXX for DEV_BSIZE */
@@ -179,7 +179,8 @@
        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