home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9829 < prev    next >
Encoding:
Text File  |  1992-09-04  |  2.3 KB  |  51 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.de!chx400!bernina!almesber
  3. From: almesber@nessie.cs.id.ethz.ch (Werner Almesberger)
  4. Subject: MS-DOS FS: FAT corruption bug, the dirty details
  5. Message-ID: <1992Sep4.013803.19351@bernina.ethz.ch>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  8. References: <1992Sep4.003915.18305@bernina.ethz.ch>
  9. Date: Fri, 4 Sep 1992 01:38:03 GMT
  10. Lines: 39
  11.  
  12. This is a short description of the FAT corruption bug mentioned in
  13. the dosfs.8 announcement. People who are using an older version of
  14. the MS-DOS FS should read this in order to find out how to avoid
  15. that problem.
  16.  
  17. The MS-DOS FS uses "inode numbers" to describe the location of the
  18. corresponding directory entry. E.g. the first file in a directory may
  19. have the "inode number" 320, the second 321, etc.
  20.  
  21. The MS-DOS FS also uses a small cache that caches FAT accesses. It is
  22. accessed by a device/inode-number/cluster-number key.
  23.  
  24. Whenever a file is removed, the associated cache entries are
  25. invalidated, because the next file created in the same directory may
  26. occupy the same entry and may therefore inherit the same "inode
  27. number". This matters for regular files that contain holes and for
  28. directory files, because they are accessed on a per cluster basis in
  29. the FS.
  30.  
  31. Unfortunately, I forgot to do this when renaming a file into a
  32. different directory. So if the FAT cache contains references to the
  33. blocks of a file _and_ the file is moved to a different directory
  34. _and_ a new directory (or, to a lesser extent, a new file) is created
  35. in the same directory, it may "inherit" those FAT references to the
  36. blocks of the old file.
  37.  
  38. This bug exists in versions 5, 6 and 7 of the MS-DOS FS. It is fixed
  39. in version 8.
  40.  
  41. If you don't want to upgrade or if you can't, I'd suggest to either
  42. avoid the situation described above or to unmount and re-mount the FS
  43. after the rename. (The FAT cache is invalidated during a umount.)
  44.  
  45. - Werner
  46. -- 
  47.    _________________________________________________________________________
  48.   / Werner Almesberger, ETH Zuerich, CH      almesber@nessie.cs.id.ethz.ch /
  49.  / IFW A44  Tel. +41 1 254 7213                 almesberger@rzvax.ethz.ch /
  50. /_BITNET:_ALMESBER@CZHETH5A__HEPNET/CHADNET:_[20579::]57414::ALMESBERGER_/
  51.