Date: Mon, 10 Apr 2017 21:49:35 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316692 - head/sys/fs/nfs Message-ID: <201704102149.v3ALnZYk062244@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon Apr 10 21:49:35 2017 New Revision: 316692 URL: https://svnweb.freebsd.org/changeset/base/316692 Log: 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. This patch should have effect when mounting other NFSv4.1 servers. Reported by: cperciva MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Apr 10 21:44:13 2017 (r316691) +++ head/sys/fs/nfs/nfs_commonsubs.c Mon Apr 10 21:49:35 2017 (r316692) @@ -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; + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704102149.v3ALnZYk062244>