[NTOSKRNL] When allocating a new BCB, save it in a list

This list is stored in the shared map. Later, this will allow
reusing BCB when appropriate
This commit is contained in:
Pierre Schweitzer 2018-09-02 14:37:47 +02:00
parent ea5912e4d1
commit e17f61138c
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 25 additions and 1 deletions

View file

@ -172,6 +172,7 @@ typedef struct _ROS_SHARED_CACHE_MAP
CSHORT NodeByteSize;
ULONG OpenCount;
LARGE_INTEGER FileSize;
LIST_ENTRY BcbList;
LARGE_INTEGER SectionSize;
PFILE_OBJECT FileObject;
ULONG DirtyPages;
@ -181,6 +182,7 @@ typedef struct _ROS_SHARED_CACHE_MAP
PVOID LazyWriteContext;
LIST_ENTRY PrivateList;
ULONG DirtyPageThreshold;
KSPIN_LOCK BcbSpinLock;
PRIVATE_CACHE_MAP PrivateCacheMap;
/* ROS specific */
@ -235,6 +237,7 @@ typedef struct _INTERNAL_BCB
BOOLEAN Dirty;
BOOLEAN Pinned;
CSHORT RefCount; /* (At offset 0x34 on WinNT4) */
LIST_ENTRY BcbEntry;
} INTERNAL_BCB, *PINTERNAL_BCB;
typedef struct _LAZY_WRITER