From owner-freebsd-stable@FreeBSD.ORG Wed Mar 8 03:11:28 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 5067916A420 for ; Wed, 8 Mar 2006 03:11:28 +0000 (GMT) (envelope-from bc979@lafn.org) Received: from zoot.lafn.org (zoot.lafn.ORG [206.117.18.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C30F43D46 for ; Wed, 8 Mar 2006 03:11:27 +0000 (GMT) (envelope-from bc979@lafn.org) Received: from [10.0.1.2] (pool-71-109-244-179.lsanca.dsl-w.verizon.net [71.109.244.179]) (authenticated bits=0) by zoot.lafn.org (8.13.4/8.13.1) with ESMTP id k283BQJG075246 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 7 Mar 2006 19:11:27 -0800 (PST) (envelope-from bc979@lafn.org) Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: stable@freebsd.org From: Doug Hardie Date: Tue, 7 Mar 2006 19:11:25 -0800 X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: ClamAV 0.88/1318/Tue Mar 7 12:55:18 2006 on zoot.lafn.org X-Virus-Status: Clean Cc: Subject: 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 03:11:28 -0000 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?