From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 12:12:57 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DF7237B401 for ; Thu, 8 May 2003 12:12:57 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC2743F93 for ; Thu, 8 May 2003 12:12:56 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h48JCrxa001790; Thu, 8 May 2003 21:12:53 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: alih@internetDog.org From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 08 May 2003 15:03:41 EDT." <20030508150341.B28906@internetDog.org> Date: Thu, 08 May 2003 21:12:52 +0200 Message-ID: <1789.1052421172@critter.freebsd.dk> cc: freebsd-hackers@freebsd.org Subject: Re: cache_purge > cache_zap segmentation fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2003 19:12:57 -0000 In message <20030508150341.B28906@internetDog.org>, Ali Bahar writes: >Given the vnode for /usr/src, > > - is its v_cache_dst a linked list of namecache entries for /usr, > - & its v_cache_src a linked list of namecache entries for /usr/src/sys ? If you look at the definition in sys/sys/vnode.h, it actually is pretty clear from that: struct vnode { [...] LIST_HEAD(, namecache) v_cache_src; /* c Cache entries from us */ TAILQ_HEAD(, namecache) v_cache_dst; /* c Cache entries to us */ [...] }; So imagine this name cache entry: { directory vnode: vnode of "/usr/src" [vnode#1] name "sys" destination vnode: vnode of "/usr/src/sys" [vnode#2] } This name cache entry will be a member of the "v_cache_src" LIST from vnode#1, and of the v_cache_dst TAILQ for vnode#2 Other entries on vnode#1's ..._src LIST will be for /usr/src/bin, /usr/src/etc and so on. The thing you have to remember is that one vnode can have multiple names due to hard links. If it could have only one, the TAILQ would not be necessary. In this case there will be no other elements on vnode#2's TAILQ since we do not allow hardlinks to directories. >Would you know if the 5.0 modifications could fix this problem? I'm not sure I know what the problem is, I just stumbled on your email midthread I think... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.