Feature #11015
SMB2 async redesign
100%
Description
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.
Testing:
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 Gordon Ross over 1 year ago
- Description updated (diff)
- Status changed from New to In Progress
Fix in production since late 2016
Updated by Electric Monk over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 148d1a4158dc830f7b293a2ceb62ee54c2ebd72f
commit 148d1a4158dc830f7b293a2ceb62ee54c2ebd72f Author: Matt Barden <matt.barden@nexenta.com> Date: 2019-06-09T00:48:43.000Z 11015 SMB2 async redesign Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Evan Layton <evan.layton@nexenta.com> Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>