[Samba] kernel oplocks breaks something
mjt at tls.msk.ru
Thu Mar 9 08:23:16 UTC 2023
After finding out that kernel oplocks is actually a global
parameter despite what documentation is saying, and setting it
in smb.conf [global], I'm seeing sporadic I/O errors on clients.
Unfortunately this is difficult to catch as it doesn't happen
very often, and after increasing debug level it becomes even
less frequent (so I guess it is some timing-related issue).
One of the symptoms is: when a (linux) home directory is open
in, say, FAR Manager (farmanager.com), and email arrives for
that user (which is keept in ~/Maildir/, so timestamp of that
dir is modified to current), out of the sudden Far is getting
error when (re)reading the directory, and says so in a message:
"Error reading directory". There's no other activity going on
at that time, no files are being copied, etc, just the directory
is "current", and all the change notifications are enabled for
it. After hitting "Ok" button in the interface, the directory
is read successfully. But after some time, it displays the same
error message again.
It seems like there are other symptoms too, like errors during
file copy, but I'm not 100% sure about that yet, maybe it is not
related to this setting.
I tried to comment out kernel oplocks = yes, - so far the prob
hasn't reappeared since that time. This is why it smells to
me this parameter is related.
I'm still trying to get something in the samba logs, let's
see how it goes..
JFYI for now.
Also, fwiw, kernel oplocks seems to be hardly useful in real
More information about the samba