home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3845 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.unix.wizards
  2. 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
  3. From: terry@thisbe.Eng.Sandy.Novell.COM (Terry Lambert)
  4. Subject: Re: Disk decoding
  5. Message-ID: <1992Sep8.201159.7986@gateway.novell.com>
  6. Sender: news@gateway.novell.com (NetNews)
  7. Nntp-Posting-Host: thisbe.eng.sandy.novell.com
  8. Organization: Novell NPD -- Sandy, UT
  9. References: <1992Sep8.183206.248@menudo.uh.edu>
  10. Date: Tue, 8 Sep 1992 20:11:59 GMT
  11. Lines: 33
  12.  
  13. In article <1992Sep8.183206.248@menudo.uh.edu> cavers@menudo.uh.edu (Chris M. Cavers) writes:
  14. >I would like to decode the information on a unix disk.
  15. >I am using Sun OS 4.1.2.
  16. >I am intercepting the block i/o calls at the device driver level.
  17. >Given a byte offset and a number of bytes to move, I would like to be
  18. >able to determine which file contains the data. 
  19.  
  20. If you are truly intercepting them, then the blocks should be in a cache
  21. hung off the vnode (your interception is taking place before they are
  22. removed from this cache).
  23.  
  24. You may either traverse the system open file table or the dnlc table to
  25. identify the inode whose vnode contains a pointer to the block being written.
  26. The inode will have to be looked up using an ncheck type process, which
  27. you may do at the device driver level (in an extremely ugly fashion) by
  28. traversing the directory tree.
  29.  
  30. I will probably be flamed for suggesting that this be done in the device
  31. driver; however, using the normal interface will kill you by making those
  32. blocks show up as well.
  33.  
  34. Alternately, you can assemble an in core inode/name resoloution list and
  35. traverse it (assembling it prior to attempting logging of disk I/O).
  36.  
  37. In any case, there is no pretty way to do this.
  38.  
  39.                     Terry Lambert
  40.                     terry_lambert@gateway.novell.com
  41.                     terry@icarus.weber.edu
  42.  
  43. ---
  44. Disclaimer:  Any opinions in this posting are my own and not those of
  45. my present or previous employers.
  46.