On Thu, Sep 23, 2021 at 05:51:13PM -0700, Jeremy Allison wrote: > On Thu, Sep 23, 2021 at 03:39:52PM -0700, dai.ngo@xxxxxxxxxx wrote: > > > >On 9/23/21 2:50 PM, Bruce Fields wrote: > >>On Thu, Jul 15, 2021 at 04:45:22PM -0700, dai.ngo@xxxxxxxxxx wrote: > >>>Hi Bruce, > >>Oops, sorry for neglecting this. > >> > >>>I'm doing some locking testing between NFSv4 and SMB client and > >>>think there are some issues on the server that allows both clients > >>>to lock the same file at the same time. > >>It's not too surprising to me that getting consistent locks between the > >>two would be hard. > >> > >>Did you get any review from a Samba expert? I seem to recall it having > >>a lot of options, and I wonder if it's configured correctly for this > >>case. > > > >No, I have not heard from any Samba expert. > > > >> > >>It sounds like Samba may be giving out oplocks without getting a lease > >>from the kernel. > > > >I will have to circle back to this when we're done with the 1st > >phase of courteous server. > > > >-Dai > > > >> > >>--b. > >> > >>>Here is what I did: > >>> > >>>NOTE: lck is a simple program that use lockf(3) to lock a file from > >>>offset 0 to the length specified by '-l'. > > What does lockf map to in NFS ? > > Samba only uses posix fcntl byte range locks (and only when > told to map SMB locks onto underlying posix locks), we don't use > lockf at all. Yeah, it's the same thing, lockf just maps to fcntl locks. You're probably thinking of flock. --b.