SMB oplock not recalled when there is a request from NFS
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.
Import this commit from GitHub.com/Nexenta/illumos-nexenta
commit 3afddaed30a19c57d474ecb7e358181f7eba5274 Author: Gordon Ross <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Suresh Jayaraman <firstname.lastname@example.org> 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