Project

General

Profile

Feature #11016

SMB2 oplock leases

Added by Gordon Ross 3 months ago. Updated 2 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Feature request for SMB2/SMB3 oplock leases, as specified in
[MS-SMB2] sec. 2.2.13.2.8 SMB2_CREATE_REQUEST_LEASE
and [MS-FSA] sec. 2.1.1.10 etc.

Steps to Reproduce:
Run the smbtorture test cases: smb2.oplock smb2.lease

Expected Results:
Most should pass (with some expected failures)

Actual Results:
Many smb2.oplock tests currently fail.
All the smb2.lease tests report "skip" because leases are not supported.

History

#1

Updated by Gordon Ross 3 months ago

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

This work includes a development testing program (testoplock) that can be used to simulate various sequences of opens and cache delegation requests (oplock leases). That program was designed primarily for investigating various state transitions taken by a set of oplock leases, but it can also be used for regression testing in case smb_cmn_oplock needs work.

Tested per. the description.
Fix in production since mid 2017

#2

Updated by Gordon Ross 2 months ago

One really nice thing about getting SMB2 Leases integrated is that SMB2 clients can again take advantage of "cache deletations".
The old "oplock" (cache delegation) code for SMB1 turned out not to work well with Windows SMB2 clients, so before this fix we had to disable oplocks (or disable SMB2). With SMB2 leases, we can once again enable oplocks in the SMB server.

# sharectl set -p oplock_enable=true smb
# sharectl get -p oplock_enable smb
oplock_enable=true

#3

Updated by Electric Monk 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 94047d49916b669576decf2f622a1ee718646882

commit  94047d49916b669576decf2f622a1ee718646882
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-06-09T00:48:57.000Z

    11016 SMB2 oplock leases
    Reviewed by: Matt Barden <matt.barden@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>

Also available in: Atom PDF