home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!slovax.Eng.Sun.COM!lm
- From: lm@slovax.Eng.Sun.COM (Larry McVoy)
- Newsgroups: comp.unix.wizards
- Subject: Re: Disk decoding
- Date: 9 Sep 1992 02:29:12 GMT
- Organization: Sun Microsystems, Inc. Mt. View, Ca.
- Lines: 41
- Message-ID: <laqoboINNsqb@appserv.Eng.Sun.COM>
- References: <1992Sep8.201159.7986@gateway.novell.com>
- NNTP-Posting-Host: slovax
-
- To solve this, and other problems, I've always wanted to keep *a* name
- of the file in the inode/vnode. By a name, I mean the last name by
- which the file was looked up. My debugging kernels always have this
- but I've been unsuccessful at getting it integrated into the mainstream.
-
- terry@thisbe.Eng.Sandy.Novell.COM (Terry Lambert) writes:
- : 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.
- ---
- Larry McVoy (415) 336-7627 lm@sun.com
-