pschweitzer in reactos

[RDBSS]

Complementary to r75353: implement RxCancelNotifyChangeDirectoryRequestsForFobx()

CORE-11327

[RDBSS]

Implement RxNotifyChangeDirectory(), RxLowIoNotifyChangeDirectoryCompletion(), RxCancelNotifyChangeDirectoryRequestsForVNetRoot()

This means the first parts of the directory watch are here. Though, NFS driver doesn't support these, but at least, it reduces the UNIMPLEMENTED spam!

CORE-11327

[SHELL32]

In case a FSD doesn't support directory changes notifications, don't try to requeue a notification each time it returns 0 data.

Just quit instead.

CORE-13549

[SHELL32]

Avoid double-free and use-after-free in case the FSD fails to register the change directory notification

CORE-13549

[RDBSS]

Fix broken assignment.

Spotted by cppcheck.

[RXCE]

- Define RxShouldPostCompletion() and use it

- Define RxIsResourceOwnershipStateExclusive() and use it

- Define some magic values

[RDBSS]

- Implement CheckForLoudOperations(), RxAdjustFileTimesAndSize(), RxIsOkToPurgeFcb()

- Continue implementation of RxCommonCleanup()

- Fix bugs in the RxCommonCleanup() implementation and make it more explicit when in the delete on close path

- Stub RxCleanupPipeQueues(), RxLowIoLockControlShell()

- Silent a few DPRINTs

CORE-8204

CORE-11327

    • -7
    • +8
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
    • -0
    • +15
    /trunk/reactos/sdk/include/ddk/rxprocs.h
    • -0
    • +4
    /trunk/reactos/sdk/include/ddk/ntrxdef.h
[RXCE]

- Implement RxFinalizeConnection(), RxOrphanSrvOpens()

- Stub RxOrphanSrvOpensForThisFcb()

[RDBSS]

- Fix a bug in RxCommonDevFCBClose() where prefix table wasn't acquire exclusively; this was problematic due to potential prefix table removal on dereference

- Stub RxCancelNotifyChangeDirectoryRequestsForVNetRoot()

This commit basically allows you to delete a NFS share you would have made use of in ReactOS.

Like net use z: \\share\path can be deleted through net use /delete z:

Note that if you access the share using cmd tools (dir, copy, more, and so on), dismount will work.

If you attempt to access with Explorer, then, handles will be kept open and dismount will fail.

CORE-8204

CORE-11327

    • -0
    • +6
    /trunk/reactos/sdk/include/ddk/rxprocs.h
    • -12
    • +12
    /trunk/reactos/sdk/include/ddk/fcb.h
    • -0
    • +5
    /trunk/reactos/sdk/include/ddk/rxcontx.h
    • -0
    • +1
    /trunk/reactos/sdk/include/ddk/mrxfcb.h
    • -0
    • +237
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
[MPR]

Import Wine commit:

- 26192671700360859cd8a0133dabcd96ec1a786b, Implement WNetConnectionDialog().

CORE-13516

    • -3
    • +11
    /trunk/reactos/dll/win32/mpr/wnet.c
[NET]

On dismount, you can either use: net use /delete <drive>: or net use <drive>: /delete

CORE-13517

[RXCE]

Assorted fixes:

- Avoid list corruption

- Avoid stack corruption

- Avoid ASSERT on FCB reuse for same file type

CORE-11327

    • -22
    • +27
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
[COPYSUP]

Addendum to r75265 (bis)

    • -0
    • +1
    /trunk/reactos/sdk/lib/drivers/CMakeLists.txt
[RDBSS]

Addendum to r75265

[RDBSS]

- Implement RxCloseAssociatedSrvOpen(), RxFastIoRead(), RxPurgeNetFcb(), RxRemoveShareAccess(), RxRemoveShareAccessPerSrvOpens()

- Continue implementation of RxCommonCleanup() to handle allocated SRV_OPEN

- Halfplement RxFastIoCheckIfPossible() so that it handles read operations

- Stub RxCancelNotifyChangeDirectoryRequestsForFobx()

[RXCE]

