Author: fireball
Date: Fri Mar 7 18:38:43 2008
New Revision: 32604
URL:
http://svn.reactos.org/svn/reactos?rev=3D32604&view=3Drev
Log:
- There is no reason for CDFS to use CcRos-specific functions, it ends up w=
ith the same CcRosInit/Uninit with the same CacheSegmentSize =3D PAGE_SIZE.=
However, CDFS is probably still hardly compatible with a real NT kernel.
Modified:
trunk/reactos/drivers/filesystems/cdfs/cdfs.h
trunk/reactos/drivers/filesystems/cdfs/cleanup.c
trunk/reactos/drivers/filesystems/cdfs/fcb.c
trunk/reactos/drivers/filesystems/cdfs/fsctl.c
trunk/reactos/ntoskrnl/cc/fs.c
Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/c=
dfs/cdfs.h?rev=3D32604&r1=3D32603&r2=3D32604&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/cdfs/cdfs.h (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.h Fri Mar 7 18:38:43 2008
@@ -5,8 +5,6 @@
#include <ntddk.h>
#include <ntddcdrm.h>
#include <ccros.h>
-
-#define USE_ROS_CC_AND_FS
=
#define CDFS_BASIC_SECTOR 2048
#define CDFS_PRIMARY_DESCRIPTOR_LOCATION 16
Modified: trunk/reactos/drivers/filesystems/cdfs/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/c=
dfs/cleanup.c?rev=3D32604&r1=3D32603&r2=3D32604&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/cdfs/cleanup.c (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cleanup.c Fri Mar 7 18:38:43 20=
08
@@ -51,11 +51,7 @@
/* Uninitialize file cache if initialized for this file object. */
if (FileObject->SectionObjectPointer &&
FileObject->SectionObjectPointer=
->SharedCacheMap)
{
-#ifdef USE_ROS_CC_AND_FS
- CcRosReleaseFileCache (FileObject);
-#else
CcUninitializeCacheMap (FileObject, NULL, NULL);
-#endif
}
=
return STATUS_SUCCESS;
Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/c=
dfs/fcb.c?rev=3D32604&r1=3D32603&r2=3D32604&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/cdfs/fcb.c (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fcb.c Fri Mar 7 18:38:43 2008
@@ -241,22 +241,12 @@
Fcb->FileObject =3D FileObject;
Fcb->DevExt =3D Vcb;
=
-#ifdef USE_ROS_AND_FS
- Status =3D CcRosInitializeFileCache(FileObject,
- PAGE_SIZE);
- 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;
@@ -437,22 +427,11 @@
=
if (CdfsFCBIsDirectory(Fcb))
{
-#ifdef USE_ROS_CC_AND_FS
- NTSTATUS Status;
- Status =3D CcRosInitializeFileCache(FileObject,
- PAGE_SIZE);
- if (!NT_SUCCESS(Status))
- {
- DbgPrint("CcRosInitializeFileCache failed\n");
- KEBUGCHECK(0);
- }
-#else
CcInitializeCacheMap(FileObject,
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
FALSE,
NULL,
NULL);
-#endif
Fcb->Flags |=3D FCB_CACHE_INITIALIZED;
}
=
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/c=
dfs/fsctl.c?rev=3D32604&r1=3D32603&r2=3D32604&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/cdfs/fsctl.c (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c Fri Mar 7 18:38:43 2008
@@ -398,21 +398,13 @@
=
Fcb->Entry.ExtentLocationL =3D 0;
Fcb->Entry.DataLengthL =3D (DeviceExt->CdInfo.VolumeSpaceSize + DeviceEx=
t->CdInfo.VolumeOffset) * BLOCKSIZE;
-#ifdef USE_ROS_CC_AND_FS
- Status =3D CcRosInitializeFileCache(DeviceExt->StreamFileObject,
- PAGE_SIZE);
- if (!NT_SUCCESS (Status))
- {
- DbgPrint("CcRosInitializeFileCache failed\n");
- goto ByeBye;
- }
-#else
+
CcInitializeCacheMap(DeviceExt->StreamFileObject,
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
TRUE,
NULL,
NULL);
-#endif
+
ExInitializeResourceLite(&DeviceExt->VcbResource);
ExInitializeResourceLite(&DeviceExt->DirResource);
=
Modified: trunk/reactos/ntoskrnl/cc/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/fs.c?rev=
=3D32604&r1=3D32603&r2=3D32604&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/ntoskrnl/cc/fs.c (original)
+++ trunk/reactos/ntoskrnl/cc/fs.c Fri Mar 7 18:38:43 2008
@@ -87,7 +87,12 @@
IN PVOID LazyWriterContext
)
{
- CcRosInitializeFileCache(FileObject, VACB_MAPPING_GRANULARITY);
+ ASSERT(FileObject);
+ ASSERT(FileSizes);
+
+ /* Call old ROS cache init function */
+ CcRosInitializeFileCache(FileObject,
+ PAGE_SIZE/*VACB_MAPPING_GRANULARITY*/);
}
=
/*