From owner-freebsd-current Mon Oct 13 04:30:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA15127 for current-outgoing; Mon, 13 Oct 1997 04:30:03 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from schizo.dk.tfs.com (mail.trw.dk [195.8.133.123]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA15083 for ; Mon, 13 Oct 1997 04:29:56 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.dk.tfs.com [140.145.230.252]) by schizo.dk.tfs.com (8.8.7/8.7.3) with ESMTP id NAA03314; Mon, 13 Oct 1997 13:29:18 +0200 (MET DST) Received: from critter.freebsd.dk (localhost.dk.tfs.com [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id NAA26111; Mon, 13 Oct 1997 13:28:47 +0200 (CEST) To: Doug Rabson cc: Karl Denninger , Robin Cutshaw , freebsd-current@freebsd.org Subject: Re: NFS cache problem in 3.0 SNAP In-reply-to: Your message of "Mon, 13 Oct 1997 11:09:28 BST." Date: Mon, 13 Oct 1997 13:28:47 +0200 Message-ID: <26109.876742127@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> I'm wondering if we need a call from the nfs code to the namecache >> when the nfs code decides that a directory has been changed. Anybody >> know where we can detect that situation ? > >The nfs client calls nfs_invaldir when it detects a directory chance I >think. OK, try to apply this change then: in kern/vfs_cache.c: remove static from cache_zap() Add this function: void cache_dir_purge(vp) struct vnode *vp; { while (!LIST_EMPTY(&vp->v_cache_src)) cache_zap(LIST_FIRST(&vp->v_cache_src)); } in nfs/nfs_subs.c: And add this call to nfs_invaldir() somewhere: cache_dir_purge(vp); And tell me if this improves things... -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop."