Index: nfs_serv.c =================================================================== RCS file: /home/lair/ellard/CVS/nfs/freebsd_4.6.2/src/sys/nfs/nfs_serv.c,v retrieving revision 1.1 retrieving revision 1.15 diff -c -r1.1 -r1.15 *** nfs_serv.c 29 Oct 2002 15:56:52 -0000 1.1 --- nfs_serv.c 8 Apr 2003 16:30:49 -0000 1.15 *************** *** 1,7 **** /* ! * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. - * * This code is derived from software contributed to Berkeley by * Rick Macklem at The University of Guelph. * --- 1,6 ---- /* ! * Copyright (c) 1989, 1993, 2002 * The Regents of the University of California. All rights reserved. * This code is derived from software contributed to Berkeley by * Rick Macklem at The University of Guelph. * *************** *** 99,104 **** --- 98,107 ---- #include #include + #ifdef NFS_TWEAK + #include + #endif /* NFS_TWEAK */ + #ifdef NFSRV_DEBUG #define nfsdbprintf(info) printf info #else *************** *** 784,793 **** fhandle_t *fhp; struct uio io, *uiop = &io; struct vattr va, *vap = &va; ! struct nfsheur *nh; off_t off; int ioflag = 0; u_quad_t frev; nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); fhp = &nfh.fh_generic; --- 787,799 ---- fhandle_t *fhp; struct uio io, *uiop = &io; struct vattr va, *vap = &va; ! struct nfsheur *nh = NULL; off_t off; int ioflag = 0; u_quad_t frev; + #ifdef NFS_TWEAK + off_t *new_off = NULL; + #endif /* NFS_TWEAK */ nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); fhp = &nfh.fh_generic; *************** *** 855,860 **** --- 861,873 ---- * Calculate seqcount for heuristic */ + #ifdef NFS_TWEAK + if (!nfst_default) { + int seqcount = nfst_calc_seqcount (vp, off, &new_off); + ioflag |= seqcount << 16; + } + else + #endif /* NFS_TWEAK */ { int hi; int try = 4; *************** *** 965,971 **** --- 978,995 ---- uiop->uio_segflg = UIO_SYSSPACE; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); off = uiop->uio_offset; + #ifdef NFS_TWEAK + if (nfst_default) { + if (nh != NULL) { + nh->nh_nextr = off; + } + } + else if (new_off) { + *new_off = off; + } + #else /* Not NFS_TWEAK */ nh->nh_nextr = off; + #endif /* NFS_TWEAK */ FREE((caddr_t)iv2, M_TEMP); if (error || (getret = VOP_GETATTR(vp, vap, cred, procp))) { if (!error)