home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / admin / 4567 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.7 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!rutgers!cmcl2!GRANNY.CS.NYU.EDU!m-jk8594
  2. From: m-jk8594@GRANNY.CS.NYU.EDU (James Kyriannis)
  3. Newsgroups: comp.unix.admin
  4. Subject: Reading BSD filesystems on a block level
  5. Message-ID: <9208180320.AA00974@GRANNY.CS.NYU.EDU>
  6. Date: 18 Aug 92 03:20:25 GMT
  7. References: <rkz1H02x!8@atlantis.psu.edu>
  8. Sender: daemon@cmcl2.nyu.edu (Mr Background)
  9. Organization: Courant Institute, New York University
  10. Lines: 28
  11.  
  12.  
  13. I'm trying to learn about BSD filesystems, so I decided to write myself a
  14. 'sector editor', which can read in blocks from the filesystem device and let
  15. me view the stuff it finds.  Since I'm running BSD/386, I don't have access
  16. to fsdb or its source, so I don't know how some things were done.
  17.  
  18. fsdb is capable of letting you edit filesystems while they are still
  19. mounted.  How is this done?  I've been using 'open(filesys_fd, buffer)'
  20. to open the block device, but if the filesystem is mounted, this call
  21. returns with a "/dev/sd0a: Device busy" from perror().  Then, how can I
  22. access my filesystem directly, without having to unmount it?  [fsck also
  23. uses the 'open()' method.]
  24.  
  25. Also, I want to be able to lseek() into the filesystem, at increments
  26. the size of one block.  According to usf/fs.h, MINBSIZE is 4096, though
  27. in sys/param.h, MAXBSIZE is 8192.  Further, calling getfsstat() will tell
  28. you that the fundamental filesystem block size (f_fsize) is 1024 bytes.
  29. Which one is the correct size of a BSD Net2 filesystem block?
  30.  
  31. Thanks,
  32.  
  33. Jimmy
  34.  
  35. -- 
  36. =============================================================================
  37.                           |
  38. Jimmy Kyriannis           |  +5 Chain Mail --- don't leave home without it.
  39. m-jk8594@cs.nyu.edu       |
  40.