From owner-freebsd-stable@FreeBSD.ORG Wed Mar 8 07:42:50 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 4B15816A420 for ; Wed, 8 Mar 2006 07:42:50 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1022B43D45 for ; Wed, 8 Mar 2006 07:42:49 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from foo.antimatter.net (cpe-72-132-244-217.san.res.rr.com [72.132.244.217]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id k288CWg1021678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Mar 2006 00:12:32 -0800 X-MailKey: purple frogs are falling from the sky Message-Id: <7.0.1.0.2.20060307233951.095f5538@antimatter.net> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Tue, 07 Mar 2006 23:41:37 -0800 To: Doug Hardie , stable@freebsd.org From: Glenn Dawson In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: 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 07:42:50 -0000 At 07:11 PM 3/7/2006, 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. >Nothing in ffs.h seems to fit the need. Is there a way to tell if >inode x is initialized or in use? I believe there are macros for that in sys/ufs/ffs/fs.h. Also, the source for dumpfs probably has good examples of how to use them. -Glenn >_______________________________________________ >freebsd-stable@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-stable >To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"