Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0416/1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


nfsserver: claim more free space
 [rsc] --rw-rw-r-- M 940585 glenda sys 15772 Apr 16 08:59 sys/src/cmd/9nfs/nfsserver.c
	/n/sourcesdump/2006/0416/plan9/sys/src/cmd/9nfs/nfsserver.c:629,634 - 
	/n/sourcesdump/2006/0417/plan9/sys/src/cmd/9nfs/nfsserver.c:629,639
	  nfsstatfs(int n, Rpccall *cmd, Rpccall *reply)
	  {
	  	uchar *dataptr = reply->results;
	+ 	enum {
	+ 		Xfersize = 2048,
	+ 		Maxlong = (long)((1ULL<<31) - 1),
	+ 		Maxfreeblks = Maxlong / Xfersize,
	+ 	};
	  
	  	chat("statfs...");
	  	showauth(&cmd->cred);
	/n/sourcesdump/2006/0416/plan9/sys/src/cmd/9nfs/nfsserver.c:635,645 - 
	/n/sourcesdump/2006/0417/plan9/sys/src/cmd/9nfs/nfsserver.c:640,650
	  	if(n != FHSIZE)
	  		return garbage(reply, "bad count");
	  	PLONG(NFS_OK);
	- 	PLONG(4096);	/* tsize */
	- 	PLONG(2048);	/* bsize */
	- 	PLONG(100000);	/* blocks */
	- 	PLONG(50000);	/* bfree */
	- 	PLONG(40000);	/* bavail */
	+ 	PLONG(4096);		/* tsize (fs block size) */
	+ 	PLONG(Xfersize);	/* bsize (optimal transfer size) */
	+ 	PLONG(Maxfreeblks);	/* blocks in fs */
	+ 	PLONG(Maxfreeblks);	/* bfree to root*/
	+ 	PLONG(Maxfreeblks);	/* bavail (free to mortals) */
	  	chat("OK\n");
	  	/*conftime = 0;
	  	readunixidmaps(config);*/


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.