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