From owner-freebsd-fs Wed Aug 7 17:38:35 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 8415937B400 for ; Wed, 7 Aug 2002 17:38:33 -0700 (PDT) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5A6343E72 for ; Wed, 7 Aug 2002 17:38:32 -0700 (PDT) (envelope-from guptar@cs.rpi.edu) Received: from dishwasher.cs.rpi.edu (dishwasher.cs.rpi.edu [128.213.7.23]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id UAA55571; Wed, 7 Aug 2002 20:38:31 -0400 (EDT) Received: from localhost (guptar@localhost) by dishwasher.cs.rpi.edu (8.11.6+Sun/8.9.3) with ESMTP id g780cVw24074; Wed, 7 Aug 2002 20:38:31 -0400 (EDT) X-Authentication-Warning: dishwasher.cs.rpi.edu: guptar owned process doing -bs Date: Wed, 7 Aug 2002 20:38:31 -0400 (EDT) From: Rashim Gupta To: Terry Lambert Cc: "David E. Cross" , Subject: Re: vnodes (UFS journaling)? In-Reply-To: <3D51A6A3.87B90E3B@mindspring.com> 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 we are trying to implement a logging facility for the File System. Hence we need to open the log file and keep its vnode open throughout the duration while the system is mounted. Hence, we cannot free the vnode after searching for it using the root file system since we need to access it later on. However, if we do not return the vnode, then doing an "ls -al" in the dirctory where the log file is present hangs the kernel. Any suggestions how we can solve this problem. Thanks Rashim Gupta On Wed, 7 Aug 2002, Terry Lambert wrote: > "David E. Cross" wrote: > > Ok, we've noticed an "unfortunate" side-effect of our work. We leak data > > (part of the journal shows up in other files). I think it is because > > of our handling of the vnode, and it being reused for other files (as > > oppsoed to trashing memory, etc. The entries it writes in the files are > > valid). We've tried _not_ calling vput(jvp) on it after the initial > > open but then any access to the file hangs the kernel (in inode). How > > can we say "don't reuse this" but allow other people to access it? > > Wow. This is an incredibly opaque question. > > The normal way you prevent reuse is "don't give it back to the > system in the first place, and it won't get given to someone > else *by* the system". > > The normal way you make someone's reference to it "stale" is > "assign deadops to it". > > Under no circumstances should you give it back to the system > while there are references to it at all. > > What is it that you are trying to do with the vnode? > > -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message