Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 1995 04:59:47 -0700
From:      David Greenman <davidg@Root.COM>
To:        hackers@freebsd.org
Subject:   NFS_ASYNC patch (for 2.1)
Message-ID:  <199508201159.EAA00626@corbin.Root.COM>

next in thread | raw e-mail | index | archive | help
   For those that would like to try async NFS, attached is the patch for the
2.1-stable branch. Add 'options NFS_ASYNC' to your kernel config file to
enable.

-DG

Index: nfs_serv.c
===================================================================
RCS file: /home/ncvs/src/sys/nfs/nfs_serv.c,v
retrieving revision 1.15
diff -c -r1.15 nfs_serv.c
*** 1.15	1995/06/11 19:31:45
--- nfs_serv.c	1995/08/20 11:36:12
***************
*** 86,91 ****
--- 86,97 ----
  nfstype nfs_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFNON,
  		      NFCHR, NFNON };
  
+ #ifdef NFS_ASYNC
+ int nfs_async = 1;
+ #else
+ int nfs_async;
+ #endif
+ 
  /*
   * nqnfs access service
   */
***************
*** 575,581 ****
  	register long t1;
  	caddr_t bpos;
  	int error = 0, rdonly, cache, siz, len, xfer;
! 	int ioflags = IO_SYNC | IO_NODELOCKED;
  	char *cp2;
  	struct mbuf *mb, *mb2, *mreq;
  	struct vnode *vp;
--- 581,587 ----
  	register long t1;
  	caddr_t bpos;
  	int error = 0, rdonly, cache, siz, len, xfer;
! 	int ioflags;
  	char *cp2;
  	struct mbuf *mb, *mb2, *mreq;
  	struct vnode *vp;
***************
*** 584,589 ****
--- 590,600 ----
  	struct uio io, *uiop = &io;
  	off_t off;
  	u_quad_t frev;
+ 
+ 	if (nfs_async)
+ 		ioflags = IO_NODELOCKED;
+ 	else
+ 		ioflags = IO_SYNC | IO_NODELOCKED;
  
  	fhp = &nfh.fh_generic;
  	nfsm_srvmtofh(fhp);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508201159.EAA00626>