- Implement RxChangeBufferingState(), RxFinalizeSrvOpen(), RxFreeFcbObject(), RxGatherRequestsForSrvOpen(), RxGetDeviceObjectOfInstance(), RxInitializeRxTimer(), RxMarkFobxOnCleanup(), RxMarkFobxOnClose(), RxpDiscardChangeBufferingStateRequests(), RxpDispatchChangeBufferingStateRequests(), RxpLookupSrvOpenForRequestLite(), RxpMarkInstanceForScavengedFinalization(), RxPostOneShotTimerRequest(), RxPrepareRequestForReuse(), RxProcessChangeBufferingStateRequestsForSrvOpen(), RxpUndoScavengerFinalizationMarking(), RxPurgeChangeBufferingStateRequestsForSrvOpen(), RxPurgeFobxFromCache(), RxRemoveNameNetFcb(), RxScavengerTimerRoutine(), RxTimerDispatch()

- Finish implementation of RxDereference() to handle scavenger

- Finish implementation of RxLowIoCompletionTail() to handle blocked operations resume

- Fix a bug in RxFinalizeNetFcb() where it was dereferencing its NET_ROOT instead of its V_NET_ROOT

- Fix bugs in __RxAcquireFcb() where it improperly handled the lack of RX_CONTEXT

- Halfplement RxResumeBlockedOperations_ALL() to extract blocked operations from RX_CONTEXT (and drop them...)

- Stub RxDispatchChangeBufferingStateRequests(), RxScavengerFinalizeEntries()

[COPYSUP]

- Implement FsRtlCopyRead2()

This library is basically what you can find in FsRtl with an extended support of Top Level IRP. It is used by RDBSS for FastIO. Next to come in it will be FsRtlCopyWrite2().

This commit brings several improvements to current work on RBDSS/RXCE. First of all, both libraries will leak less (again!).

It also brings the scavenger infrastructure (not fully fonctionnal though). Our NFS driver doesn't make use of it though.

Finally, this brings support of FastIO (for read operations ;-)) to our NFS driver!

Regarding CORE-13484, with copy + FastIO I could copy a file without troubles. But that seems to be still problematic with xcopy without FastIO...

CORE-13484

CORE-11327

    • -96
    • +1409
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
    • -0
    • +27
    /trunk/reactos/sdk/include/ddk/rxprocs.h
    • -0
    • +18
    /trunk/reactos/sdk/include/ddk/buffring.h
    • -0
    • +2
    /trunk/reactos/sdk/include/ddk/mrxfcb.h
    • -36
    • +70
    /trunk/reactos/sdk/include/ddk/fcb.h
    • -0
    • +18
    /trunk/reactos/sdk/lib/drivers/copysup/copysup.h
    • -0
    • +7
    /trunk/reactos/sdk/lib/drivers/copysup/CMakeLists.txt
    • -0
    • +4
    /trunk/reactos/sdk/include/ddk/scavengr.h
    • -0
    • +1
    /trunk/reactos/sdk/include/ddk/nodetype.h
    • -0
    • +9
    /trunk/reactos/sdk/include/ddk/rxtimer.h
    • -0
    • +182
    /trunk/reactos/sdk/lib/drivers/copysup/copysup.c
    • -0
    • +16
    /trunk/reactos/sdk/include/ddk/rxcontx.h
[FASTFAT]

- Stop passing DO, directly pass VCB

- Try to compute some unique value as internal ID for objects. As MS, return the LBO

CORE-13489

