From owner-freebsd-current@FreeBSD.ORG Thu Jan 17 21:02:09 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DC5916A47A for ; Thu, 17 Jan 2008 21:02:09 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.freebsd.org (Postfix) with ESMTP id 5060E13C4DD for ; Thu, 17 Jan 2008 21:02:08 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.14.2/8.14.1) with ESMTP id m0HL1mDt085435; Thu, 17 Jan 2008 16:01:48 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.14.2/8.14.1/Submit) id m0HL1mnP085434; Thu, 17 Jan 2008 16:01:48 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 17 Jan 2008 16:01:48 -0500 From: David Schultz To: Adam Message-ID: <20080117210148.GA85323@VARK.MIT.EDU> Mail-Followup-To: Adam , freebsd-current@FreeBSD.ORG References: <485228D5-8D0B-4CD5-9FB7-B0D551B172DA@gmail.com> <20080117194457.GA84887@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-current@FreeBSD.ORG Subject: Re: Reading and Writing to Block from di_spare X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2008 21:02:09 -0000 On Thu, Jan 17, 2008, Adam wrote: > David, > I understand that there is no routine to read and write specifically > to an address contained in the di_spare. I also understand that > di_spare is currently unused and has no specific manipulators. > > Allow me to clarify. I am looking for a way to take a ufs2_daddr_t > (which is neither a direct nor indirect block of a di_node) and read/ > write to that address. To do it cleanly you'd probably need to hack ufs_bmap and ffs_balloc to map your 'extra' block to a particular LBN (or at least that's the only way I know how to do it easily.) But as I said before, if you just need to store a small amount of information, extended attributes are most likely a much simpler alternative.