Pierre Schweitzer

[RDBSS]

- Implement __RxWriteReleaseResources(), RxCommonWrite(), RxCompleteMdl(), RxGetTopIrpIfRdbssIrp(), RxLowIoWriteShell(), RxLowIoWriteShellCompletion()

- Finish implementation of RxCommonCleanup() so that it handles setting EOF on a file

- Finish implementation of RxCommonCreate() so that it handles sharing violations and attempts to scavenge open files

[RXCE]

- Implement RxpScavengeFobxs(), RxpTrackDereference(), RxpTrackReference(), RxPurgeFobx(), RxPurgeRelatedFobxs(), RxReinitializeContext(), RxSetFileSizeWithLock(), RxScavengeFobxsForNetRoot()

- Fix a bug in RxPrefixTableLookupName() where it was badly handling nodes in scavenger

This commits brings several improvments to the NFS driver.

First of all, now, the driver handles creating, extending and writing to files!

It also handles purging dormant opened files when a file opening fails because of a sharing violation

Finally, it also brings something to look at our references issues in RDBSS to help finding out why our FCB are never (or nearly) dereferenced

CORE-8204

CORE-11327

CORE-13581

    • -0
    • +47
    /trunk/reactos/sdk/include/ddk/rxprocs.h
    • -0
    • +16
    /trunk/reactos/sdk/include/ddk/scavengr.h
    • -0
    • +18
    /trunk/reactos/sdk/include/ddk/fcb.h
    • -6
    • +470
    /trunk/reactos/sdk/lib/drivers/rxce/rxce.c
    • -110
    • +1434
    /trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c
    • -0
    • +34
    /trunk/reactos/sdk/include/ddk/rxcontx.h
[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
Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8. OK, it can be quite confusing!

Quad not because of the size, but because of the word size. sizeof(WORD) = 2, sizeof(DOUBLEWORD) = 4, sizeof(QUADWORD) = 8.
OK, it can be quite confusing!

Yes. Sorry I could have been more explicit. That's indeed the number of arguments that I don't really like. But I could see later on that, it's not the only function like this. Perhaps in a second ...

Yes. Sorry I could have been more explicit. That's indeed the number of arguments that I don't really like. But I could see later on that, it's not the only function like this. Perhaps in a second step it would make sense to think about how to reduce these "big" functions. Nothing urgent though (this is why I didn't mark it as "unresolved").

This code was here before I started working on NTFS (9y ago - I feel old...)! Feel free to fix it.

This code was here before I started working on NTFS (9y ago - I feel old...)!
Feel free to fix it.

OK, sounds legit. Keep it that way.

OK, sounds legit. Keep it that way.

It's a "standard" quad align. For readability, perhaps it would be worth to define and a use a QuadAlign() macro, as you can find in rxprocs.h

It's a "standard" quad align. For readability, perhaps it would be worth to define and a use a QuadAlign() macro, as you can find in rxprocs.h

[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
Fisheye isn't the place for such comments. Please refrain.

Fisheye isn't the place for such comments. Please refrain.

Yes.... https://msdn.microsoft.com/en-us/library/windows/hardware/ff539215(v=vs.85).aspx
Well, for file records, I believe this should be an acceptable risk. Unless there's a really dramatic implementation failure in NTFS, it shouldn't happen. Whereas it would really save performances....

Well, for file records, I believe this should be an acceptable risk. Unless there's a really dramatic implementation failure in NTFS, it shouldn't happen. Whereas it would really save performances.
You have two opinions Trevor, pick the one you believe is the more appropriate! :-D

It refers to the $FILE_NAME attribute. That's all. It's correct.

It refers to the $FILE_NAME attribute. That's all. It's correct.

Actually, to be even more accurate: take example on RDBSS/RXCE (<3), use BooleanFlagOn/FlagOn when possible

Actually, to be even more accurate: take example on RDBSS/RXCE (<3), use BooleanFlagOn/FlagOn when possible

And fix your coding style! :-p

And fix your coding style! :-p

Use "normalized" MS types.

Use "normalized" MS types.

Ditto. Actually, in registry (for later improvement), volumes should be specified instead of a general setting.

Ditto. Actually, in registry (for later improvement), volumes should be specified instead of a general setting.

You should check type, just in case.

You should check type, just in case.

Semi magic! See Windows Internals 4th edition, page 734. But yeah, a define might be better (my fault!).

Semi magic! See Windows Internals 4th edition, page 734. But yeah, a define might be better (my fault!).

I'm wondering how sane this...

I'm wondering how sane this...