[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

    • -0
    • +16
    /trunk/reactos/sdk/include/ddk/fcb.h
    • -0
    • +32
    /trunk/reactos/sdk/include/ddk/buffring.h
    • -30
    • +943
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
    • -0
    • +1
    /trunk/reactos/sdk/include/ddk/mrxfcb.h
    • -0
    • +21
    /trunk/reactos/sdk/include/ddk/rxprocs.h
    • -0
    • +4
    /trunk/reactos/sdk/include/ddk/fcbtable.h
    • -0
    • +5
    /trunk/reactos/sdk/include/ddk/prefix.h
    • -0
    • +9
    /trunk/reactos/sdk/include/ddk/rxworkq.h
[DXG]

Fix GCC build

[MPR]

Import Wine commit:

- 8d461c1f42b0b667b2aa6a235d007eea1dd6f561, Don't stop enumeration on the first failing network provider.

This fixes 'net use' stoping connections enumeration when a network returns an error or no connection.

CORE-13475

[MPR]

Import Wine commit:

- 51b4a42969366cc409808aded23d3602a34206e2, Properly handle the count set to -1 when enumerating connections.

This fixes 'net use' not being able to enumerate multiple connections served by multiple network providers.

CORE-13475

    • -5
    • +10
    /trunk/reactos/dll/win32/mpr/wnet.c
[NFSD]

Misc. fixes by Thomas

[NFS]

Add the missing pieces for the NFS filesystem: registry information.

Register the pnfs service (nfsd) as manual, so that it only gets started when user wants/needs it.

Same goes to the nfs41_driver service (driver). nfsd as a code modification specific to ReactOS so that it loads the driver

as soon as it gets started.

That means, in order to use NFS in ReactOS, you need to start the nfsd service: net start nfsd

Then, you can mount your remote share: net use * \\IP\path (you can replace * by a letter, e.g. z:)

There's no GUI stuff implemented yet for this in MPR.

If you want to access the share without mounting it in ReactOS (like, in Explorer), you've to be aware of a small detail:

after you start pnfs service, in explorer bar, type \\IP\nfs4\path. This is required so that NFS driver can claim the path

without troubles.

Something else you've to know: so far, tests where conducted with a remote share being 777, read-only and anonymously mounted.

Other scenarii are likely to fail (auth, rw, server?!, etc.).

Also note that if you attempt to mount a share on which you don't have traverse right, mounting will succeed but any later

operation will fail, refused by the remote NFS server. This is a bit different than the behavior on Linux where mount is denied

if traverse is not granted.

Final thing: this is highly experimental and not fully implemented yet: expect not working stuff, broken asserts, deadlocks, etc.

CORE-8204

    • -1
    • +19
    /trunk/reactos/boot/bootdata/hivesys.inf
[NFSD]

Fix build?

[LIBTIRPC]

Add a spec file

[NFS]

More properly fix build for GCC/MSVC. By Thomas.

[NFSD]

Fix MSVC build by Thomas.

[PDSK]

Complete iptypes.h

    • -1
    • +16
    /trunk/reactos/sdk/include/psdk/iptypes.h
[NFSD]

Import the nfsd deamon from the nfs41 project.

CORE-8204

    • -0
    • +280
    /trunk/reactos/base/services/nfsd/from_kernel.h
    • -0
    • +532
    /trunk/reactos/base/services/nfsd/nfs41.h
    • -0
    • +295
    /trunk/reactos/base/services/nfsd/nfs41_callback.h
    • -0
    • +1399
    /trunk/reactos/base/services/nfsd/name_cache.c
    • -0
    • +1289
    /trunk/reactos/base/services/nfsd/pnfs_layout.c
    • -0
    • +368
    /trunk/reactos/base/services/nfsd/pnfs.h
    • -0
    • +4
    /trunk/reactos/base/services/nfsd/nfsd.rc
    • -0
    • +32
    /trunk/reactos/base/services/nfsd/sources
    • -0
    • +365
    /trunk/reactos/base/services/nfsd/pnfs_device.c
    • -0
    • +501
    /trunk/reactos/base/services/nfsd/nfs41_daemon.c
    • -0
    • +80
    /trunk/reactos/base/services/nfsd/nfs41_compound.h
    • -0
    • +114
    /trunk/reactos/base/services/nfsd/list.h
    • -0
    • +20
    /trunk/reactos/base/services/nfsd/ms-nfs41-idmap.conf
    • -0
    • +547
    /trunk/reactos/base/services/nfsd/callback_server.c
    • -0
    • +871
    /trunk/reactos/base/services/nfsd/pnfs_io.c
  1. … 48 more files in changeset.
[LIBTIRPC]

As suggested, move to 3rdparty

    • -0
    • +103
    /trunk/reactos/dll/3rdparty/libtirpc/CMakeLists.txt
    • -1
    • +0
    /trunk/reactos/dll/win32/CMakeLists.txt
    • -0
    • +1
    /trunk/reactos/dll/3rdparty/CMakeLists.txt
    • -0
    • +253
    /trunk/reactos/dll/3rdparty/libtirpc/src/xdr_mem.c
    • -0
    • +856
    /trunk/reactos/dll/3rdparty/libtirpc/src/svc_vc.c
  1. … 351 more files in changeset.
[RXCE]

lolfix build

[NFS]

Remove dependency already brought in by rxce

[RDBSS]

Clean up CMake files, based on suggestions by Hermès.

Might fix MSVC build.

    • -2
    • +2
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c