[PATCH] Convert Samba to OFD locking.

Simo s at ssimo.org
Thu May 19 17:53:18 UTC 2016

On Thu, 2016-05-19 at 10:29 -0700, Jeremy Allison wrote:
> On Thu, May 19, 2016 at 05:14:51PM +0000, Simo wrote:
> > 
> > It will be extremely common actually, compile time and runtime are
> > just 2 different beasts,
> That implies a Samba compiled with a recent glibc on a
> modern kernel being moved to a system with an older glibc
> and kernel.

No just older kernel, it happens all the time to run chrooted or
containerized environments, where the userspace (including glibc) is
Fedora 23 and the kernel is RHEL7 or even RHEL6.
I am not saying this is an ideal combination, but people do these
things all the time.

Glibc does have checks to see if the kernel support syscalls and return
ENOSYS as necessary if not.

> Do you really want to support that ? What cases do you
> need to support that ? Do you have a common case you're
> trying to support ?

Yes see above.

> > at the very least we need a config option to turn off ofd and
> > fallback to the classic locking,
> > but that's really not admin friendly, it is easy enough to test if
> > ofd is actually supported st runtime, you try and if you get enosys
> > you log it and turn off the ofd path.
> That's *exactly* the kind of runtime complexity I'm trying
> to avoid. See my tevent_epoll post for an explaination of
> why.
> I did think long and hard before coding it up this way,
> and did have a good reason for doing so.
> I'm really trying to avoid a global "have_working_ofd_locking"
> variable.

I know it is not pretty, but for kernel features I think it is
appropriate, seem my reply to your other epoll email as well.


Simo Sorce

More information about the samba-technical mailing list