From owner-freebsd-current Sun Aug 22 15:25:52 1999 Delivered-To: freebsd-current@freebsd.org Received: from mw4.texas.net (mw4.texas.net [206.127.30.14]) by hub.freebsd.org (Postfix) with ESMTP id DF1BB155E3 for ; Sun, 22 Aug 1999 15:25:48 -0700 (PDT) (envelope-from rsnow@lgc.com) Received: from basil.dympna.COM (mnet07-40.sat.texas.net [209.99.53.40]) by mw4.texas.net (2.4/2.4) with ESMTP id RAA12720; Sun, 22 Aug 1999 17:25:14 -0500 (CDT) Received: from lgc.com (IDENT:rsnow@turbo [134.132.228.6]) by basil.dympna.COM (8.9.3/8.8.7) with ESMTP id RAA00533; Sun, 22 Aug 1999 17:25:03 -0500 (CDT) (envelope-from rsnow@lgc.com) Message-ID: <37C078BE.BF519BF0@lgc.com> Date: Sun, 22 Aug 1999 17:25:02 -0500 From: Rob Snow X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.11 i686) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon Cc: Doug , "John S. Dyson" , current@FreeBSD.ORG Subject: Re: Patches available (was Re: NFS HEADS UP) References: <199908211156.GAA20231@dyson.iquest.net.> <199908211649.JAA73759@apollo.backplane.com> <37BF4420.452C5076@gorean.org> <37BF4E63.9019DD62@lgc.com> <199908220226.TAA75601@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG When copying over (FreeBSD client) the multipatch from a Linux (2.2.11) box before the patch I got this garbage in the file, -current as of 4am this morning. gzip'ed version has bad crc's. Went the other way and it worked fine (Linux client), this is v2 via amd. /etc/amd.conf: ************** /defaults fs:=${autodir}/${rhost}/root/${rfs};opts:=nosuid,nodev * rhost:=${key};type:=host;rfs:=/ Update: after reboot with new kernel I get the same thing. It's reproducible. It doesn't happen between linux boxen and doesn't happen on loopback mounts. -Rob Index: nfs/nfs_serv.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_serv.c,v retrieving revision 1.83 diff -u -r1.83 nfs_serv.c --- nfs_serv.c 1999/07/29 21:42:57 1.83 +++ nfs_serv.c 1999/08/21 07:17:06 @@ -96,6 +96,7 @@ #include #include #include +#include #include #include @@ -115,6 +116,8 @@ #define nfsdbprintf(info) #endif +#define MAX_COMMIT_COUNT (1024 * 1024) + nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON }; #ifndef NFS_NOSERVER @@ -133,6 +136,10 @@ static int nfs_async; SYSCTL_INT(_vfs_nfs, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, ""); +static int nfs_commit_blks; +static int nfs_commit_miss; +SYSCTL_INT(_vfs_nfs, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 0, "" ); +SYSCTL_INT(_vfs_nfs, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss, 0, "" ); static int nfsrv_access __P((struct vnode *,int,struct ucred *,int, struct proc *, int)); @@ -3624,11 +3631,73 @@ goto nfsmout; } for_ret = VOP_GETATTR(vp, &bfor, cred, procp); - if (vp->v_object && - (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) { + + if (cnt > MAX_COMMIT_COUNT) { + /* + * Give up and do the whole thing + */ + if (vp->v_object && + (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) { ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@requested range. Note: we are assuming that Matthew Dillon wrote: > > Ok, I have put up the current patch set -- for patching against CURRENT > only - on my web site. > > http://www.backplane.com/FreeBSD4/ > > They contain a bit more then the NFS stuff, but it's all related to > performance. It would take me too long to try to separate them out > (this is what happens when things back-up, sorry!). > > The patches have been tested only somewhat and the one that fixes > nfssrv_commit() is not 100% complete - it doesn't sync-out the file > metadata yet, only the specific data blocks being requested by the > commit rpc. > > -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message