From owner-svn-src-stable@freebsd.org Tue Apr 25 23:43:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7434DD504CE; Tue, 25 Apr 2017 23:43:38 +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 mx1.freebsd.org (Postfix) with ESMTPS id 43E3B16E9; Tue, 25 Apr 2017 23:43:38 +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 v3PNhbnA044973; Tue, 25 Apr 2017 23:43:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3PNhbTm044972; Tue, 25 Apr 2017 23:43:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704252343.v3PNhbTm044972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 25 Apr 2017 23:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317427 - stable/11/sys/fs/nfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 23:43:38 -0000 Author: rmacklem Date: Tue Apr 25 23:43:37 2017 New Revision: 317427 URL: https://svnweb.freebsd.org/changeset/base/317427 Log: MFC: r316692 Set initial values for nfsstatfs in the NFSv4 client. The AmazonEFS NFSv4.1 server does not support the FILES_FREE and FILES_TOTAL attributes. As such, an NFSv4.1 mount to the server would return garbage for these values. This patch initializes the fields of the nfsstatfs structure, so that "df" and friends will at least return consistent bogus values. Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonsubs.c Tue Apr 25 23:29:41 2017 (r317426) +++ stable/11/sys/fs/nfs/nfs_commonsubs.c Tue Apr 25 23:43:37 2017 (r317427) @@ -888,6 +888,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd pc->pc_caseinsensitive = 0; pc->pc_casepreserving = 1; } + if (sfp != NULL) { + sfp->sf_ffiles = UINT64_MAX; + sfp->sf_tfiles = UINT64_MAX; + sfp->sf_afiles = UINT64_MAX; + sfp->sf_fbytes = UINT64_MAX; + sfp->sf_tbytes = UINT64_MAX; + sfp->sf_abytes = UINT64_MAX; + } } /*