From owner-freebsd-fs Thu Nov 28 11:44:52 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5B4137B401 for ; Thu, 28 Nov 2002 11:44:51 -0800 (PST) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6B7543EA9 for ; Thu, 28 Nov 2002 11:44:50 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from monica.cs.rpi.edu (monica.cs.rpi.edu [128.213.7.3]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id OAA75019; Thu, 28 Nov 2002 14:44:43 -0500 (EST) Received: from monica.cs.rpi.edu (crossd@localhost) by monica.cs.rpi.edu (8.11.6/8.11.6) with ESMTP id gASJidO05245; Thu, 28 Nov 2002 14:44:39 -0500 (EST) (envelope-from crossd@monica.cs.rpi.edu) Message-Id: <200211281944.gASJidO05245@monica.cs.rpi.edu> To: Alfred Perlstein Cc: "David E. Cross" , freebsd-fs@freebsd.org, crossd@cs.rpi.edu Subject: Re: openafs question In-Reply-To: Message from Alfred Perlstein of "Thu, 28 Nov 2002 04:35:50 PST." <20021128123550.GM16066@elvis.mu.org> References: <200211281128.gASBS2g04424@monica.cs.rpi.edu> <20021128123550.GM16066@elvis.mu.org> Date: Thu, 28 Nov 2002 14:44:39 -0500 From: "David E. Cross" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Have getnewvnode add a flag to the vnode noting that it's meant for the > global list, otherwise store a "free()" callback in the vnode to be called? I don't think I understand. In the current code "getnewvnode" is never called. What it has is a giant circularly linked list of tvc's, where a TVC is defined as something like: struct tvc { misc afs stuff; struct free *next; struct vnode v; /* note, _not_ a vnode *, that would make this easy */ } Whenever it runs out of vnodes it allocates a new tvc (up until "-stat" parameter). Fills in the "stuff", and shoves it at the top of the tvc used circle-queue (null-ing out the "next" parameter.. so it maintains its own free/used lists outside of the vnode). When it is freed it moves it onto the free list and moves it to the tail of the cirleq(I think; I'm not 100% sure on the moving it to the tail of the circleq at this point). -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message