why doesn't the kernel enforce oplocks? (was: Re: [Samba] Re:
How Samba let us down)
John E. Malmberg
wb8tyw at qsl.net
Fri Oct 25 00:52:24 GMT 2002
Ben Johnson wrote:
> I guess what I am thinking about is how difficult it seems to be for
> programs to actually cooperate with one another well enough to avoid
> corrupting files. I know from experience that using flock() effectively
> for making anything trustworthy that's more complicated than creating
> lock files can be very difficult if not impossible.
> A kernel supported api for locking files (maybe with timeouts and mutex
> values) that actually enforced the file locks, instead of relying on
> applications to be friendly to one another might (I think would) make
> programming some user space apps a lot easier.
> Samba could take advantage of such an api to make oplocks safe even when
> the files in the filesystem are being accessed and modified by other
> applications on the system. It could also leverage such an api to help
> poorly written Windows applications from corrupting their own files.
Samba 2.0.6 does use kernel supported file locks on OpenVMS. Lock files
are not used.
I Have not checked the 2.2.4 port to OpenVMS to see if they incorporated
The issue is support in the host platform, not in SAMBA. There is
nothing that Samba can do to change this behavior.
If you are using an Open Source operating system, you can change it's
method of locking.
wb8tyw at qsl.network
Personal Opinion Only
More information about the samba-technical