/* GLOBALS *******************************************************************/
+extern ULONG CcFastReadNotPossible;
extern ULONG CcFastReadResourceMiss;
+extern ULONG CcFastReadWait;
extern ULONG CcFastReadNoWait;
/* FUNCTIONS *****************************************************************/
*
* NOTE
* From Bo Branten's ntifs.h v12.
- *
+ *
* @unimplemented
*/
BOOLEAN
* ARGUMENTS
*
* RETURN VALUE
- *
+ *
* NOTE
* From Bo Branten's ntifs.h v12.
*
* ARGUMENTS
*
* RETURN VALUE
- *
+ *
* @implemented
*/
NTSTATUS
ULONG Length;
PDEVICE_OBJECT DeviceObject;
PFAST_IO_DISPATCH FastDispatch;
-
+
/* Get Device Object and Fast Calls */
DeviceObject = IoGetRelatedDeviceObject(FileObject);
FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
-
+
/* Check if we support Fast Calls, and check this one */
- if (FastDispatch && FastDispatch->FastIoQueryStandardInfo)
+ if (FastDispatch && FastDispatch->FastIoQueryStandardInfo)
{
/* Fast Path */
- FastDispatch->FastIoQueryStandardInfo(FileObject,
+ FastDispatch->FastIoQueryStandardInfo(FileObject,
TRUE,
&Info,
&IoStatusBlock,
&Info,
&Length);
}
-
+
/* Check success */
if (NT_SUCCESS(Status))
{
{
PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
PFAST_IO_DISPATCH FastDispatch;
-
+
/* Get Device Object and Fast Calls */
DeviceObject = IoGetRelatedDeviceObject(FileObject);
FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
-
+
/* Check if we support Fast Calls, and check this one */
if (FastDispatch && FastDispatch->MdlRead)
{
IoStatus,
DeviceObject);
}
-
+
/* Get the Base File System (Volume) and Fast Calls */
BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
-
+
/* If the Base Device Object has its own FastDispatch Routine, fail */
- if (FastDispatch && FastDispatch->MdlRead &&
+ if (FastDispatch && FastDispatch->MdlRead &&
BaseDeviceObject != DeviceObject)
{
return FALSE;
}
-
+
/* No fast path, use slow path */
return FsRtlMdlReadDev(FileObject,
FileOffset,
*
* @implemented
*/
-BOOLEAN
+BOOLEAN
STDCALL
FsRtlMdlReadComplete(IN PFILE_OBJECT FileObject,
IN OUT PMDL MdlChain)
{
PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
PFAST_IO_DISPATCH FastDispatch;
-
+
/* Get Device Object and Fast Calls */
DeviceObject = IoGetRelatedDeviceObject(FileObject);
FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
-
+
/* Check if we support Fast Calls, and check this one */
if (FastDispatch && FastDispatch->MdlReadComplete)
{
MdlChain,
DeviceObject);
}
-
+
/* Get the Base File System (Volume) and Fast Calls */
BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
-
+
/* If the Base Device Object has its own FastDispatch Routine, fail */
- if (FastDispatch && FastDispatch->MdlReadComplete &&
+ if (FastDispatch && FastDispatch->MdlReadComplete &&
BaseDeviceObject != DeviceObject)
{
return FALSE;
}
-
+
/* No fast path, use slow path */
return FsRtlMdlReadCompleteDev(FileObject, MdlChain, DeviceObject);
}
{
PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
PFAST_IO_DISPATCH FastDispatch;
-
+
/* Get Device Object and Fast Calls */
DeviceObject = IoGetRelatedDeviceObject(FileObject);
FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
-
+
/* Check if we support Fast Calls, and check this one */
if (FastDispatch && FastDispatch->MdlWriteComplete)
{
MdlChain,
DeviceObject);
}
-
+
/* Get the Base File System (Volume) and Fast Calls */
BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
-
+
/* If the Base Device Object has its own FastDispatch Routine, fail */
- if (FastDispatch && FastDispatch->MdlWriteComplete &&
+ if (FastDispatch && FastDispatch->MdlWriteComplete &&
BaseDeviceObject != DeviceObject)
{
return FALSE;
}
-
+
/* No fast path, use slow path */
- return FsRtlMdlWriteCompleteDev(FileObject,
- FileOffset,
- MdlChain,
+ return FsRtlMdlWriteCompleteDev(FileObject,
+ FileOffset,
+ MdlChain,
DeviceObject);
}
* FsRtlMdlWriteCompleteDev@16
*
* DESCRIPTION
- *
+ *
* ARGUMENTS
*
* RETURN VALUE
{
PDEVICE_OBJECT DeviceObject, BaseDeviceObject;
PFAST_IO_DISPATCH FastDispatch;
-
+
/* Get Device Object and Fast Calls */
DeviceObject = IoGetRelatedDeviceObject(FileObject);
FastDispatch = DeviceObject->DriverObject->FastIoDispatch;
-
+
/* Check if we support Fast Calls, and check this one */
if (FastDispatch && FastDispatch->PrepareMdlWrite)
{
IoStatus,
DeviceObject);
}
-
+
/* Get the Base File System (Volume) and Fast Calls */
BaseDeviceObject = IoGetBaseFileSystemDeviceObject(FileObject);
FastDispatch = BaseDeviceObject->DriverObject->FastIoDispatch;
-
+
/* If the Base Device Object has its own FastDispatch Routine, fail */
- if (FastDispatch && FastDispatch->PrepareMdlWrite &&
+ if (FastDispatch && FastDispatch->PrepareMdlWrite &&
BaseDeviceObject != DeviceObject)
{
return FALSE;
}
-
+
/* No fast path, use slow path */
return FsRtlPrepareMdlWriteDev(FileObject,
FileOffset,
* FsRtlPrepareMdlWriteDev@28
*
* DESCRIPTION
- *
+ *
* ARGUMENTS
*
* RETURN VALUE