mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
Added stubs for CC R/W functions (fixes TODO from r32610)
svn path=/trunk/; revision=32611
This commit is contained in:
parent
9948ff11e8
commit
c5caa4ae89
6 changed files with 92 additions and 4 deletions
64
reactos/drivers/filesystems/ntfs/fastio.c
Normal file
64
reactos/drivers/filesystems/ntfs/fastio.c
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 2002 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: drivers/filesystem/ntfs/fastio.c
|
||||
* PURPOSE: NTFS filesystem driver
|
||||
* PROGRAMMER: Pierre Schweitzer
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ntddk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#include "ntfs.h"
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
BOOLEAN NTAPI
|
||||
NtfsAcqLazyWrite(PVOID Context,
|
||||
BOOLEAN Wait)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID NTAPI
|
||||
NtfsRelLazyWrite(PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
BOOLEAN NTAPI
|
||||
NtfsAcqReadAhead(PVOID Context,
|
||||
BOOLEAN Wait)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID NTAPI
|
||||
NtfsRelReadAhead(PVOID Context)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
|
@ -243,8 +243,8 @@ NtfsFCBInitializeCache(PVCB Vcb,
|
|||
CcInitializeCacheMap(FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
NULL,
|
||||
NULL);
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
|
||||
ObDereferenceObject(FileObject);
|
||||
Fcb->Flags |= FCB_CACHE_INITIALIZED;
|
||||
|
|
|
@ -404,8 +404,8 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
|||
CcInitializeCacheMap(DeviceExt->StreamFileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
NULL,
|
||||
NULL);
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
|
||||
ExInitializeResourceLite(&DeviceExt->DirResource);
|
||||
// ExInitializeResourceLite(&DeviceExt->FatResource);
|
||||
|
|
|
@ -72,6 +72,13 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
|||
|
||||
/* Initialize IRP functions array */
|
||||
NtfsInitializeFunctionPointers(DriverObject);
|
||||
|
||||
/* Initialize CC functions array */
|
||||
NtfsGlobalData->CacheMgrCallbacks.AcquireForLazyWrite = NtfsAcqLazyWrite;
|
||||
NtfsGlobalData->CacheMgrCallbacks.ReleaseFromLazyWrite = NtfsRelLazyWrite;
|
||||
NtfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = NtfsAcqReadAhead;
|
||||
NtfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = NtfsRelReadAhead;
|
||||
|
||||
/* Driver can't be unloaded */
|
||||
DriverObject->DriverUnload = NULL;
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ typedef struct
|
|||
ERESOURCE Resource;
|
||||
PDRIVER_OBJECT DriverObject;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
CACHE_MANAGER_CALLBACKS CacheMgrCallbacks;
|
||||
ULONG Flags;
|
||||
} NTFS_GLOBAL_DATA, *PNTFS_GLOBAL_DATA;
|
||||
|
||||
|
@ -401,6 +402,21 @@ NTSTATUS NTAPI
|
|||
NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp);
|
||||
|
||||
/* fastio.c */
|
||||
BOOLEAN NTAPI
|
||||
NtfsAcqLazyWrite(PVOID Context,
|
||||
BOOLEAN Wait);
|
||||
|
||||
VOID NTAPI
|
||||
NtfsRelLazyWrite(PVOID Context);
|
||||
|
||||
BOOLEAN NTAPI
|
||||
NtfsAcqReadAhead(PVOID Context,
|
||||
BOOLEAN Wait);
|
||||
|
||||
VOID NTAPI
|
||||
NtfsRelReadAhead(PVOID Context);
|
||||
|
||||
/* fcb.c */
|
||||
|
||||
PFCB
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<file>create.c</file>
|
||||
<file>dirctl.c</file>
|
||||
<file>dispatch.c</file>
|
||||
<file>fastio.c</file>
|
||||
<file>fcb.c</file>
|
||||
<file>finfo.c</file>
|
||||
<file>fsctl.c</file>
|
||||
|
|
Loading…
Reference in a new issue