public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: Bruce Fields <bfields@fieldses.org>
To: Jeremy Allison <jra@samba.org>
Cc: dai.ngo@oracle.com,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	CIFS <linux-cifs@vger.kernel.org>
Subject: Re: Locking issue between NFSv4 and SMB client
Date: Thu, 23 Sep 2021 20:56:45 -0400	[thread overview]
Message-ID: <20210924005645.GA28137@fieldses.org> (raw)
In-Reply-To: <YU0hAYLow+8n8siT@jeremy-acer>

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@oracle.com wrote:
> >
> >On 9/23/21 2:50 PM, Bruce Fields wrote:
> >>On Thu, Jul 15, 2021 at 04:45:22PM -0700, dai.ngo@oracle.com 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.

  reply	other threads:[~2021-09-24  0:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 23:45 Locking issue between NFSv4 and SMB client dai.ngo
2021-07-15 23:47 ` dai.ngo
2021-09-23 21:50 ` Bruce Fields
2021-09-23 22:39   ` dai.ngo
2021-09-24  0:51     ` Jeremy Allison
2021-09-24  0:56       ` Bruce Fields [this message]
2021-10-07 17:03     ` dai.ngo
2021-10-07 17:38       ` dai.ngo
2021-10-11 16:21         ` Bruce Fields
2021-09-24  3:35   ` Trond Myklebust
2021-09-24  3:46     ` Ralph Boehme
2021-09-24  4:13       ` Trond Myklebust
2021-09-24  4:55         ` Ralph Boehme
2021-09-24 16:36         ` Jeremy Allison
2021-09-24 16:45           ` bfields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210924005645.GA28137@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=dai.ngo@oracle.com \
    --cc=jra@samba.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox