From owner-freebsd-stable@FreeBSD.ORG Wed Mar 8 10:35:11 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A5CA16A420 for ; Wed, 8 Mar 2006 10:35:11 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id C902443D48 for ; Wed, 8 Mar 2006 10:35:10 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 8 Mar 2006 10:35:09 +0000 (GMT) Date: Wed, 8 Mar 2006 10:35:08 +0000 From: David Malone To: Doug Hardie Message-ID: <20060308103508.GA8624@walton.maths.tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: stable@freebsd.org Subject: Re: Inode Usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 10:35:11 -0000 On Tue, Mar 07, 2006 at 07:11:25PM -0800, Doug Hardie wrote: > I am building a tool to identify the file that has a specific LBA. > The approach I am using is to search through each inode from number 2 > up. This approach works well with UFS1 file systems as then > preinitialize all the inodes. However, UFS2 does lazy inode > initialization so there are always some that are basically garbage. > I have not found any relaiable way to determine from the inode > contents if it is in use or not. I suspect that information is in > the inode bit map. However, I haven't found any way to access that. Have a look at the patch I committed to quot last week: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/quot/quot.c.diff?r1=1.23&r2=1.24 David.