[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#ifndef _RXFCBTABLE_
|
|
|
|
#define _RXFCBTABLE_
|
|
|
|
|
|
|
|
typedef struct _RX_FCB_TABLE_ENTRY {
|
|
|
|
NODE_TYPE_CODE NodeTypeCode;
|
|
|
|
NODE_BYTE_SIZE NodeByteSize;
|
|
|
|
ULONG HashValue;
|
|
|
|
UNICODE_STRING Path;
|
|
|
|
LIST_ENTRY HashLinks;
|
|
|
|
LONG Lookups;
|
|
|
|
} RX_FCB_TABLE_ENTRY, *PRX_FCB_TABLE_ENTRY;
|
|
|
|
|
|
|
|
#define RX_FCB_TABLE_NUMBER_OF_HASH_BUCKETS 32
|
|
|
|
|
|
|
|
typedef struct _RX_FCB_TABLE
|
|
|
|
{
|
|
|
|
NODE_TYPE_CODE NodeTypeCode;
|
|
|
|
NODE_BYTE_SIZE NodeByteSize;
|
|
|
|
volatile ULONG Version;
|
|
|
|
BOOLEAN CaseInsensitiveMatch;
|
|
|
|
USHORT NumberOfBuckets;
|
|
|
|
volatile LONG Lookups;
|
|
|
|
volatile LONG FailedLookups;
|
|
|
|
volatile LONG Compares;
|
|
|
|
ERESOURCE TableLock;
|
|
|
|
PRX_FCB_TABLE_ENTRY TableEntryForNull;
|
|
|
|
LIST_ENTRY HashBuckets[RX_FCB_TABLE_NUMBER_OF_HASH_BUCKETS];
|
|
|
|
} RX_FCB_TABLE, *PRX_FCB_TABLE;
|
|
|
|
|
|
|
|
VOID
|
|
|
|
RxInitializeFcbTable(
|
|
|
|
_Inout_ PRX_FCB_TABLE FcbTable,
|
|
|
|
_In_ BOOLEAN CaseInsensitiveMatch);
|
|
|
|
|
[RXCE]
- Implemented RxCompleteSrvOpenKeyAssociation(), RxInitiateSrvOpenKeyAssociation(), RxProcessChangeBufferingStateRequests()
- Implemented RxFinalizeFcbTable(), RxFinalizeNetFobx(), RxFinalizeNetRoot(), RxFinalizeSrvCall(), RxFinalizeVNetRoot(), RxFreeObject(), RxpDestroySrvCall(), RxRemovePrefixTableEntry(), RxRemoveVirtualNetRootFromNetRoot(), RxScavengeRelatedFobxs(), RxTearDownBufferingManager(), RxUndoScavengerFinalizationMarking()
- Implemented RxPostToWorkerThread()
- Implemented RxFlushFcbInSystemCache(), RxPurgeFcb(), RxPurgeFcbInSystemCache()
- Stubbed RxOrphanSrvOpens(), RxpDiscardChangeBufferingStateRequests(), RxpDispatchChangeBufferingStateRequests(), RxpProcessChangeBufferingStateRequests()
- Continued implementation of RxDereference() so that it supports more objects than just SRV_CALL
- Reworked RxInsertWorkQueueItem() implementation so that it accepts any work item, and not just dispatch work items
- Finished implementation of RxTableLookupName() so that it properly returns a V_NET_ROOT on NET_ROOT match
Notable effects of this commit are:
- RXCE/RDBSS leak less memory; now objects without references are properly deleted from the system
- This means that stale objects are also deleted; this fixes CORE-13483 were same stale SRV_CALL was used again and again
- Because in prefix table NET_ROOT are correctly handled, it's now possible to mount several path from the same prefix; this fixes CORE-13482
CORE-8204
CORE-11327
CORE-13482
CORE-13483
svn path=/trunk/; revision=75195
2017-06-25 11:55:37 +00:00
|
|
|
VOID
|
|
|
|
RxFinalizeFcbTable(
|
|
|
|
_Inout_ PRX_FCB_TABLE FcbTable);
|
|
|
|
|
[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
PFCB
|
|
|
|
RxFcbTableLookupFcb(
|
|
|
|
_In_ PRX_FCB_TABLE FcbTable,
|
|
|
|
_In_ PUNICODE_STRING Path);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
RxFcbTableInsertFcb(
|
|
|
|
_Inout_ PRX_FCB_TABLE FcbTable,
|
|
|
|
_Inout_ PFCB Fcb);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
RxFcbTableRemoveFcb(
|
|
|
|
_Inout_ PRX_FCB_TABLE FcbTable,
|
|
|
|
_Inout_ PFCB Fcb);
|
|
|
|
|
|
|
|
#define RxAcquireFcbTableLockShared(T, W) ExAcquireResourceSharedLite(&(T)->TableLock, W)
|
|
|
|
#define RxAcquireFcbTableLockExclusive(T, W) ExAcquireResourceExclusiveLite(&(T)->TableLock, W)
|
|
|
|
#define RxReleaseFcbTableLock(T) ExReleaseResourceLite(&(T)->TableLock)
|
|
|
|
|
|
|
|
#define RxIsFcbTableLockExclusive(T) ExIsResourceAcquiredExclusiveLite(&(T)->TableLock)
|
|
|
|
|
2017-07-26 19:57:50 +00:00
|
|
|
#define RxIsFcbTableLockAcquired(T) (ExIsResourceAcquiredSharedLite(&(T)->TableLock) || \
|
|
|
|
ExIsResourceAcquiredExclusiveLite(&(T)->TableLock))
|
|
|
|
|
[RDBSS]
[RXCE]
[DDK]
Add an initial implementation of the RXCE and RDBSS libraries that are used to implement mini-redirectors
The associated headers are also added to DDK
The implementation is partial (really!) and is only working for read-only operations.
It leaks memory as hell (no refcounting implemented) and thus, objects freeing is not implemented.
It was tested with NFS41 driver. With such RDBSS, it's possible for the driver to mount a remote share, to list
files, to query their properties, to query volume properties, and finally to read files (with some corruption under
specific conditions).
Please refrain from committing in this (especially for modifying whitespaces or fixing comments...), this is still WIP
and under development, it would mess with my local changes!
In itself, it doesn't bring anything to ReactOS yet, as no mini redirector is available in ReactOS source tree.
This may come later on with NFS41.
More to follow...
CORE-11327
svn path=/trunk/; revision=74674
2017-05-26 20:52:18 +00:00
|
|
|
#ifdef __REACTOS__
|
|
|
|
#define FCB_HASH_BUCKET(T, H) &(T)->HashBuckets[H % (T)->NumberOfBuckets]
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|