[Samba] oplocks, kernel oplocks, kernel share modes, .. - how it all works?

Jeremy Allison jra at samba.org
Tue Jan 24 21:57:07 UTC 2023


On Tue, Jan 24, 2023 at 09:51:01PM +0000, Rowland Penny via samba wrote:
>
>So, are we back to what I said originally ? that it is a BAD idea to 
>locally modify anything in a Samba share and it should only be 
>modified by Samba or from a SMB client ?

It is... inadvisable to do local modifications. Having said that
the "kernel oplocks" parameter (when set in the [global] section only)
on Linux will allow this to be done safely w.r.t. file-level caching
at the cost of falling back to the old oplock model rather than the
modern SMB2 leases.

It will depend on applications being used that understand each
others locking and simultaneous open semantics in order to be
safe though.

So yeah. Advanced option, only use if you *really* know what
you're doing and understand the risks involved.

I think Michael is asking the right questions to get to something
that will work for him. And after all, the purpose of this
list is to help people to use Samba to do really dangerous
things :-) :-) :-).



More information about the samba mailing list