From owner-freebsd-fs Mon Oct 26 11:35:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA12497 for freebsd-fs-outgoing; Mon, 26 Oct 1998 11:35:29 -0800 (PST) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA12490 for ; Mon, 26 Oct 1998 11:35:27 -0800 (PST) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id MAA03470; Mon, 26 Oct 1998 12:34:27 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp03.primenet.com, id smtpd003423; Mon Oct 26 12:34:22 1998 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id MAA16077; Mon, 26 Oct 1998 12:34:19 -0700 (MST) From: Terry Lambert Message-Id: <199810261934.MAA16077@usr04.primenet.com> Subject: Re: deadfs in FreeBSD 3.0/current ? To: lha@e.kth.se (Love) Date: Mon, 26 Oct 1998 19:34:19 +0000 (GMT) Cc: michaelh@cet.co.jp, freebsd-fs@FreeBSD.ORG, kom-arla@stacken.kth.se In-Reply-To: from "Love" at Oct 25, 98 04:21:08 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > Should we bake our own dead_vnodeops_p that is really dead vnodes ? > > > > I don't know. > > I think we dont talk about the same thing. > > All I want is a vnodeops that dead, they shouldn't do anything. We thought > that dead_vnodeops_p was written just for this, guess we was wrong. Basically, this is a revocation operation, wherein it is not possible to unwind state because the revoking entity does not own its own vnode management. > We dont want to do any special vnode management. The problem is that you are attempting the revocation at a layer that is incorrect, given the implementation of a revoked object as an instance of the object relocated to another FS type. Really, with the existance of "deadfs" instead of a "VINALID" flag inspection by upper level code, there's no way to avoid this. The one way might be to lock the vnode and bounce it up to a higher layer for invalidation/discard. > I consider it a bug if on of the vnodeops make the vfs sleep forever. It's a bug; it's just not where you think it is. > > Anyway, that's one idea. Maybe the Coda magic isn't so bad. > > I don't think to. Guess that we will build our own deadvnodeops. I would actually avoid this, if possible. It just complicates things more. Really, I'd say you should design as if deadfs did not exist, and bounce the operation to a higher level. To do the FS specific code that you must be doing in the invalidation case, you need to implement an ioctl or fcntl covert path so that the upper level can notify you to do the cleanup. If the vnode is locked before return (all vnodes *should* be locked at all times below the vnode operations call boundary, but aren't) then there is no danger of a race between an unlock and the ioctl/fcntl covert channel, and another process that is attempting to use the cached object (the cache in this case is any struct file reference to the now invalid vnode). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message