From owner-freebsd-hackers Mon Aug 21 06:48:35 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id GAA20177 for hackers-outgoing; Mon, 21 Aug 1995 06:48:35 -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 GAA20171 for ; Mon, 21 Aug 1995 06:48:34 -0700 Received: from corbin.Root.COM (corbin [198.145.90.34]) by Root.COM (8.6.11/8.6.5) with ESMTP id GAA02478 for ; Mon, 21 Aug 1995 06:47:41 -0700 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id GAA00899 for ; Mon, 21 Aug 1995 06:49:25 -0700 Message-Id: <199508211349.GAA00899@corbin.Root.COM> To: hackers@freebsd.org Subject: NFS_ASYNC (revisited for 2.2) From: David Greenman Reply-To: davidg@Root.COM Date: Mon, 21 Aug 1995 06:49:25 -0700 Sender: hackers-owner@freebsd.org Precedence: bulk Doug Rabson has pointed out that my NFS_ASYNC patch for 2.2 was inadequate and furthermore should only apply to NFSv2. Attached is a corrected patch. -DG Index: nfs_serv.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_serv.c,v retrieving revision 1.22 diff -c -r1.22 nfs_serv.c *** 1.22 1995/08/06 11:55:25 --- nfs_serv.c 1995/08/21 13:46:48 *************** *** 92,97 **** --- 92,103 ---- NFFIFO, NFNON }; int nfsrvw_procrastinate = NFS_GATHERDELAY * 1000; + #ifdef NFS_ASYNC + int nfs_async = 1; + #else + int nfs_async; + #endif + /* * nfs v3 access service */ *************** *** 731,736 **** --- 737,744 ---- nfsm_dissect(tl, u_long *, 4 * NFSX_UNSIGNED); off = (off_t)fxdr_unsigned(u_long, *++tl); tl += 2; + if (nfs_async) + stable = NFSV3WRITE_UNSTABLE; } retlen = len = fxdr_unsigned(long, *tl); cnt = i = 0; *************** *** 930,935 **** --- 938,945 ---- nfsm_dissect(tl, u_long *, 4 * NFSX_UNSIGNED); nfsd->nd_off = (off_t)fxdr_unsigned(u_long, *++tl); tl += 2; + if (nfs_async) + nfsd->nd_stable = NFSV3WRITE_UNSTABLE; } len = fxdr_unsigned(long, *tl); nfsd->nd_len = len;