svn commit: r317427 - stable/11/sys/fs/nfs

Rick Macklem rmacklem at FreeBSD.org
Tue Apr 25 23:43:38 UTC 2017


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;
+		}
 	}
 
 	/*


More information about the svn-src-all mailing list