Date: Thu, 17 Jan 2008 16:01:48 -0500 From: David Schultz <das@FreeBSD.ORG> To: Adam <urbansnap@gmail.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Reading and Writing to Block from di_spare Message-ID: <20080117210148.GA85323@VARK.MIT.EDU> In-Reply-To: <B0EF8F15-0B65-4C3B-98A0-FADBA4640EED@gmail.com> References: <485228D5-8D0B-4CD5-9FB7-B0D551B172DA@gmail.com> <20080117194457.GA84887@VARK.MIT.EDU> <B0EF8F15-0B65-4C3B-98A0-FADBA4640EED@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080117210148.GA85323>