A free Windows-compatible Operating System - mirrored from GitHub
Find a file
Filip Navara a9f6cf2b6c - Change all FAT*FindAvailableCluster functions to new functions
FAT*FindAndMarkAvailableCluster which have incorporated the setting of
  EOF marker in the File Allocation Table for the returned cluster.

- Rewritten FAT32CountAvailableClusters, FAT32FindAndMarkAvailableCluster,
  FAT16CountAvailableClusters and FAT16FindAndMarkAvailableCluster for
  better performance. These functions were using one big loop for traversing
  the FAT and had a block of code in the loop for requesting cache manger
  for next chunk of FAT *if necessary* (which commonly wasn't the case).
  Now it's changed to request always a whole FAT chunk and process it at once
  in a nested loop.

- Cache last offset + cluster pair while reading/writing from/to file. This
  ensures almost linear times when doing sequential reads/writes, because the
  whole FAT traversing for the file is not done again for every request.
  Previously there was code for this, but it was neither correctly used
  nor working. It stored the last offset + cluster pair in file CCB structure
  (that is unique for each opened file handle) and not FCB structure (which
  is shared among all instances of the same file). This resulted in
  inconsistent cluster + offset number when the file allocation chain was
  changed (eg. by enlarging/shrinking the file), but since the cached offsets
  weren't actully used it went unnoticed.

- Remove old hack from NextCluster and fix the call to it in VfatAddEntry.
  Not much to say about it, there was an temporary hack in NextCluster and
  with fixed VfatAddEntry it's now no longer needed.

- Add pointers to WriteCluster, FindAndMarkAvailableCluster and
  GetNextCluster functions to device extension (set during mount) and use
  them at appropriate locations. This avoids some nasty if's in the code
  and causes some unnoticable performance improvment in the low-level
  FAT code.

- Lock the directory FCB in VfatAddEntry while modifying it. This should
  propably be done on more places, but it needs more investigations.

- Increase the file cache allocation size in VfatRead/VfatWrite. It boosts
  the overall speed of the driver a lot.

svn path=/trunk/; revision=10344
2004-08-01 21:57:18 +00:00
freeldr Detect parallel ports. 2004-06-21 12:23:01 +00:00
msvc6 Initial revision 2004-02-06 08:21:52 +00:00
os2 neu 2004-01-31 01:29:11 +00:00
posix Ignore map file. 2004-01-20 20:44:30 +00:00
reactos - Change all FAT*FindAvailableCluster functions to new functions 2004-08-01 21:57:18 +00:00
rosapps change to zoomin Makefile to get it compiling, and enable touch, genguid, zoomin, winemine, kill, tcat, and tlist - patch by Travis Snoozy <ai2097@yahoo.com> 2004-06-02 02:27:04 +00:00