Author: fireball
Date: Sat Mar 8 13:14:41 2008
New Revision: 32610
URL:
http://svn.reactos.org/svn/reactos?rev=3D32610&view=3Drev
Log:
- Remove ros-specific Cc functions usage.
- TODO: Provide callbacks for lazy writer and read ahead when calling CcIni=
tializeCacheMap. Could be done similar to r32607 for CDFS.
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
trunk/reactos/drivers/filesystems/ntfs/fsctl.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/n=
tfs/fcb.c?rev=3D32610&r1=3D32609&r2=3D32610&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c Sat Mar 8 13:14:41 2008
@@ -152,11 +152,7 @@
if (Fcb->RefCount <=3D 0 && !NtfsFCBIsDirectory(Fcb))
{
RemoveEntryList(&Fcb->FcbListEntry);
-#ifdef USE_ROS_CC_AND_FS
- CcRosReleaseFileCache(Fcb->FileObject);
-#else
CcUninitializeCacheMap (Fcb->FileObject, NULL, NULL);
-#endif
NtfsDestroyFCB(Fcb);
}
KeReleaseSpinLock(&Vcb->FcbListLock, oldIrql);
@@ -242,22 +238,14 @@
newCCB->PtrFileObject =3D FileObject;
Fcb->FileObject =3D FileObject;
Fcb->DevExt =3D Vcb;
-#ifdef ROS_USE_CC_AND_FS
- Status =3D CcRosInitializeFileCache(FileObject,
- CACHEPAGESIZE(Vcb));
- if (!NT_SUCCESS(Status))
- {
- DbgPrint("CcRosInitializeFileCache failed\n");
- KEBUGCHECK(0);
- }
-#else
+
Status =3D STATUS_SUCCESS;
CcInitializeCacheMap(FileObject,
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
FALSE,
NULL,
NULL);
-#endif
+
ObDereferenceObject(FileObject);
Fcb->Flags |=3D FCB_CACHE_INITIALIZED;
=
@@ -419,22 +407,12 @@
=
if (!(Fcb->Flags & FCB_CACHE_INITIALIZED))
{
-#ifdef ROS_USE_CC_AND_FS
- NTSTATUS Status;
- Status =3D CcRosInitializeFileCache(FileObject,
- CACHEPAGESIZE(Vcb));
- if (!NT_SUCCESS(Status))
- {
- DbgPrint("CcRosInitializeFileCache failed\n");
- KEBUGCHECK(0);
- }
-#else
- CcInitializeCacheMap(FileObject,
- (PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
- FALSE,
- NULL,
- NULL);
-#endif
+ CcInitializeCacheMap(FileObject,
+ (PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
+ FALSE,
+ NULL,
+ NULL);
+
Fcb->Flags |=3D FCB_CACHE_INITIALIZED;
}
=
Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/n=
tfs/fsctl.c?rev=3D32610&r1=3D32609&r2=3D32610&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/drivers/filesystems/ntfs/fsctl.c (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c Sat Mar 8 13:14:41 2008
@@ -400,21 +400,13 @@
=
// Fcb->Entry.ExtentLocationL =3D 0;
// Fcb->Entry.DataLengthL =3D DeviceExt->CdInfo.VolumeSpaceSize * BLOCKSI=
ZE;
-#ifdef ROS_USE_CC_AND_FS
- Status =3D CcRosInitializeFileCache(DeviceExt->StreamFileObject,
- CACHEPAGESIZE(DeviceExt));
- if (!NT_SUCCESS (Status))
- {
- DbgPrint("CcRosInitializeFileCache() failed (Status %lx)\n", Status);
- goto ByeBye;
- }
-#else
+
CcInitializeCacheMap(DeviceExt->StreamFileObject,
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
FALSE,
NULL,
NULL);
-#endif
+
ExInitializeResourceLite(&DeviceExt->DirResource);
// ExInitializeResourceLite(&DeviceExt->FatResource);
=
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/n=
tfs/ntfs.h?rev=3D32610&r1=3D32609&r2=3D32610&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h Sat Mar 8 13:14:41 2008
@@ -5,8 +5,6 @@
#include <ntddk.h>
#include <ntdddisk.h>
#include <ccros.h>
-
-#define USE_ROS_CC_AND_FS
=
#define CACHEPAGESIZE(pDeviceExt) \
((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \