Author: hpoussin
Date: Sun Sep 6 18:43:03 2009
New Revision: 43005
URL:
http://svn.reactos.org/svn/reactos?rev=43005&view=rev
Log:
Remove code dealing with FAT cache. It is never used
Modified:
trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c
trunk/reactos/boot/freeldr/freeldr/fs/fat.c
Modified: trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c [iso-8859-1] Sun Sep 6 18:43:03
2009
@@ -16,7 +16,6 @@
PVOID gRamDiskBase;
ULONG gRamDiskSize;
-extern BOOLEAN gCacheEnabled;
/* FUNCTIONS ******************************************************************/
@@ -174,11 +173,6 @@
MachVtbl.DiskGetCacheableBlockCount = RamDiskGetCacheableBlockCount;
//
- // Also disable cached FAT reads
- //
- gCacheEnabled = FALSE;
-
- //
// Switch to ramdisk boot partition
//
BootDrive = 0x49;
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Sun Sep 6 18:43:03 2009
@@ -35,8 +35,6 @@
BOOLEAN FatReadPartialCluster(ULONG ClusterNumber, ULONG StartingOffset, ULONG Length,
PVOID Buffer);
BOOLEAN FatReadFile(PFAT_FILE_INFO FatFileInfo, ULONG BytesToRead, ULONG* BytesRead,
PVOID Buffer);
BOOLEAN FatReadVolumeSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount,
PVOID Buffer);
-
-BOOLEAN gCacheEnabled = FALSE;
ULONG BytesPerSector; /* Number of bytes per sector */
ULONG SectorsPerCluster; /* Number of sectors per cluster */
@@ -350,30 +348,6 @@
}
MmHeapFree(FatVolumeBootSector);
- if (gCacheEnabled)
- {
- //
- // Initialize the disk cache for this drive
- //
- if (!CacheInitializeDrive(DriveNumber))
- {
- return FALSE;
- }
-
- //
- // Force the FAT sectors into the cache
- // as long as it is FAT12 or FAT16. FAT32 can
- // have a multi-megabyte FAT so we don't want that.
- //
- if (FatType != FAT32 && FatType != FATX32)
- {
- if (!CacheForceDiskSectorsIntoCache(DriveNumber, ActiveFatSectorStart,
SectorsPerFat))
- {
- return FALSE;
- }
- }
- }
- else
{
GEOMETRY DriveGeometry;
ULONG BlockSize;
@@ -1379,24 +1353,17 @@
BOOLEAN FatReadVolumeSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount,
PVOID Buffer)
{
- if (gCacheEnabled)
- {
- return CacheReadDiskSectors(DriveNumber, SectorNumber + FatVolumeStartSector,
SectorCount, Buffer);
- }
- else
- {
- // Now try to read in the block
- if (!MachDiskReadLogicalSectors(DriveNumber, SectorNumber + FatVolumeStartSector,
SectorCount, (PVOID)DISKREADBUFFER))
- {
- return FALSE;
- }
-
- // Copy data to the caller
- RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, SectorCount * BytesPerSector);
-
- // Return success
- return TRUE;
- }
+ // Now try to read in the block
+ if (!MachDiskReadLogicalSectors(DriveNumber, SectorNumber + FatVolumeStartSector,
SectorCount, (PVOID)DISKREADBUFFER))
+ {
+ return FALSE;
+ }
+
+ // Copy data to the caller
+ RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, SectorCount * BytesPerSector);
+
+ // Return success
+ return TRUE;
}
LONG FatClose(ULONG FileId)