Add FastIO non-support in NTFS

svn path=/trunk/; revision=67501
This commit is contained in:
Pierre Schweitzer 2015-05-01 18:38:10 +00:00
parent b4e21f0b6f
commit e7ad148a6c
3 changed files with 81 additions and 0 deletions

View file

@ -75,4 +75,74 @@ NtfsRelReadAhead(PVOID Context)
UNIMPLEMENTED;
}
BOOLEAN
NTAPI
NtfsFastIoCheckIfPossible(
_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
NtfsFastIoRead(
_In_ PFILE_OBJECT FileObject,
_In_ PLARGE_INTEGER FileOffset,
_In_ ULONG Length,
_In_ BOOLEAN Wait,
_In_ ULONG LockKey,
_Out_ PVOID Buffer,
_Out_ PIO_STATUS_BLOCK IoStatus,
_In_ PDEVICE_OBJECT DeviceObject)
{
DBG_UNREFERENCED_PARAMETER(FileObject);
DBG_UNREFERENCED_PARAMETER(FileOffset);
DBG_UNREFERENCED_PARAMETER(Length);
DBG_UNREFERENCED_PARAMETER(Wait);
DBG_UNREFERENCED_PARAMETER(LockKey);
DBG_UNREFERENCED_PARAMETER(Buffer);
DBG_UNREFERENCED_PARAMETER(IoStatus);
DBG_UNREFERENCED_PARAMETER(DeviceObject);
return FALSE;
}
BOOLEAN
NTAPI
NtfsFastIoWrite(
_In_ PFILE_OBJECT FileObject,
_In_ PLARGE_INTEGER FileOffset,
_In_ ULONG Length,
_In_ BOOLEAN Wait,
_In_ ULONG LockKey,
_In_ PVOID Buffer,
_Out_ PIO_STATUS_BLOCK IoStatus,
_In_ PDEVICE_OBJECT DeviceObject)
{
DBG_UNREFERENCED_PARAMETER(FileObject);
DBG_UNREFERENCED_PARAMETER(FileOffset);
DBG_UNREFERENCED_PARAMETER(Length);
DBG_UNREFERENCED_PARAMETER(Wait);
DBG_UNREFERENCED_PARAMETER(LockKey);
DBG_UNREFERENCED_PARAMETER(Buffer);
DBG_UNREFERENCED_PARAMETER(IoStatus);
DBG_UNREFERENCED_PARAMETER(DeviceObject);
return FALSE;
}
/* EOF */

View file

@ -80,6 +80,12 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
NtfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = NtfsAcqReadAhead;
NtfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = NtfsRelReadAhead;
NtfsGlobalData->FastIoDispatch.SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH);
NtfsGlobalData->FastIoDispatch.FastIoCheckIfPossible = NtfsFastIoCheckIfPossible;
NtfsGlobalData->FastIoDispatch.FastIoRead = NtfsFastIoRead;
NtfsGlobalData->FastIoDispatch.FastIoWrite = NtfsFastIoWrite;
DriverObject->FastIoDispatch = &NtfsGlobalData->FastIoDispatch;
/* Driver can't be unloaded */
DriverObject->DriverUnload = NULL;

View file

@ -136,6 +136,7 @@ typedef struct
PDEVICE_OBJECT DeviceObject;
CACHE_MANAGER_CALLBACKS CacheMgrCallbacks;
ULONG Flags;
FAST_IO_DISPATCH FastIoDispatch;
} NTFS_GLOBAL_DATA, *PNTFS_GLOBAL_DATA;
@ -566,6 +567,10 @@ NtfsAcqReadAhead(PVOID Context,
VOID NTAPI
NtfsRelReadAhead(PVOID Context);
FAST_IO_CHECK_IF_POSSIBLE NtfsFastIoCheckIfPossible;
FAST_IO_READ NtfsFastIoRead;
FAST_IO_WRITE NtfsFastIoWrite;
/* fcb.c */