From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org, nfsv4@ietf.org
Subject: Re: [nfsv4] OPEN_DOWNGRADE and posix byte range locking issue
Date: Thu, 19 Aug 2010 12:44:48 -0400 [thread overview]
Message-ID: <20100819164448.GF30151@fieldses.org> (raw)
In-Reply-To: <1278623332.13551.47.camel@heimdal.trondhjem.org>
> > -----Original Message-----
> > From: nfsv4-bounces@ietf.org [mailto:nfsv4-bounces@ietf.org] On Behalf
> > Of Trond Myklebust
> > Sent: Wednesday, July 07, 2010 7:30 PM
> > To: nfsv4@ietf.org
> > Subject: [nfsv4] OPEN_DOWNGRADE and posix byte range locking issue
> >
> > Neither RFC3530, nor RFC5661 appear to list NFS4ERR_LOCKS_HELD as a
> > valid response when the client calls OPEN_DOWNGRADE.
> >
> > The question is: what should the server then do if the NFS client holds
> > a WRITE_LT lock, but then asks for an OPEN_DOWNGRADE to
> > OPEN4_SHARE_ACCESS_READ. I understand that this is sanctioned in Windows
> > server environments, but it should definitely be forbidden in a POSIX
> > environment, and NFS4ERR_LOCKS_HELD would appear to fit the bill...
A bizarre variation: the linux server associates vfs opens with
stateid's. Locks are performed on vfs opens, and the vfs will complain
if you attempt to close a file that still has locks associated with it.
The sequence
open RW
lock R
open R
open downgrade to R
would therefore be implemented at the vfs level as:
open RW -> f
lock R on f
open R -> g
close f
Oops. We're stuck with ditching the lock (or erroring out) even though
it's still compatible with the new config option.
Well, I suppose this is my problem: either I should get a new vfs open
for the use of the lock, or represent the original RW open by two vfs
open's.
It's not something a unix-like client could do, I think, but I don't
think it's safe for me to assume I can reject it?
--b.
_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org
https://www.ietf.org/mailman/listinfo/nfsv4
next parent reply other threads:[~2010-08-19 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1278545423.15524.26.camel@heimdal.trondhjem.org>
[not found] ` <BF3BB6D12298F54B89C8DCC1E4073D8001ADE6C8@CORPUSMX50A.corp.emc.com>
[not found] ` <1278623332.13551.47.camel@heimdal.trondhjem.org>
2010-08-19 16:44 ` J. Bruce Fields [this message]
2010-08-20 15:35 ` [nfsv4] OPEN_DOWNGRADE and posix byte range locking issue david.noveck
2010-08-20 15:58 ` J. Bruce Fields
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=20100819164448.GF30151@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@ietf.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;
as well as URLs for NNTP newsgroup(s).