Project

General

Profile

Actions

Bug #14866

closed

SMB oplock not recalled when there is a request from NFS

Added by Gordon Ross 2 months ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cifs - CIFS server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
racktop:BSR-9829

Description

Cache delegations via SMB ("oplocks") are meant to be coherent with NFS cache delegations. However, when illumos 11016 (SMB2 oplock leases) went in, the mechanism implementing that coordination was accidentally dropped.

Without the fix, cache delegations could lead to cache incoherency. For example, if an SMB cache delegation (a.k.a. SMB oplock) were to be left in effect when it should have been recalled, that could result in an SMB client overwriting data written from NFS or a local process, once the SMB client writes back it's cache. Only multi-protocol cases are affected, or protocol vs. local access. Using SMB exclusively, or NFS exclusively, both avoid this defect.

Fix is:
Import this commit from GitHub.com/Nexenta/illumos-nexenta

commit 3afddaed30a19c57d474ecb7e358181f7eba5274
Author: Gordon Ross <gordon.ross@tintri.com>
Date:   Wed Aug 26 17:48:44 2020 +0000

    FIR-521 SMB oplock not recalled when there is a request from NFS

    Reviewed by: Prashanth Badari <prbadari@tintri.com>
    Reviewed by: Suresh Jayaraman <sjayaraman@tintri.com>

3    1    usr/src/cmd/smbsrv/testoplock/smbsrv/smb_kproto.h
12    1    usr/src/cmd/smbsrv/testoplock/tol_main.c
48    7    usr/src/uts/common/fs/smbsrv/smb_cmn_oplock.c

Files

lease-nfs.snoop (6.52 KB) lease-nfs.snoop Gordon Ross, 2022-07-30 03:40 PM
Actions

Also available in: Atom PDF