[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 _RXWORKQ_H_
|
|
|
|
#define _RXWORKQ_H_
|
|
|
|
|
|
|
|
typedef
|
|
|
|
VOID
|
|
|
|
(NTAPI *PRX_WORKERTHREAD_ROUTINE) (
|
|
|
|
_In_ PVOID Context);
|
|
|
|
|
|
|
|
typedef struct _RX_WORK_QUEUE_ITEM_
|
|
|
|
{
|
|
|
|
WORK_QUEUE_ITEM;
|
|
|
|
PRDBSS_DEVICE_OBJECT pDeviceObject;
|
|
|
|
} RX_WORK_QUEUE_ITEM, *PRX_WORK_QUEUE_ITEM;
|
|
|
|
|
|
|
|
typedef struct _RX_WORK_DISPATCH_ITEM_
|
|
|
|
{
|
|
|
|
RX_WORK_QUEUE_ITEM WorkQueueItem;
|
|
|
|
PRX_WORKERTHREAD_ROUTINE DispatchRoutine;
|
|
|
|
PVOID DispatchRoutineParameter;
|
|
|
|
} RX_WORK_DISPATCH_ITEM, *PRX_WORK_DISPATCH_ITEM;
|
|
|
|
|
|
|
|
typedef enum _RX_WORK_QUEUE_STATE_
|
|
|
|
{
|
|
|
|
RxWorkQueueActive,
|
|
|
|
RxWorkQueueInactive,
|
|
|
|
RxWorkQueueRundownInProgress
|
|
|
|
} RX_WORK_QUEUE_STATE, *PRX_WORK_QUEUE_STATE;
|
|
|
|
|
|
|
|
typedef struct _RX_WORK_QUEUE_RUNDOWN_CONTEXT_
|
|
|
|
{
|
|
|
|
KEVENT RundownCompletionEvent;
|
|
|
|
LONG NumberOfThreadsSpunDown;
|
|
|
|
PETHREAD *ThreadPointers;
|
|
|
|
} RX_WORK_QUEUE_RUNDOWN_CONTEXT, *PRX_WORK_QUEUE_RUNDOWN_CONTEXT;
|
|
|
|
|
|
|
|
typedef struct _RX_WORK_QUEUE_
|
|
|
|
{
|
|
|
|
USHORT State;
|
|
|
|
BOOLEAN SpinUpRequestPending;
|
|
|
|
UCHAR Type;
|
|
|
|
KSPIN_LOCK SpinLock;
|
|
|
|
PRX_WORK_QUEUE_RUNDOWN_CONTEXT pRundownContext;
|
2017-05-31 17:02:44 +00:00
|
|
|
volatile LONG NumberOfWorkItemsDispatched;
|
|
|
|
volatile LONG NumberOfWorkItemsToBeDispatched;
|
[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
|
|
|
LONG CumulativeQueueLength;
|
|
|
|
LONG NumberOfSpinUpRequests;
|
|
|
|
LONG MaximumNumberOfWorkerThreads;
|
|
|
|
LONG MinimumNumberOfWorkerThreads;
|
2017-05-31 17:02:44 +00:00
|
|
|
volatile LONG NumberOfActiveWorkerThreads;
|
|
|
|
volatile LONG NumberOfIdleWorkerThreads;
|
[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
|
|
|
LONG NumberOfFailedSpinUpRequests;
|
2017-05-31 17:02:44 +00:00
|
|
|
volatile LONG WorkQueueItemForSpinUpWorkerThreadInUse;
|
[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
|
|
|
RX_WORK_QUEUE_ITEM WorkQueueItemForTearDownWorkQueue;
|
|
|
|
RX_WORK_QUEUE_ITEM WorkQueueItemForSpinUpWorkerThread;
|
|
|
|
RX_WORK_QUEUE_ITEM WorkQueueItemForSpinDownWorkerThread;
|
|
|
|
KQUEUE Queue;
|
|
|
|
PETHREAD *ThreadPointers;
|
|
|
|
} RX_WORK_QUEUE, *PRX_WORK_QUEUE;
|
|
|
|
|
|
|
|
typedef struct _RX_WORK_QUEUE_DISPATCHER_
|
|
|
|
{
|
|
|
|
RX_WORK_QUEUE WorkQueue[RxMaximumWorkQueue];
|
|
|
|
} RX_WORK_QUEUE_DISPATCHER, *PRX_WORK_QUEUE_DISPATCHER;
|
|
|
|
|
|
|
|
typedef enum _RX_DISPATCHER_STATE_
|
|
|
|
{
|
|
|
|
RxDispatcherActive,
|
|
|
|
RxDispatcherInactive
|
|
|
|
} RX_DISPATCHER_STATE, *PRX_DISPATCHER_STATE;
|
|
|
|
|
|
|
|
typedef struct _RX_DISPATCHER_
|
|
|
|
{
|
|
|
|
LONG NumberOfProcessors;
|
|
|
|
PEPROCESS OwnerProcess;
|
|
|
|
PRX_WORK_QUEUE_DISPATCHER pWorkQueueDispatcher;
|
|
|
|
RX_DISPATCHER_STATE State;
|
|
|
|
LIST_ENTRY SpinUpRequests;
|
|
|
|
KSPIN_LOCK SpinUpRequestsLock;
|
|
|
|
KEVENT SpinUpRequestsEvent;
|
|
|
|
KEVENT SpinUpRequestsTearDownEvent;
|
|
|
|
} RX_DISPATCHER, *PRX_DISPATCHER;
|
|
|
|
|
[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
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
RxPostToWorkerThread(
|
|
|
|
_In_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject,
|
|
|
|
_In_ WORK_QUEUE_TYPE WorkQueueType,
|
|
|
|
_In_ PRX_WORK_QUEUE_ITEM pWorkQueueItem,
|
|
|
|
_In_ PRX_WORKERTHREAD_ROUTINE Routine,
|
|
|
|
_In_ PVOID pContext);
|
|
|
|
|
[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
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
RxDispatchToWorkerThread(
|
|
|
|
_In_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject,
|
|
|
|
_In_ WORK_QUEUE_TYPE WorkQueueType,
|
|
|
|
_In_ PRX_WORKERTHREAD_ROUTINE Routine,
|
|
|
|
_In_ PVOID pContext);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
RxInitializeDispatcher(
|
|
|
|
VOID);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
RxInitializeMRxDispatcher(
|
|
|
|
_Inout_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject);
|
|
|
|
|
|
|
|
#endif
|