From: "J. Bruce Fields" <bfields@fieldses.org>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [RFC PATCH 0/6] Fix NFSv4 delegations
Date: Fri, 3 Feb 2012 15:58:18 -0500 [thread overview]
Message-ID: <20120203205818.GE2999@fieldses.org> (raw)
In-Reply-To: <1326816029-13913-1-git-send-email-bfields@redhat.com>
On Tue, Jan 17, 2012 at 11:00:23AM -0500, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
>
> NFSv4 delegations are currently implemented as leases. However, leases
> don't have quite the same semantics, which means that delegations are
> currently enforced correctly only for conflicts between NFSv4 clients.
>
> I previously attempted to address this by "fixing" the existing lease
> behavior, assuming it was a bug--but from further investigation it looks
> like that would be the wrong thing to do for Samba.
>
> So instead I'm defining a new FL_DELEG flag to mark NFSv4 delegations,
> and varying behavior based on that. Delegations aren't meant to be
> available to userspace for now--nfsd is the only user.
>
> In theory this code allows both read and write delegations, but I'm only
> using read delegations for now--write delegations are a project for
> another day. (At which point write leases will probably need some
> fixing while we're at it.)
>
> Still to do: if OPEN(dirfd, name) returns a delegation to the client,
> then the client should be guaranteed that the opened file is still
> linked as (dirfd, name). But the current nfsd code allows a rename or
> unlink to intervene between the lookup and the request for a delegation.
OK, I decided I could fix that in the nfsd4 open code by retrying the
lookup after obtaining the delegation, and just dropping the delegation
(they're always optional) if it turned out there'd been a race.
I'll post revised vfs patches (without that extra nfsd stuff).
--b.
next prev parent reply other threads:[~2012-02-03 20:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 16:00 [RFC PATCH 0/6] Fix NFSv4 delegations J. Bruce Fields
2012-01-17 16:00 ` [RFC PATCH 1/6] locks: introduce new FL_DELEG lock flag J. Bruce Fields
2012-01-17 16:00 ` J. Bruce Fields
2012-01-17 16:00 ` [RFC PATCH 2/6] locks: give break_lease its own flags J. Bruce Fields
2012-01-17 16:17 ` Bypass encrypt and decrypt data in dm-crypt Fan Zhang
2012-01-17 16:17 ` Fan Zhang
2012-01-17 16:00 ` [RFC PATCH 3/6] locks: break delegations on unlink J. Bruce Fields
2012-01-17 16:00 ` J. Bruce Fields
2012-01-17 16:00 ` [RFC PATCH 4/6] locks: break delegations on rename J. Bruce Fields
2012-01-17 16:00 ` [RFC PATCH 5/6] locks: break delegations on any attribute modification J. Bruce Fields
2012-01-17 16:00 ` [RFC PATCH 6/6] locks: break delegations on link J. Bruce Fields
2012-01-17 16:00 ` J. Bruce Fields
2012-02-03 20:58 ` J. Bruce Fields [this message]
2012-02-03 21:09 ` Provide vfs support for NFSv4 delegations J. Bruce Fields
2012-02-03 21:09 ` J. Bruce Fields
2012-02-03 21:09 ` [PATCH 1/6] locks: introduce new FL_DELEG lock flag J. Bruce Fields
2012-02-03 21:09 ` [PATCH 2/6] locks: give break_lease its own flags J. Bruce Fields
2012-02-03 21:09 ` J. Bruce Fields
2012-02-03 21:09 ` [PATCH 3/6] locks: break delegations on unlink J. Bruce Fields
2012-02-03 21:09 ` J. Bruce Fields
2012-02-03 21:09 ` [PATCH 4/6] locks: break delegations on rename J. Bruce Fields
2012-02-03 21:09 ` [PATCH 5/6] locks: break delegations on any attribute modification J. Bruce Fields
2012-02-03 21:09 ` [PATCH 6/6] locks: break delegations on link J. Bruce Fields
2012-02-03 21:09 ` 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=20120203205818.GE2999@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.