From owner-freebsd-fs Sun Nov 24 21:37:32 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 1449537B401 for ; Sun, 24 Nov 2002 21:37:31 -0800 (PST) Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE8C443E4A for ; Sun, 24 Nov 2002 21:37:30 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.12.3/8.12.3) with ESMTP id gAP5bN59067917; Sun, 24 Nov 2002 21:37:23 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200211250537.gAP5bN59067917@beastie.mckusick.com> To: Julian Elischer Subject: Re: ufs types Cc: fs@freebsd.org In-Reply-To: Your message of "Fri, 22 Nov 2002 16:48:03 PST." Date: Sun, 24 Nov 2002 21:37:23 -0800 From: Kirk McKusick 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 Date: Fri, 22 Nov 2002 16:48:03 -0800 (PST) From: Julian Elischer To: fs@freebsd.org cc: mckusick@mckusick.com Subject: ufs types X-ASK-Info: Whitelist match We had a system on site today that fell over every time re tried to boot it. Causing delays in probably many millions of dollars of transfers. The reason was a currupt word in the cylinder group summary information. a word had been trashed becoming -ve, and fsck didn't check against -ve numbers in that (a rotor value). Noticing that most fields are not checked against being -ve in fsck we started looking at fixing it.. until we realised that the far quicker answer was to define them to be unsigned in ufs.h and just fix the compile errors.. The values are usually checked for reasonable +ve values. Does anyone have a reason why we should not do this in FreeBSD? (fix the superblock and cg summary blocks to have mostly unsigned values..) julian Your approved request should fix this problem. Kirk McKusick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Sun Nov 24 23: 3:12 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 A409B37B401 for ; Sun, 24 Nov 2002 23:03:11 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48A9343E3B for ; Sun, 24 Nov 2002 23:03:10 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA10082; Mon, 25 Nov 2002 18:03:02 +1100 Date: Mon, 25 Nov 2002 18:16:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Julian Elischer Cc: fs@FreeBSD.ORG, Subject: Re: ufs types In-Reply-To: Message-ID: <20021125181030.T56011-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Fri, 22 Nov 2002, Julian Elischer wrote: > We had a system on site today that fell over every time re tried to boot > it. Causing delays in probably many millions of dollars of transfers. > The reason was a currupt word in the cylinder group summary information. > a word had been trashed becoming -ve, and fsck didn't check against > -ve numbers in that (a rotor value). Noticing that most fields are not > checked against being -ve in fsck we started looking at fixing it.. > until we realised that the far quicker answer was to define them to be > unsigned in ufs.h and just fix the compile errors.. The values are > usually checked for reasonable +ve values. > > Does anyone have a reason why we should not do this in FreeBSD? Yes. Unsigned types give a morass or (un)sign extension and (non)overflow problems, especially when they are mixed with signed types. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Nov 25 9:33:56 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 9A7FF37B401; Mon, 25 Nov 2002 09:33:55 -0800 (PST) Received: from hoplite-research.com (adsl-64-174-226-108.dsl.sntc01.pacbell.net [64.174.226.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A59F43EC5; Mon, 25 Nov 2002 09:33:55 -0800 (PST) (envelope-from onacct456t@aol.com) Received: from vtomo9265.com [200.60.182.95] by hoplite-research.com [192.168.0.5] with SMTP (MDaemon.Standard.v5.0.1.R); Mon, 25 Nov 2002 09:28:13 -0800 From: "From the desk of E.A. Roth" Reply-To: onacct456t@aol.com To: website@scoutnet.org.uk, jb1@sanger.ac.uk Cc: info@morsepr.co.uk, jesusr@es.freebsd.org, freebsd-fs@freebsd.org, nsayer@freebsd.org, gena@netvision.net.il Date: Mon, 25 Nov 2002 13:27:57 -0400 Subject: Looking for old friends MIME-Version: 1.0 X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-MDRemoteIP: 200.60.182.95 X-Return-Path: onacct456t@aol.com Message-Id: <20021125173355.1A59F43EC5@mx1.FreeBSD.org> 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 *** Come Check Out Me and My Happy Friends **** Live webmcams, one on one chat and lots more. Click here for our pics: http://ssvideos.com/main.html No one under 18 allowed to view this material! if you would like to be removed please click here: http://ssvideos.com/remove.html [0BK5NKIYs5] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Nov 25 11: 0:59 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 7FB6A37B401 for ; Mon, 25 Nov 2002 11:00:58 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24B1543EE8 for ; Mon, 25 Nov 2002 11:00:52 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAPJ0qx3082617 for ; Mon, 25 Nov 2002 11:00:52 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAPJ0pvD082605 for fs@freebsd.org; Mon, 25 Nov 2002 11:00:51 -0800 (PST) Date: Mon, 25 Nov 2002 11:00:51 -0800 (PST) Message-Id: <200211251900.gAPJ0pvD082605@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: fs@FreeBSD.org Subject: Current problem reports assigned to you 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 Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [2000/10/06] kern/21807 fs [patches] Make System attribute correspon 1 problem total. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Nov 28 3:28:11 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 8A33D37B401 for ; Thu, 28 Nov 2002 03:28:10 -0800 (PST) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82FF543ED4 for ; Thu, 28 Nov 2002 03:28:08 -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 GAA62664 for ; Thu, 28 Nov 2002 06:28:02 -0500 (EST) Received: from monica.cs.rpi.edu (crossd@localhost) by monica.cs.rpi.edu (8.11.6/8.11.6) with ESMTP id gASBS2g04424 for ; Thu, 28 Nov 2002 06:28:02 -0500 (EST) (envelope-from crossd@monica.cs.rpi.edu) Message-Id: <200211281128.gASBS2g04424@monica.cs.rpi.edu> To: freebsd-fs@freebsd.org Subject: openafs question Date: Thu, 28 Nov 2002 06:28:01 -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 I've been working on the FreeBSD-OpenAFS port, and I seem to be down to one last bug; I know what it is, I am just having trouble getting the solution to it. First a quick description of what the code is doing... It maintains its own set of vnodes, outside of the system pool, which it populates with data (these are NEVER gotten with getnewvnode(9)). The problem arises when one of these is used, and then free'd. The system decides to insert it into the global vnode cache and use it for things like UFS. This is bad for 2 reasons: 1) the per-mount-point TAILQ of vnodes is not properly initialized in the AFS routines. tqe_next=0x0; tqe_prev=0xdeadb; Thus when the system vnode routines try to work with this *boom*. 2) Surely you say that just fixing tqe_next/prev will fix it. well, sorta. Since it has its own list, referenced "its own way", it feels free to use these however it wants. My question is: Can I somehow keep the system from getting the idea that it should use these? The existing code artificially increases the usecount by one to prevent it from ever being reaped, the downside of this is that files are never closed, and you quickly panic afs when it goes beyond its "-stat" parameter. There is prior art in the AFS code for using system vnodes, but only the OSF code uses this, and there are other problems (like it uses newvnode to get a vnode, but it assigns it to a "struct vcache", which is an afs datatype that has a struct vnode within it; our getnewvnode would appear inadequate for this task, it also means a lot more "work" (without explaining the code too much, just trust me on this -- perhaps some magic with v_data could be worked out, but I'd like to follow the above through first, note that no other OS, including Darwin appears to have the above mentioned problem of the kernel-propper taking AFS vnodes) -- 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 From owner-freebsd-fs Thu Nov 28 4:35:56 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 A235537B401 for ; Thu, 28 Nov 2002 04:35:55 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65DAF43E4A for ; Thu, 28 Nov 2002 04:35:55 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 36AB6AE027; Thu, 28 Nov 2002 04:35:50 -0800 (PST) Date: Thu, 28 Nov 2002 04:35:50 -0800 From: Alfred Perlstein To: "David E. Cross" Cc: freebsd-fs@freebsd.org Subject: Re: openafs question Message-ID: <20021128123550.GM16066@elvis.mu.org> References: <200211281128.gASBS2g04424@monica.cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200211281128.gASBS2g04424@monica.cs.rpi.edu> User-Agent: Mutt/1.4i 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 * David E. Cross [021128 03:28] wrote: > I've been working on the FreeBSD-OpenAFS port, and I seem to be down to > one last bug; I know what it is, I am just having trouble getting the > solution to it. > > First a quick description of what the code is doing... It maintains its > own set of vnodes, outside of the system pool, which it populates with > data (these are NEVER gotten with getnewvnode(9)). The problem arises > when one of these is used, and then free'd. The system decides to insert > it into the global vnode cache and use it for things like UFS. This is > bad for 2 reasons: 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? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Nov 28 4:36:54 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 6D45837B401 for ; Thu, 28 Nov 2002 04:36:53 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3311543E88 for ; Thu, 28 Nov 2002 04:36:53 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 0F4A0AE216; Thu, 28 Nov 2002 04:36:53 -0800 (PST) Date: Thu, 28 Nov 2002 04:36:53 -0800 From: Alfred Perlstein To: "David E. Cross" Cc: freebsd-fs@freebsd.org Subject: Re: openafs question Message-ID: <20021128123653.GN16066@elvis.mu.org> References: <200211281128.gASBS2g04424@monica.cs.rpi.edu> <20021128123550.GM16066@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021128123550.GM16066@elvis.mu.org> User-Agent: Mutt/1.4i 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 * Alfred Perlstein [021128 04:35] wrote: > > 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? But seriously, this is a bad practice, it should be using the system allocator and DTRT. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message 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 From owner-freebsd-fs Thu Nov 28 12: 1:18 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 6B63437B401 for ; Thu, 28 Nov 2002 12:01:17 -0800 (PST) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5CB143E9C for ; Thu, 28 Nov 2002 12:01:16 -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 PAA75432; Thu, 28 Nov 2002 15:01:14 -0500 (EST) Received: from monica.cs.rpi.edu (crossd@localhost) by monica.cs.rpi.edu (8.11.6/8.11.6) with ESMTP id gASK1Ei05291; Thu, 28 Nov 2002 15:01:14 -0500 (EST) (envelope-from crossd@monica.cs.rpi.edu) Message-Id: <200211282001.gASK1Ei05291@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:36:53 PST." <20021128123653.GN16066@elvis.mu.org> References: <200211281128.gASBS2g04424@monica.cs.rpi.edu> <20021128123550.GM16066@elvis.mu.org> <20021128123653.GN16066@elvis.mu.org> Date: Thu, 28 Nov 2002 15:01:14 -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 > * Alfred Perlstein [021128 04:35] wrote: > > > > 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? > > But seriously, this is a bad practice, it should be using the system > allocator and DTRT. Seriously. This is some very heinous code. If I could figure out an easy way around the fact that a vcache has a vnode in it, and not a vnode pointer, I'd probably start down this road, I'd also need to rip out a considerable amount of AFS code that deals with it having its own VLRU cache, etc. It seems in terms of support from them it makes sense to just play along. -- 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 From owner-freebsd-fs Thu Nov 28 14:36:14 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 434DC37B401 for ; Thu, 28 Nov 2002 14:36:13 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D83F43EB2 for ; Thu, 28 Nov 2002 14:36:12 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 6E0F5AE163; Thu, 28 Nov 2002 14:36:12 -0800 (PST) Date: Thu, 28 Nov 2002 14:36:12 -0800 From: Alfred Perlstein To: "David E. Cross" Cc: freebsd-fs@freebsd.org Subject: Re: openafs question Message-ID: <20021128223612.GP16066@elvis.mu.org> References: <200211281128.gASBS2g04424@monica.cs.rpi.edu> <20021128123550.GM16066@elvis.mu.org> <200211281944.gASJidO05245@monica.cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200211281944.gASJidO05245@monica.cs.rpi.edu> User-Agent: Mutt/1.4i 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 * David E. Cross [021128 11:44] wrote: > > 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: getnewvnode would mark system vnodes (vnodes actually allocated via getnewvnode()) with a flag, then only those vnodes would be candidates for recycling and usage for other filesystems when the vrele calls drop the hold count down to zero. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Nov 29 2:12: 3 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 D885E37B404 for ; Fri, 29 Nov 2002 02:12:01 -0800 (PST) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ABC543EB2 for ; Fri, 29 Nov 2002 02:11:58 -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 FAA94408 for ; Fri, 29 Nov 2002 05:11:51 -0500 (EST) Received: from monica.cs.rpi.edu (crossd@localhost) by monica.cs.rpi.edu (8.11.6/8.11.6) with ESMTP id gATABpU07028 for ; Fri, 29 Nov 2002 05:11:51 -0500 (EST) (envelope-from crossd@monica.cs.rpi.edu) Message-Id: <200211291011.gATABpU07028@monica.cs.rpi.edu> To: fs@freebsd.org Subject: AFS nastiest hack ever question Date: Fri, 29 Nov 2002 05:11:50 -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 Just when I thought I was done ;) Ok.. Quick summary. "afs_symlink" will panic the kernel. The problem is that the symlink syscall expects VOP_SYSCALL to fill in the "vpp" with the vnode of the newly created symlink. AFS doesn't do this, ever, it, internally creates its private vnode, and then calls its own "vput" on it, immediately claiming it back to the system (which is good in some ways since afs vnodes don't play nice with system vnodes). To "fix" this I would need to significantly modify AFS's code. Or... what I have done is to : if (error == 0) { /* success */ vref(dvp); *(ap->vpp)=dvp; } The syscall doesn't really check anything other than the return code, and if its 0 it just vput(9)s the vnode, then it vput(9)s the DVP. What this should do is just have it double decrement the DVP.. which in this case is fine. Problem is I don't think I can make that assumption about other things that may call VOP_SYMLINK(9), not that I imagine there are (m)any. Suggestions for a better/cleaner way to do this? -- 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