[Samba] oplocks, kernel oplocks, kernel share modes, .. - how it all works?
Rowland Penny
rpenny at samba.org
Tue Jan 24 22:08:01 UTC 2023
On 24/01/2023 21:57, Jeremy Allison wrote:
> 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 :-) :-) :-).
Whilst I can fully understand what you are trying to say, I still think
that it is a bad idea to locally modify files on a Samba share. I also
think that what Michael requires is a good thing, it just isn't really
possible at this time, perhaps Samba could be enhanced to do it, so it
might be an idea to open a bug report so it doesn't get forgotten. The
major problem will be in getting external programs to work with the
Samba files and that will not be easy.
Rowland
More information about the samba
mailing list