home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3853 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.2 KB

  1. Path: sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!slovax.Eng.Sun.COM!lm
  2. From: lm@slovax.Eng.Sun.COM (Larry McVoy)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: Disk decoding
  5. Date: 9 Sep 1992 02:29:12 GMT
  6. Organization: Sun Microsystems, Inc.  Mt. View, Ca.
  7. Lines: 41
  8. Message-ID: <laqoboINNsqb@appserv.Eng.Sun.COM>
  9. References: <1992Sep8.201159.7986@gateway.novell.com>
  10. NNTP-Posting-Host: slovax
  11.  
  12. To solve this, and other problems, I've always wanted to keep *a* name
  13. of the file in the inode/vnode.  By a name, I mean the last name by
  14. which the file was looked up.  My debugging kernels always have this
  15. but I've been unsuccessful at getting it integrated into the mainstream.
  16.  
  17. terry@thisbe.Eng.Sandy.Novell.COM (Terry Lambert) writes:
  18. : In article <1992Sep8.183206.248@menudo.uh.edu> cavers@menudo.uh.edu (Chris M. Cavers) writes:
  19. : >I would like to decode the information on a unix disk.
  20. : >I am using Sun OS 4.1.2.
  21. : >I am intercepting the block i/o calls at the device driver level.
  22. : >Given a byte offset and a number of bytes to move, I would like to be
  23. : >able to determine which file contains the data. 
  24. : If you are truly intercepting them, then the blocks should be in a cache
  25. : hung off the vnode (your interception is taking place before they are
  26. : removed from this cache).
  27. : You may either traverse the system open file table or the dnlc table to
  28. : identify the inode whose vnode contains a pointer to the block being written.
  29. : The inode will have to be looked up using an ncheck type process, which
  30. : you may do at the device driver level (in an extremely ugly fashion) by
  31. : traversing the directory tree.
  32. : I will probably be flamed for suggesting that this be done in the device
  33. : driver; however, using the normal interface will kill you by making those
  34. : blocks show up as well.
  35. : Alternately, you can assemble an in core inode/name resoloution list and
  36. : traverse it (assembling it prior to attempting logging of disk I/O).
  37. : In any case, there is no pretty way to do this.
  38. :                     Terry Lambert
  39. :                     terry_lambert@gateway.novell.com
  40. :                     terry@icarus.weber.edu
  41. : ---
  42. : Disclaimer:  Any opinions in this posting are my own and not those of
  43. : my present or previous employers.
  44. ---
  45. Larry McVoy            (415) 336-7627             lm@sun.com
  46.