[Samba] oplocks, kernel oplocks, kernel share modes, .. - how it all works?
Jeremy Allison
jra at samba.org
Tue Jan 24 21:43:55 UTC 2023
On Tue, Jan 24, 2023 at 01:39:34PM -0800, Jeremy Allison via samba wrote:
>
>Locking and share modes have bugger-all to do with leases and oplocks.
>
>Please separate the two in your mind, things will make
>much more sense when you do :-).
Actually, separate the three :-).
Locking: Byte-ranges that control access to *parts* of a file.
Mandatory on Windows, advisory on Linux. Samba maps
Mandatory Windows byte-range locks to advisory locks
on Linux so it works smbd -> smbd, but not if local
processes ignore the locks (they are advisory on Linux).
Share modes: Controls on how a file may be opened simultaneously.
Windows-only, no analogue in Linux at all.
Leases and Oplocks: Windows only (although NFSv4 has leases also).
Controls client side caching of file data. No analogue
in local processes on Linux.
More information about the samba
mailing list