mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
[NTOSKRNL] Implement support for deferred writes in Cc.
Namely, implement CcCanIWrite() (very basic, and likely wrong). And implement CcDeferWrite() which will queue the write operation. In CciLazyWriter() (which may be renamed CcWorkerThread() ;-)), handle the queued write operations one by one. This is likely not to be accurate, but, given we have only on FS supporting this for now (NFS / RDBSS / Shares), this is OK. CORE-14235
This commit is contained in:
parent
07e6e9c9c1
commit
9a07c71eef
3 changed files with 101 additions and 2 deletions
|
@ -41,6 +41,10 @@
|
|||
//
|
||||
extern ULONG CcRosTraceLevel;
|
||||
extern LIST_ENTRY DirtyVacbListHead;
|
||||
extern ULONG CcDirtyPageThreshold;
|
||||
extern ULONG CcTotalDirtyPages;
|
||||
extern LIST_ENTRY CcDeferredWrites;
|
||||
extern KSPIN_LOCK CcDeferredWriteSpinLock;
|
||||
|
||||
typedef struct _PF_SCENARIO_ID
|
||||
{
|
||||
|
@ -193,6 +197,17 @@ typedef struct _ROS_VACB
|
|||
/* Pointer to the next VACB in a chain. */
|
||||
} ROS_VACB, *PROS_VACB;
|
||||
|
||||
typedef struct _ROS_DEFERRED_WRITE_CONTEXT
|
||||
{
|
||||
LIST_ENTRY CcDeferredWritesEntry;
|
||||
PFILE_OBJECT FileObject;
|
||||
PCC_POST_DEFERRED_WRITE PostRoutine;
|
||||
PVOID Context1;
|
||||
PVOID Context2;
|
||||
ULONG BytesToWrite;
|
||||
BOOLEAN Retrying;
|
||||
} ROS_DEFERRED_WRITE_CONTEXT, *PROS_DEFERRED_WRITE_CONTEXT;
|
||||
|
||||
typedef struct _INTERNAL_BCB
|
||||
{
|
||||
/* Lock */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue