From owner-svn-src-projects@freebsd.org Tue Jul 17 12:13:40 2018 Return-Path: Delivered-To: svn-src-projects@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 0ADBA103D630 for ; Tue, 17 Jul 2018 12:13:40 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B55BF869ED; Tue, 17 Jul 2018 12:13:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96976331F; Tue, 17 Jul 2018 12:13:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HCDd9k006783; Tue, 17 Jul 2018 12:13:39 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HCDclN006777; Tue, 17 Jul 2018 12:13:38 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807171213.w6HCDclN006777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 17 Jul 2018 12:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r336413 - in projects/pnfs-planb-server/sys/fs: nfs nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 336413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 12:13:40 -0000 Author: rmacklem Date: Tue Jul 17 12:13:38 2018 New Revision: 336413 URL: https://svnweb.freebsd.org/changeset/base/336413 Log: Update the NFS server code with recent changes in head for handling the ESXi 6.7 client. There should be no effect on the pNFS server itself. Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Tue Jul 17 12:01:59 2018 (r336412) +++ projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Tue Jul 17 12:13:38 2018 (r336413) @@ -568,6 +568,7 @@ #define NFSV4OPEN_WDRESOURCE 0x00080000 #define NFSV4OPEN_WDCONTENTION 0x00100000 #define NFSV4OPEN_WDNOTWANTED 0x00200000 +#define NFSV4OPEN_WDSUPPFTYPE 0x00400000 /* * NFS V4 File Handle types Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Tue Jul 17 12:01:59 2018 (r336412) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Tue Jul 17 12:13:38 2018 (r336413) @@ -2101,6 +2101,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg } fullsiz = siz; nd->nd_repstat = getret = nfsvno_getattr(vp, &at, nd, p, 1, NULL); +#if 0 if (!nd->nd_repstat) { if (off && verf != at.na_filerev) { /* @@ -2109,17 +2110,14 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg * removed/added unless that offset cookies returned to * the client are no longer valid. */ -#if 0 if (nd->nd_flag & ND_NFSV4) { nd->nd_repstat = NFSERR_NOTSAME; } else { nd->nd_repstat = NFSERR_BAD_COOKIE; } -#endif - } else if ((nd->nd_flag & ND_NFSV4) && off == 0 && verf != 0) { - nd->nd_repstat = NFSERR_BAD_COOKIE; } } +#endif if (!nd->nd_repstat && vp->v_type != VDIR) nd->nd_repstat = NFSERR_NOTDIR; if (!nd->nd_repstat && cnt == 0) @@ -4466,8 +4464,8 @@ tryagain: NFSUNLOCKMNT(failnmp); ds = nfsrv_deldsnmp(PNFSDOP_DELDSSERVER, failnmp, p); - NFSD_DEBUG(4, "nfsrv_proxyds: deldsnmp fail=%d " - "ds=%p\n", failpos, ds); + NFSD_DEBUG(4, "dsldsnmp fail=%d ds=%p\n", + failpos, ds); if (ds != NULL) nfsrv_killrpcs(failnmp); NFSLOCKMNT(failnmp); Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jul 17 12:01:59 2018 (r336412) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c Tue Jul 17 12:13:38 2018 (r336413) @@ -3095,7 +3095,13 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is *tl = txdr_unsigned(NFSV4OPEN_DELEGATEWRITE); else if (retext != 0) { *tl = txdr_unsigned(NFSV4OPEN_DELEGATENONEEXT); - if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) { + if ((rflags & NFSV4OPEN_WDNOTWANTED) != 0) { + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTWANTED); + } else if ((rflags & NFSV4OPEN_WDSUPPFTYPE) != 0) { + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPFTYPE); + } else if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OPEN_CONTENTION); *tl = newnfs_false; @@ -4230,9 +4236,16 @@ nfsrvd_reclaimcomplete(struct nfsrv_descript *nd, __un goto nfsmout; } NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); - if (*tl == newnfs_true) - nd->nd_repstat = NFSERR_NOTSUPP; - else + /* + * I believe that a ReclaimComplete with rca_one_fs == TRUE is only + * to be used after a file system has been transferred to a different + * file server. However, RFC5661 is somewhat vague w.r.t. this and + * the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs + * == TRUE and one with ReclaimComplete with rca_one_fs == FALSE. + * Therefore, just ignore the rca_one_fs == TRUE operation and return + * NFS_OK without doing anything. + */ + if (*tl == newnfs_false) nd->nd_repstat = nfsrv_checkreclaimcomplete(nd); nfsmout: NFSEXITCODE2(error, nd); Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 17 12:01:59 2018 (r336412) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 17 12:13:38 2018 (r336413) @@ -3097,7 +3097,13 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if (delegate == 0 || writedeleg == 0 || + if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTWANTED; + else if (nfsrv_issuedelegs == 0) + *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; + else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) + *rflagsp |= NFSV4OPEN_WDRESOURCE; + else if (delegate == 0 || writedeleg == 0 || NFSVNO_EXRDONLY(exp) || (readonly != 0 && nfsrv_writedelegifpos == 0) || !NFSVNO_DELEGOK(vp) || @@ -3105,11 +3111,6 @@ tryagain: (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != LCL_CALLBACKSON) *rflagsp |= NFSV4OPEN_WDCONTENTION; - else if (nfsrv_issuedelegs == 0 || - NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; else { new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; new_deleg->ls_stateid.other[0] = delegstateidp->other[0] @@ -3160,16 +3161,17 @@ tryagain: /* * This is where we can choose to issue a delegation. */ - if (delegate == 0 || (writedeleg == 0 && readonly == 0) || - !NFSVNO_DELEGOK(vp) || + if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) + *rflagsp |= NFSV4OPEN_WDNOTWANTED; + else if (nfsrv_issuedelegs == 0) + *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; + else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) + *rflagsp |= NFSV4OPEN_WDRESOURCE; + else if (delegate == 0 || (writedeleg == 0 && + readonly == 0) || !NFSVNO_DELEGOK(vp) || (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != LCL_CALLBACKSON) *rflagsp |= NFSV4OPEN_WDCONTENTION; - else if (nfsrv_issuedelegs == 0 || - NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) - *rflagsp |= NFSV4OPEN_WDRESOURCE; - else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) - *rflagsp |= NFSV4OPEN_WDNOTWANTED; else { new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; new_deleg->ls_stateid.other[0] = delegstateidp->other[0] From owner-svn-src-projects@freebsd.org Tue Jul 17 19:46:59 2018 Return-Path: Delivered-To: svn-src-projects@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 6FEC4104C3AE for ; Tue, 17 Jul 2018 19:46:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18BA276AD4; Tue, 17 Jul 2018 19:46:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D40CE10009; Tue, 17 Jul 2018 19:46:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6HJkw3q043111; Tue, 17 Jul 2018 19:46:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6HJkqP0043081; Tue, 17 Jul 2018 19:46:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807171946.w6HJkqP0043081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 17 Jul 2018 19:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r336423 - in projects/krb5: . etc/mtree kerberos5/lib/libasn1 kerberos5/lib/libgssapi_krb5 kerberos5/lib/libhdb kerberos5/lib/libheimntlm kerberos5/lib/libhx509 kerberos5/lib/libkadm5cl... X-SVN-Group: projects X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in projects/krb5: . etc/mtree kerberos5/lib/libasn1 kerberos5/lib/libgssapi_krb5 kerberos5/lib/libhdb kerberos5/lib/libheimntlm kerberos5/lib/libhx509 kerberos5/lib/libkadm5clnt kerberos5/lib/libkadm5... X-SVN-Commit-Revision: 336423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 19:46:59 -0000 Author: cy Date: Tue Jul 17 19:46:52 2018 New Revision: 336423 URL: https://svnweb.freebsd.org/changeset/base/336423 Log: Though the FreeBSD com_err is not from the current Heimdal distribution, it is Kerberos and can conflict with security/krb5 and security/heimdal from ports. Making com_err in base private addresses any potential conflicts. Modified: projects/krb5/ObsoleteFiles.inc projects/krb5/etc/mtree/BSD.usr.dist projects/krb5/kerberos5/lib/libasn1/Makefile projects/krb5/kerberos5/lib/libgssapi_krb5/Makefile projects/krb5/kerberos5/lib/libhdb/Makefile projects/krb5/kerberos5/lib/libheimntlm/Makefile projects/krb5/kerberos5/lib/libhx509/Makefile projects/krb5/kerberos5/lib/libkadm5clnt/Makefile projects/krb5/kerberos5/lib/libkadm5srv/Makefile projects/krb5/kerberos5/lib/libkdc/Makefile projects/krb5/kerberos5/lib/libkrb5/Makefile projects/krb5/kerberos5/lib/libwind/Makefile projects/krb5/kerberos5/libexec/digest-service/Makefile projects/krb5/kerberos5/libexec/hprop/Makefile projects/krb5/kerberos5/libexec/hpropd/Makefile projects/krb5/kerberos5/libexec/kadmind/Makefile projects/krb5/kerberos5/libexec/kdc/Makefile projects/krb5/kerberos5/libexec/kimpersonate/Makefile projects/krb5/kerberos5/usr.bin/hxtool/Makefile projects/krb5/kerberos5/usr.bin/kadmin/Makefile projects/krb5/kerberos5/usr.bin/kf/Makefile projects/krb5/kerberos5/usr.bin/string2key/Makefile projects/krb5/kerberos5/usr.bin/verify_krb5_conf/Makefile projects/krb5/kerberos5/usr.sbin/kstash/Makefile projects/krb5/lib/libcom_err/Makefile projects/krb5/lib/libpam/modules/pam_krb5/Makefile projects/krb5/share/mk/src.libnames.mk Modified: projects/krb5/ObsoleteFiles.inc ============================================================================== --- projects/krb5/ObsoleteFiles.inc Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/ObsoleteFiles.inc Tue Jul 17 19:46:52 2018 (r336423) @@ -38,6 +38,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20180708: libcom_err is private +OLD_FILES+=usr/include/com_err.h +OLD_LIBS+=usr/lib/libcom_err.a +OLD_LIBS+=usr/lib/libcom_err.so +OLD_LIBS+=usr/lib/libcom_err.so.5 +OLD_LIBS+=usr/lib/libcom_err_p.a +OLD_LIBS+=/usr/lib32/libcom_err.a +OLD_LIBS+=/usr/lib32/libcom_err.so +OLD_LIBS+=/usr/lib32/libcom_err.so.5 # 20180630: new clang import which bumps version from 6.0.0 to 6.0.1. OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h Modified: projects/krb5/etc/mtree/BSD.usr.dist ============================================================================== --- projects/krb5/etc/mtree/BSD.usr.dist Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/etc/mtree/BSD.usr.dist Tue Jul 17 19:46:52 2018 (r336423) @@ -13,6 +13,8 @@ .. bsdstat .. + com_err + .. event .. hdb Modified: projects/krb5/kerberos5/lib/libasn1/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libasn1/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libasn1/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -23,7 +23,7 @@ SRCS= asn1_err.c \ ${GEN:S/.x$/.c/:S/.hx$/.h/} CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I${.OBJDIR:H}/libroken -I. + -I${.OBJDIR:H}/libroken -I${SRCTOP}/contrib/com_err -I. GEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx GEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx Modified: projects/krb5/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libgssapi_krb5/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libgssapi_krb5/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -87,6 +87,7 @@ CFLAGS+=-I${KRB5DIR}/lib/wind CFLAGS+=-I${.OBJDIR:H}/libwind CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${.OBJDIR:H}/libhx509 +CFLAGS+=-I${SRCTOP}/contrib/com_err CFLAGS+=-I${KRB5DIR}/base -I. .include Modified: projects/krb5/kerberos5/lib/libhdb/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libhdb/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libhdb/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -64,6 +64,7 @@ CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 -I$ -I${KRB5DIR}/lib/wind -I${.OBJDIR:H}/libwind \ -I${KRB5DIR}/lib/hx509 -I${.OBJDIR:H}/libhx509 \ -I${KRB5DIR}/base \ + -I${SRCTOP}/contrib/com_err \ -I. ${LDAPCFLAGS} CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\"" Modified: projects/krb5/kerberos5/lib/libheimntlm/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libheimntlm/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libheimntlm/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -9,7 +9,8 @@ INCS= heimntlm.h heimntlm-protos.h ntlm_err.h CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${.OBJDIR:H}/libheimntlm \ -I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken \ -I${KRB5DIR}/lib/krb5 -I${.OBJDIR:H}/libkrb5 \ - -I${KRB5DIR}/lib/asn1 -I${.OBJDIR:H}/libasn1 + -I${KRB5DIR}/lib/asn1 -I${.OBJDIR:H}/libasn1 \ + -I${SRCTOP}/contrib/com_err VERSION_MAP= ${KRB5DIR}/lib/ntlm/version-script.map MAN= ntlm_buf.3 \ Modified: projects/krb5/kerberos5/lib/libhx509/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libhx509/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libhx509/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -212,7 +212,8 @@ CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${KRB5DIR}/lib/hx509/ref CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${.OBJDIR:H}/libasn1 CFLAGS+=-I${KRB5DIR}/lib/wind -I${.OBJDIR:H}/libwind -CFLAGS+=-I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken +CFLAGS+=-I${SRCTOP}/contrib/com_err -I. GEN_OCSP= \ asn1_OCSPBasicOCSPResponse.x \ Modified: projects/krb5/kerberos5/lib/libkadm5clnt/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libkadm5clnt/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libkadm5clnt/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -38,7 +38,8 @@ SRCS= ad.c \ CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${.OBJDIR:H}/libasn1 \ -I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken \ -I${KRB5DIR}/lib/krb5 -I${.OBJDIR:H}/libkrb5 \ - -I${KRB5DIR}/lib/hdb -I${.OBJDIR:H}/libhdb -I. + -I${KRB5DIR}/lib/hdb -I${.OBJDIR:H}/libhdb \ + -I${SRCTOP}/contrib/com_err -I. .include Modified: projects/krb5/kerberos5/lib/libkadm5srv/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libkadm5srv/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libkadm5srv/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -39,7 +39,8 @@ SRCS= acl.c \ CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${.OBJDIR:H}/libasn1 \ -I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken \ -I${KRB5DIR}/lib/krb5 -I${.OBJDIR:H}/libkrb5 \ - -I${KRB5DIR}/lib/hdb -I${.OBJDIR:H}/libhdb -I. + -I${KRB5DIR}/lib/hdb -I${.OBJDIR:H}/libhdb \ + -I${SRCTOP}/contrib/com_err -I. .include Modified: projects/krb5/kerberos5/lib/libkdc/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libkdc/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libkdc/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -34,6 +34,7 @@ CFLAGS+= -I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroke -I${KRB5DIR}/lib/hdb -I${.OBJDIR:H}/libhdb \ -I${KRB5DIR}/lib/ntlm -I${.OBJDIR:H}/libheimntlm \ -I${KRB5DIR}/kdc \ + -I${SRCTOP}/contrib/com_err \ -I${KRB5DIR}/base .include Modified: projects/krb5/kerberos5/lib/libkrb5/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libkrb5/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libkrb5/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -624,6 +624,7 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/wind -I${.OBJDIR:H}/libwind \ -I${KRB5DIR}/lib/hx509 -I${.OBJDIR:H}/libhx509 \ -I${KRB5DIR}/lib/ipc \ + -I${SRCTOP}/contrib/com_err \ -I${KRB5DIR}/base -I. .include Modified: projects/krb5/kerberos5/lib/libwind/Makefile ============================================================================== --- projects/krb5/kerberos5/lib/libwind/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/lib/libwind/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -28,7 +28,8 @@ SRCS= bidi.c \ SRCS+= wind_err.c \ wind_err.h -CFLAGS+=-I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken -I${.OBJDIR:H}/libroken \ + -I${SRCTOP}/contrib/com_err -I. .include Modified: projects/krb5/kerberos5/libexec/digest-service/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/digest-service/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/digest-service/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -18,7 +18,8 @@ CFLAGS+= -I${KRB5DIR}/base \ -I${KRB5DIR}/lib/hdb \ -I${.OBJDIR:H:H}/lib/libhdb \ -I${KRB5DIR}/lib/ntlm \ - -I${.OBJDIR:H:H}/lib/libheimntlm + -I${.OBJDIR:H:H}/lib/libheimntlm \ + -I${SRCTOP}/contrib/com_err LIBADD= hdb kdc heimipcs krb5 roken asn1 crypto vers heimntlm LDFLAGS=${LDAPLDFLAGS} Modified: projects/krb5/kerberos5/libexec/hprop/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/hprop/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/hprop/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -20,6 +20,7 @@ CFLAGS+=-I${.OBJDIR:H:H}/lib/libheimntlm CFLAGS+=-I${.OBJDIR:H:H}/lib/libwind CFLAGS+=-I${.OBJDIR:H:H}/lib/libhdb CFLAGS+=-I${.OBJDIR:H:H}/lib/libheimbase +CFLAGS+=-I${SRCTOP}/contrib/com_err LIBADD= hdb krb5 roken vers DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: projects/krb5/kerberos5/libexec/hpropd/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/hpropd/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/hpropd/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -16,6 +16,7 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/krb5 - -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ -I${.OBJDIR:H:H}/lib/libheimntlm \ + -I${SRCTOP}/contrib/com_err \ ${LDAPCFLAGS} LIBADD= hdb krb5 roken vers DPADD= ${LDAPDPADD} Modified: projects/krb5/kerberos5/libexec/kadmind/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/kadmind/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/kadmind/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -18,6 +18,7 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I -I${.OBJDIR:H:H}/lib/libwind \ -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ + -I${SRCTOP}/contrib/com_err \ ${LDAPCFLAGS} LIBADD= kadm5srv gssapi hdb krb5 roken vers DPADD= ${LDAPDPADD} Modified: projects/krb5/kerberos5/libexec/kdc/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/kdc/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/kdc/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -22,6 +22,7 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ -I${.OBJDIR:H:H}/lib/libheimntlm \ + -I${SRCTOP}/contrib/com_err \ ${LDAPCFLAGS} LIBADD= kdc hdb krb5 roken crypt vers LDFLAGS=${LDAPLDFLAGS} Modified: projects/krb5/kerberos5/libexec/kimpersonate/Makefile ============================================================================== --- projects/krb5/kerberos5/libexec/kimpersonate/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/libexec/kimpersonate/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -11,6 +11,7 @@ CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${.OBJDIR:H:H}/lib/libroken \ -I${.OBJDIR:H:H}/lib/libasn1 \ -I${.OBJDIR:H:H}/lib/libkrb5 \ + -I${SRCTOP}/contrib/com_err \ -I. LIBADD= krb5 roken asn1 vers Modified: projects/krb5/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.bin/hxtool/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.bin/hxtool/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -8,7 +8,8 @@ CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libasn1 \ -I${.OBJDIR:H:H}/lib/libroken \ - -I${KRB5DIR}/lib/sl -I. + -I${KRB5DIR}/lib/sl \ + -I${SRCTOP}/contrib/com_err -I. LIBADD= hx509 roken asn1 crypto sl vers edit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h Modified: projects/krb5/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.bin/kadmin/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.bin/kadmin/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -36,6 +36,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I -I${.OBJDIR:H:H}/lib/libwind \ -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ + -I${SRCTOP}/contrib/com_err \ -I. \ ${LDAPCFLAGS} LIBADD= kadm5clnt kadm5srv hdb krb5 roken vers sl asn1 crypto edit Modified: projects/krb5/kerberos5/usr.bin/kf/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.bin/kf/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.bin/kf/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -7,7 +7,8 @@ CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/krb5 \ -I${.OBJDIR:H:H}/lib/libasn1 \ -I${.OBJDIR:H:H}/lib/libroken \ - -I${.OBJDIR:H:H}/lib/libkrb5 + -I${.OBJDIR:H:H}/lib/libkrb5 \ + -I${SRCTOP}/contrib/com_err LIBADD= krb5 roken vers .include Modified: projects/krb5/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.bin/string2key/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.bin/string2key/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -17,7 +17,8 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${.OBJDIR:H:H}/lib/libwind \ -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ - -I${.OBJDIR:H:H}/lib/libheimntlm + -I${.OBJDIR:H:H}/lib/libheimntlm \ + -I${SRCTOP}/contrib/com_err LIBADD= krb5 roken crypto vers .include Modified: projects/krb5/kerberos5/usr.bin/verify_krb5_conf/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -10,7 +10,8 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I -I${.OBJDIR:H:H}/lib/libroken \ -I${.OBJDIR:H:H}/lib/libwind \ -I${.OBJDIR:H:H}/lib/libasn1 \ - -I${.OBJDIR:H:H}/lib/libhx509 + -I${.OBJDIR:H:H}/lib/libhx509 \ + -I${SRCTOP}/contrib/com_err LIBADD= krb5 roken vers .include Modified: projects/krb5/kerberos5/usr.sbin/kstash/Makefile ============================================================================== --- projects/krb5/kerberos5/usr.sbin/kstash/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/kerberos5/usr.sbin/kstash/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -16,6 +16,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I -I${.OBJDIR:H:H}/lib/libhx509 \ -I${.OBJDIR:H:H}/lib/libhdb \ -I${.OBJDIR:H:H}/lib/libheimntlm \ + -I${SRCTOP}/contrib/com_err \ ${LDAPCFLAGS} LIBADD= hdb krb5 crypto vers DPADD= ${LDAPDPADD} Modified: projects/krb5/lib/libcom_err/Makefile ============================================================================== --- projects/krb5/lib/libcom_err/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/lib/libcom_err/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -2,8 +2,9 @@ PACKAGE=lib${LIB} LIB= com_err +PRIVATELIB= true SRCS= com_err.c error.c -INCS= ${COM_ERRDIR}/com_err.h ${COM_ERRDIR}/com_right.h +INCS= com_err.h com_right.h MAN= com_err.3 COM_ERRDIR= ${SRCTOP}/contrib/com_err CFLAGS+= -I${COM_ERRDIR} Modified: projects/krb5/lib/libpam/modules/pam_krb5/Makefile ============================================================================== --- projects/krb5/lib/libpam/modules/pam_krb5/Makefile Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/lib/libpam/modules/pam_krb5/Makefile Tue Jul 17 19:46:52 2018 (r336423) @@ -43,6 +43,7 @@ CFLAGS+= -I${SRCTOP}/kerberos5/include \ -I${KRB5DIR}/lib/krb5 \ -I${.OBJDIR:H:H:H:H}/kerberos5/lib/libkrb5 \ -I${KRB5DIR}/lib/asn1 \ - -I${.OBJDIR:H:H:H:H}/kerberos5/lib/libasn1 + -I${.OBJDIR:H:H:H:H}/kerberos5/lib/libasn1 \ + -I${SRCTOP}/contrib/com_err .include Modified: projects/krb5/share/mk/src.libnames.mk ============================================================================== --- projects/krb5/share/mk/src.libnames.mk Tue Jul 17 19:26:17 2018 (r336422) +++ projects/krb5/share/mk/src.libnames.mk Tue Jul 17 19:46:52 2018 (r336423) @@ -17,6 +17,7 @@ _PRIVATELIBS= \ atf_c \ atf_cxx \ bsdstat \ + com_err \ devdctl \ event \ gssapi \ @@ -94,7 +95,6 @@ _LIBRARIES= \ cap_random \ cap_sysctl \ cap_syslog \ - com_err \ compiler_rt \ crypt \ crypto \ From owner-svn-src-projects@freebsd.org Fri Jul 20 12:32:18 2018 Return-Path: Delivered-To: svn-src-projects@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 1ABE0104423E for ; Fri, 20 Jul 2018 12:32:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1A407ACE8; Fri, 20 Jul 2018 12:32:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2E9810395; Fri, 20 Jul 2018 12:32:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KCWHU2044858; Fri, 20 Jul 2018 12:32:17 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KCWHTG044857; Fri, 20 Jul 2018 12:32:17 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807201232.w6KCWHTG044857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 20 Jul 2018 12:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r336543 - projects/pnfs-planb-server/sys/rpc X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/rpc X-SVN-Commit-Revision: 336543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 12:32:18 -0000 Author: rmacklem Date: Fri Jul 20 12:32:17 2018 New Revision: 336543 URL: https://svnweb.freebsd.org/changeset/base/336543 Log: Update the krpc code to what is in head/current. Modified: projects/pnfs-planb-server/sys/rpc/clnt_rc.c projects/pnfs-planb-server/sys/rpc/clnt_vc.c Modified: projects/pnfs-planb-server/sys/rpc/clnt_rc.c ============================================================================== --- projects/pnfs-planb-server/sys/rpc/clnt_rc.c Fri Jul 20 12:03:16 2018 (r336542) +++ projects/pnfs-planb-server/sys/rpc/clnt_rc.c Fri Jul 20 12:32:17 2018 (r336543) @@ -175,6 +175,11 @@ clnt_reconnect_connect(CLIENT *cl) (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers, rc->rc_sendsz, rc->rc_recvsz); else { + /* + * I do not believe a timeout of less than 1sec would make + * sense here since short delays can occur when a server is + * temporarily overloaded. + */ if (rc->rc_timeout.tv_sec > 0 && rc->rc_timeout.tv_usec >= 0) { error = so_setsockopt(so, SOL_SOCKET, SO_SNDTIMEO, &rc->rc_timeout, sizeof(struct timeval)); Modified: projects/pnfs-planb-server/sys/rpc/clnt_vc.c ============================================================================== --- projects/pnfs-planb-server/sys/rpc/clnt_vc.c Fri Jul 20 12:03:16 2018 (r336542) +++ projects/pnfs-planb-server/sys/rpc/clnt_vc.c Fri Jul 20 12:32:17 2018 (r336543) @@ -142,8 +142,6 @@ clnt_vc_create( XDR xdrs; int error, interrupted, one = 1, sleep_flag; struct sockopt sopt; - struct timeval tv; - int timo; if (disrupt == 0) disrupt = (uint32_t)(long)raddr; @@ -158,18 +156,6 @@ clnt_vc_create( ct->ct_upcallrefs = 0; if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) { - /* Check for a timeout on the soconnect(). */ - bzero(&sopt, sizeof(sopt)); - sopt.sopt_dir = SOPT_GET; - sopt.sopt_level = SOL_SOCKET; - sopt.sopt_name = SO_SNDTIMEO; - sopt.sopt_val = &tv; - sopt.sopt_valsize = sizeof(tv); - error = sogetopt(so, &sopt); - timo = 0; - if (error == 0 && tv.tv_sec > 0 && tv.tv_sec <= 600 && - tv.tv_usec >= 0) - timo = hz * tv.tv_sec; error = soconnect(so, raddr, curthread); SOCK_LOCK(so); interrupted = 0; @@ -179,10 +165,9 @@ clnt_vc_create( while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { error = msleep(&so->so_timeo, SOCK_MTX(so), - sleep_flag, "connec", timo); + sleep_flag, "connec", 0); if (error) { - if (error == EINTR || error == ERESTART || - error == EAGAIN) + if (error == EINTR || error == ERESTART) interrupted = 1; break; } From owner-svn-src-projects@freebsd.org Fri Jul 20 12:38:08 2018 Return-Path: Delivered-To: svn-src-projects@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 BBCEE1044361 for ; Fri, 20 Jul 2018 12:38:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 646C67AF80; Fri, 20 Jul 2018 12:38:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 419A1103AE; Fri, 20 Jul 2018 12:38:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KCc8OJ045855; Fri, 20 Jul 2018 12:38:08 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KCc8Pl045854; Fri, 20 Jul 2018 12:38:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807201238.w6KCc8Pl045854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 20 Jul 2018 12:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r336544 - projects/pnfs-planb-server/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfs X-SVN-Commit-Revision: 336544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 12:38:09 -0000 Author: rmacklem Date: Fri Jul 20 12:38:07 2018 New Revision: 336544 URL: https://svnweb.freebsd.org/changeset/base/336544 Log: Update the comments and add a sysctl to set the retry limit for connections from clients to DSs. This is for the client side pNFS and head/current will be getting this commit soon. Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c Fri Jul 20 12:32:17 2018 (r336543) +++ projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c Fri Jul 20 12:38:07 2018 (r336544) @@ -106,6 +106,7 @@ static int nfs_bufpackets = 4; static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; +static int nfs_dsretries = 2; SYSCTL_DECL(_vfs_nfs); @@ -117,6 +118,8 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTL "Number of seconds to delay a retry after receiving EJUKEBOX"); SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0, "Disable weak cache consistency checking when server returns an error"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, dsretries, CTLFLAG_RW, &nfs_dsretries, 0, + "Number of retries for a DS RPC before failure"); static void nfs_down(struct nfsmount *, struct thread *, const char *, int, int); @@ -303,14 +306,20 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq if (cred != NULL) { if (NFSHASSOFT(nmp)) { /* - * This should be a DS mount. If the - * timeout is set to 1/4th of the lease - * duration, the DS should be disabled - * at approximately 1/2 lease duration, - * due to a retry count of 2. - * This will hopefully cause the client - * to continue without the disabled - * DS in less than the lease duration. + * This should be a DS mount. + * Use CLSET_TIMEOUT to set the timeout + * for connections to DSs instead of + * specifying a timeout on each RPC. + * This is done so that SO_SNDTIMEO + * is set on the TCP socket as well + * as specifying a time limit when + * waiting for an RPC reply. Useful + * if the send queue for the TCP + * connection has become constipated, + * due to a failed DS. + * The choice of lease_duration / 4 is + * fairly arbitrary, but seems to work + * ok, with a lower bound of 10sec. */ timo.tv_sec = nfsrv_lease / 4; if (timo.tv_sec < 10) @@ -346,6 +355,10 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq * not maintain open/lock state and is the * only case where using a "soft" mount is * recommended for NFSv4. + * For mounts from the MDS to DS, this is done + * via mount options, but that is not the case + * here. The retry limit here can be adjusted + * via the sysctl vfs.nfs.dsretries. * See the comment above w.r.t. timeout. */ timo.tv_sec = nfsrv_lease / 4; @@ -353,7 +366,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq timo.tv_sec = 10; timo.tv_usec = 0; CLNT_CONTROL(client, CLSET_TIMEOUT, &timo); - retries = 2; + retries = nfs_dsretries; } } } else {