From owner-freebsd-hackers Sun Aug 20 04:59:00 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id EAA26120 for hackers-outgoing; Sun, 20 Aug 1995 04:59:00 -0700 Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id EAA26109 for ; Sun, 20 Aug 1995 04:58:55 -0700 Received: from corbin.Root.COM (corbin [198.145.90.34]) by Root.COM (8.6.11/8.6.5) with ESMTP id EAA00196 for ; Sun, 20 Aug 1995 04:58:06 -0700 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id EAA00626 for ; Sun, 20 Aug 1995 04:59:47 -0700 Message-Id: <199508201159.EAA00626@corbin.Root.COM> To: hackers@freebsd.org Subject: NFS_ASYNC patch (for 2.1) From: David Greenman Reply-To: davidg@Root.COM Date: Sun, 20 Aug 1995 04:59:47 -0700 Sender: hackers-owner@freebsd.org Precedence: bulk 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);