Date: Fri, 18 Oct 1996 16:23:21 +0100 (BST) From: Doug Rabson <dfr@render.com> To: Karl Denninger <karl@mcs.net> Cc: Michael Hancock <michaelh@cet.co.jp>, freebsd-hackers@FreeBSD.org Subject: Re: Recent hacking (was Re: FreeBSD 2.2.x release question) Message-ID: <Pine.BSF.3.95.961018162208.14906E-100000@minnow.render.com> In-Reply-To: <199610171810.NAA00720@Jupiter.Mcs.Net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Oct 1996, Karl Denninger wrote: > Current speculation is that this is a vnode cache handling problem of some > kind, where the vnode for the desired directory is being "flushed" but > never reloaded into the cache. We're still investigating and searching for > the root cause. > > Note that this appears to happen on directories with LARGE numbers of > subdirectory entries -- and not on ones with small numbers of directories. > I've never seen it occur, for example, on MY home directory -- but I'm on a > disk pack with maybe 20 directories at the same level that I'm on. > > The places where it happens frequently have perhaps 3,000 - 4,000 directories > at the same level, which is common on our big user disks. Can you try this patch and see if it fixes (or changes) your problem? Index: nfs_bio.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_bio.c,v retrieving revision 1.27 diff -u -r1.27 nfs_bio.c --- nfs_bio.c 1996/10/12 17:39:39 1.27 +++ nfs_bio.c 1996/10/18 15:20:40 @@ -319,6 +319,7 @@ vfs_busy_pages(bp, 0); error = nfs_doio(bp, cred, p); if (error) { + vfs_unbusy_pages(bp); brelse(bp); while (error == NFSERR_BAD_COOKIE) { nfs_invaldir(vp); @@ -337,7 +338,10 @@ bp->b_flags |= B_READ; vfs_busy_pages(bp, 0); error = nfs_doio(bp, cred, p); - if (error) + if (error) { + vfs_unbusy_pages(bp); + brelse(bp); + } else if (i < lbn) brelse(bp); } } Index: nfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfs_vnops.c,v retrieving revision 1.35 diff -u -r1.35 nfs_vnops.c --- nfs_vnops.c 1996/09/19 18:21:01 1.35 +++ nfs_vnops.c 1996/10/18 15:20:42 @@ -2066,13 +2066,13 @@ #endif /* - * If there is no cookie, assume end of directory. + * If there is no cookie, assume directory was stale. */ cookiep = nfs_getcookie(dnp, uiop->uio_offset, 0); if (cookiep) cookie = *cookiep; else - return (0); + return (NFSERR_BAD_COOKIE); /* * Loop around doing readdir rpc's of size nm_readdirsize * truncated to a multiple of DIRBLKSIZ. @@ -2255,13 +2255,13 @@ newvp = NULLVP; /* - * If there is no cookie, assume end of directory. + * If there is no cookie, assume directory was stale. */ cookiep = nfs_getcookie(dnp, uiop->uio_offset, 0); if (cookiep) cookie = *cookiep; else - return (0); + return (NFSERR_BAD_COOKIE); /* * Loop around doing readdir rpc's of size nm_readdirsize * truncated to a multiple of DIRBLKSIZ. -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 734 3761 FAX: +44 171 734 6426
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961018162208.14906E-100000>