Project

General

Profile

Feature #11015

SMB2 async redesign

Added by Gordon Ross 8 days ago. Updated 3 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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) and then:

if we've not already "gone async"
saves our position in the SMB command sequence (and related)
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 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.

History

#1

Updated by Gordon Ross 3 days ago

  • Status changed from New to In Progress
  • Description updated (diff)

Fix in production since late 2016

Also available in: Atom PDF