home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!gatech!news.byu.edu!ux1!fcom.cc.utah.edu!park.uvcc.edu!ns.novell.com!gateway.novell.com!thisbe.Eng.Sandy.Novell.COM!terry
- From: terry@thisbe.Eng.Sandy.Novell.COM (Terry Lambert)
- Subject: Re: Disk decoding
- Message-ID: <1992Sep8.201159.7986@gateway.novell.com>
- Sender: news@gateway.novell.com (NetNews)
- Nntp-Posting-Host: thisbe.eng.sandy.novell.com
- Organization: Novell NPD -- Sandy, UT
- References: <1992Sep8.183206.248@menudo.uh.edu>
- Date: Tue, 8 Sep 1992 20:11:59 GMT
- Lines: 33
-
- In article <1992Sep8.183206.248@menudo.uh.edu> cavers@menudo.uh.edu (Chris M. Cavers) writes:
- >I would like to decode the information on a unix disk.
- >I am using Sun OS 4.1.2.
- >I am intercepting the block i/o calls at the device driver level.
- >Given a byte offset and a number of bytes to move, I would like to be
- >able to determine which file contains the data.
-
- If you are truly intercepting them, then the blocks should be in a cache
- hung off the vnode (your interception is taking place before they are
- removed from this cache).
-
- You may either traverse the system open file table or the dnlc table to
- identify the inode whose vnode contains a pointer to the block being written.
- The inode will have to be looked up using an ncheck type process, which
- you may do at the device driver level (in an extremely ugly fashion) by
- traversing the directory tree.
-
- I will probably be flamed for suggesting that this be done in the device
- driver; however, using the normal interface will kill you by making those
- blocks show up as well.
-
- Alternately, you can assemble an in core inode/name resoloution list and
- traverse it (assembling it prior to attempting logging of disk I/O).
-
- In any case, there is no pretty way to do this.
-
- Terry Lambert
- terry_lambert@gateway.novell.com
- terry@icarus.weber.edu
-
- ---
- Disclaimer: Any opinions in this posting are my own and not those of
- my present or previous employers.
-