From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>, Neil Brown <neilb@suse.de>,
Linux NFS mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [RFC][PATCH] nfs: support legacy NFS flock behavior via mount option
Date: Tue, 07 Sep 2010 13:06:11 -0400 [thread overview]
Message-ID: <1283879171.2788.4.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20100907120847.692bd32e@tlielax.poochiereds.net>
On Tue, 2010-09-07 at 12:08 -0400, Jeff Layton wrote:
> On Tue, 07 Sep 2010 10:17:19 -0400
> Trond Myklebust <Trond.Myklebust@netapp.com> wrote:
>
> > On Mon, 2010-09-06 at 18:03 +0530, Suresh Jayaraman wrote:
> > > NFS clients since 2.6.12 support flock()locks by emulating the
> > > BSD-style locks in terms of POSIX byte range locks. So the NFS client
> > > does not allow to lock the same file using both flock() and fcntl
> > > byte-range locks.
> > >
> > > For some Windows applications which seem to use both share mode locks
> > > (flock()) and fcntl byte range locks sequentially on the same file,
> > > the locking is failing as the lock has already been acquired. i.e. the
> > > flock mapped as posix locks collide with actual byte range locks from
> > > the same process. The problem was observed on a setup with Windows
> > > clients accessing Excel files on a Samba exported share which is
> > > originally a NFS mount from a NetApp filer. Since kernels < 2.6.12 does
> > > not support flock, what was working (as flock locks were local) in
> > > older kernels is not working with newer kernels.
> > >
> > > This could be seen as a bug in the implementation of the windows
> > > application or a NFS client regression, but that is debatable.
> > > In the spirit of not breaking existing setups, this patch adds mount
> > > options "flock=local" that enables older flock behavior and
> > > "flock=fcntl" that allows the current flock behavior.
> >
> > So instead of having a special option for flock only, what say we rather
> > introduce an option of the form
> >
> > -olocal_lock=
> >
> > which can take the values 'none', 'flock', 'fcntl' (or 'posix'?) and
> > 'all'?
> >
> > Cheers
> > Trond
>
> Another thought -- we already have "-olock" and "-onolock" and we'll
> have to keep them for compatability. Maybe this should be "-oflock" and
> "-onoflock"?
>
No thanks. That would require us to add a -onofcntl too, since -onolock
is already defines as being equivalent to -olocal_lock=all
Trond
next prev parent reply other threads:[~2010-09-07 17:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 12:33 [RFC][PATCH] nfs: support legacy NFS flock behavior via mount option Suresh Jayaraman
2010-09-07 13:40 ` Jeff Layton
2010-09-07 14:17 ` Trond Myklebust
2010-09-07 16:08 ` Jeff Layton
2010-09-07 17:06 ` Trond Myklebust [this message]
2010-09-07 20:13 ` Suresh Jayaraman
2010-09-07 20:49 ` Trond Myklebust
2010-09-08 14:36 ` Suresh Jayaraman
2010-09-08 16:50 ` Trond Myklebust
2010-09-07 22:23 ` Neil Brown
2010-09-07 22:42 ` Trond Myklebust
2010-09-08 0:04 ` Neil Brown
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=1283879171.2788.4.camel@heimdal.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=sjayaraman@suse.de \
/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