[CDFS]
authorPierre Schweitzer <pierre@reactos.org>
Fri, 1 May 2015 17:45:16 +0000 (17:45 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 1 May 2015 17:45:16 +0000 (17:45 +0000)
No, FastIo is not possible!

svn path=/trunk/; revision=67500

reactos/drivers/filesystems/cdfs/cdfs.c
reactos/drivers/filesystems/cdfs/cdfs.h

index 77dc734..9aa1412 100644 (file)
@@ -100,6 +100,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
         CdfsDeviceControl;
 
     CdfsGlobalData->FastIoDispatch.SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH);
+    CdfsGlobalData->FastIoDispatch.FastIoCheckIfPossible = CdfsFastIoCheckIfPossible;
     CdfsGlobalData->FastIoDispatch.FastIoRead = CdfsFastIoRead;
     CdfsGlobalData->FastIoDispatch.FastIoWrite = CdfsFastIoWrite;
     DriverObject->FastIoDispatch = &CdfsGlobalData->FastIoDispatch;
@@ -147,6 +148,30 @@ CdfsReleaseFromLazyWrite(IN PVOID Context)
     ExReleaseResourceLite(&(Fcb->MainResource));
 }
 
+BOOLEAN
+NTAPI
+CdfsFastIoCheckIfPossible(
+    _In_ PFILE_OBJECT FileObject,
+    _In_ PLARGE_INTEGER FileOffset,
+    _In_ ULONG Length,
+    _In_ BOOLEAN Wait,
+    _In_ ULONG LockKey,
+    _In_ BOOLEAN CheckForReadOperation,
+    _Out_ PIO_STATUS_BLOCK IoStatus,
+    _In_ PDEVICE_OBJECT DeviceObject)
+{
+    /* Deny FastIo */
+    UNREFERENCED_PARAMETER(FileObject);
+    UNREFERENCED_PARAMETER(FileOffset);
+    UNREFERENCED_PARAMETER(Length);
+    UNREFERENCED_PARAMETER(Wait);
+    UNREFERENCED_PARAMETER(LockKey);
+    UNREFERENCED_PARAMETER(CheckForReadOperation);
+    UNREFERENCED_PARAMETER(IoStatus);
+    UNREFERENCED_PARAMETER(DeviceObject);
+    return FALSE;
+}
+
 BOOLEAN
 NTAPI
 CdfsFastIoRead(
index 67ce0f3..5ece03a 100644 (file)
@@ -481,6 +481,7 @@ CdfsAcquireForLazyWrite(IN PVOID Context,
 VOID NTAPI
 CdfsReleaseFromLazyWrite(IN PVOID Context);
 
+FAST_IO_CHECK_IF_POSSIBLE CdfsFastIoCheckIfPossible;
 FAST_IO_READ CdfsFastIoRead;
 FAST_IO_WRITE CdfsFastIoWrite;