[PATCH] Convert Samba to OFD locking.

Jeremy Allison jra at samba.org
Thu May 19 17:44:18 UTC 2016


On Thu, May 19, 2016 at 08:34:37PM +0300, Uri Simchoni wrote:
> > 
> My angle is custom-built (and probably cross-compiled) linux, such as we
> see in NAS appliances. For that purpose a runtime test is not needed
> (and I was not asking for one) - a configure-time test that runs would
> suffice.

OK, fair point. I'll update to a configure-time code run test.

> I tend to agree with Richard that the kernel is usually newer than the
> toolchain (and libc), but as a safety measure, we should at least panic
> if fcntl fails with EINVAL - can't hide this error.

No, I don't think panic is the right thing here.

We already have messages that cope with 64-bit
lock offsets failing on 32 bit NFS mounted file systems.

Remember, lock requests within smbd's are already
correctly handled by the internal locking layer,
this would be a failure of mapping the internal
lock layer onto the underlying POSIX locks - which
is something that is already optional in smbd
and is only used for coordination with local
locks on the system.

We should certainly log any EINVAL return at
level zero, but it's not a panic-level error.



More information about the samba-technical mailing list