From owner-freebsd-fs Fri Dec 6 17:11:27 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 4BD0837B406 for ; Fri, 6 Dec 2002 17:11:26 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7DD843EA9 for ; Fri, 6 Dec 2002 17:11:25 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gB71BEBF003661; Fri, 6 Dec 2002 20:11:15 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Fri, 6 Dec 2002 20:11:14 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: "David E. Cross" Cc: fs@freebsd.org Subject: Re: AFS nastiest hack ever question In-Reply-To: <200211291011.gATABpU07028@monica.cs.rpi.edu> Message-ID: 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, 29 Nov 2002, David E. Cross wrote: > 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 OpenAFS has its own vnode handling for the reclaim of the vnode by the OS when its reference count drops to 0, it should be able to handle the consumer of VOP_SYMLINK() returning the reference just fine. This would be no different than the consumer of namei() returning the vnode when it isn't needed. I'd probably just #if 0 the vput in the OpenAFS code. As you observe, our VFS assumes that you do return the vnode so that you can perform race-free operations on the symlink, for better or for worse... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message