Source-Changes-HG archive

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

[src/trunk]: src/lib/libquota Some NFS servers return RPC_PROGNOTREGISTERED i...



details:   https://anonhg.NetBSD.org/src/rev/890a7949f33c
branches:  trunk
changeset: 343347:890a7949f33c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Jan 30 16:31:28 2016 +0000

description:
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 f69750a9a44e -r 890a7949f33c lib/libquota/quota_nfs.c
--- a/lib/libquota/quota_nfs.c  Sat Jan 30 16:21:47 2016 +0000
+++ b/lib/libquota/quota_nfs.c  Sat Jan 30 16:31:28 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.5 2016/01/30 16:31:28 bouyer 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.5 2016/01/30 16:31:28 bouyer 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