SMB2 async redesign
SMB2 leasing requires a more capable implementation of the logic
used to change an SMB2/3 request to run asynchronously.
The old implementation used a simple but limited design where the
dispatch loop allows one request in a sequence to set a "call back"
function used for "async" processing, which the dispatcher would
call after the request sequence is complete.
The new implementation instead essentially "re-enters" the SMB command
dispatch loop (actually a special variant of that loop called "go async") and then:
- saves our position (etc.) in the SMB command sequence
- constructs the required "interim responses" (with STATUS_PENDING) for the current and all remaining commands in the sequence
- sends a compound response containing those interim responses
- restores our position to where it was in step 1
- marks the request state as "async".
After the request has "gone async", any request processing that needs to
block for longer than a few milliseconds may do so without causing problems.
The SMB leasing support introduces some new cases where the SMB2 code
needs to block where the old async design would be inadequate.
This commit does not have its own functional verification test,
but regression tests should pass. We can consider this verified if the
oplock work in #11016 passes its tests.
Updated by Electric Monk 12 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 148d1a4158dc830f7b293a2ceb62ee54c2ebd72f Author: Matt Barden <email@example.com> Date: 2019-06-09T00:48:43.000Z 11015 SMB2 async redesign Reviewed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Evan Layton <email@example.com> Reviewed by: Roman Strashkin <firstname.lastname@example.org> Approved by: Garrett D'Amore <email@example.com>