Re: [nfsv4] "Courtesy locks"
"J. Bruce Fields" <bfields@fieldses.org> Tue, 14 September 2010 20:34 UTC
Return-Path: <bfields@fieldses.org>
X-Original-To: nfsv4@core3.amsl.com
Delivered-To: nfsv4@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B89FE3A6B05 for <nfsv4@core3.amsl.com>; Tue, 14 Sep 2010 13:34:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.966
X-Spam-Level:
X-Spam-Status: No, score=-1.966 tagged_above=-999 required=5 tests=[AWL=-0.567, BAYES_00=-2.599, J_CHICKENPOX_44=0.6, J_CHICKENPOX_82=0.6]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1TXa9fL8jCil for <nfsv4@core3.amsl.com>; Tue, 14 Sep 2010 13:34:47 -0700 (PDT)
Received: from fieldses.org (fieldses.org [174.143.236.118]) by core3.amsl.com (Postfix) with ESMTP id B4D1D3A6A06 for <nfsv4@ietf.org>; Tue, 14 Sep 2010 13:34:47 -0700 (PDT)
Received: from bfields by fieldses.org with local (Exim 4.71) (envelope-from <bfields@fieldses.org>) id 1OvcCc-0002qq-DE; Tue, 14 Sep 2010 16:34:06 -0400
Date: Tue, 14 Sep 2010 16:34:06 -0400
From: "J. Bruce Fields" <bfields@fieldses.org>
To: david.noveck@emc.com
Message-ID: <20100914203405.GE4148@fieldses.org>
References: <20100914000019.GA48838@m12.macko.edu> <874825331.864357.1284426810883.JavaMail.root@erie.cs.uoguelph.ca> <20100914170707.GA2409@fieldses.org> <BF3BB6D12298F54B89C8DCC1E4073D8002665622@CORPUSMX50A.corp.emc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <BF3BB6D12298F54B89C8DCC1E4073D8002665622@CORPUSMX50A.corp.emc.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: rmacklem@uoguelph.ca, nfsv4@ietf.org
Subject: Re: [nfsv4] "Courtesy locks"
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Sep 2010 20:34:48 -0000
On Tue, Sep 14, 2010 at 03:55:30PM -0400, david.noveck@emc.com wrote: > > I think the idea was that you could revoke only those locks that had > to > > be thrown away due to conflict, return EXPIRED, and then allow > reclaims > > only of those locks that you hadn't been forced to revoke. > > I think the word "reclaim" is being used in a confusing way, or I'm > confused, or both. > > While I think you could argue that it is reasonable to use the word > "reclaim" for any situation in which you try to get back a lock that was > lost due to lease expiration or any other cause, I think this adds to > confusion. I suggest something like "re-establish" and reserve > "reclaim" for the case in which you use a reclaim-type OPEN or LOCK > operation (typically during the grace period). Yes, agreed, and that's the sense which I meant in the above. > BTW, the spec does allow you to honor reclaim-type operations after the > grace period if you can be sure that no conflicting lock could have been > granted from the time the server came up until that OPEN. (Conflicting > locks before the server booted this time are domain of "edge > conditions"). In general, getting that assurance is very difficult, Well, if there's been no server reboot--if a client just expires and the server hangs on to only those locks (and opens) that don't see conflicts--that may be another case where may be able to selectively grant reclaims without a whole lot of work. --b. > but > in the often common case in which OPENs with anything other than > DENY=NONE are very rare, you can do something very simple. > > If the RECLAIM open is with DENY=NONE, and there has never been an open > with anything other than DENY=NONE, then there could have not been any > such lock granted, and you can grant the RECLAIM-type open. In less > restrictive circumstances things get more difficult but depending on > what information you are willing to save (lists of fh's with various > sorts of locks), you may be able to handle a large proportion of clients > that would otherwise fall victim to expiration of the grace period and a > consequent inability to reclaim their locks. > > -----Original Message----- > From: nfsv4-bounces@ietf.org [mailto:nfsv4-bounces@ietf.org] On Behalf > Of J. Bruce Fields > Sent: Tuesday, September 14, 2010 1:07 PM > To: Rick Macklem > Cc: nfsv4@ietf.org > Subject: Re: [nfsv4] "Courtesy locks" > > On Mon, Sep 13, 2010 at 09:13:30PM -0400, Rick Macklem wrote: > > > > > > But if the server is not allowed to process reclaim ops outside the > > > grace period then there's no hope of nicely handling the case where > > > the server's grace period passes before the client gets a chance to > > > reconnect to the server. > > > > > > > Yep. But grace periods must be greater than a lease duration and I'd > > assume clients will be trying hard to re-connect. > > > > > In the context of "courtesy locks" I don't think it makes any sense > > > for a server to keep the state around if it's going to tell the > client > > > that the state expired but not allow the state to be reclaimed. > > > (Wasn't the point of the "courtesy" to allow them to be reclaimed if > > > there hadn't been any contention?) > > > > > > > What the FreeBSD server does (and what I assumed was meant by courtesy > > lock) is retain the state after the lease has expired (so long as no > > conflicting request is received)so that the state is still valid at > > the server and NFS4ERR_EXPIRED does not need to be replied to the > client. > > > > I'd appreciate hearing, if others have a different understanding of > it. > > I think the idea was that you could revoke only those locks that had to > be thrown away due to conflict, return EXPIRED, and then allow reclaims > only of those locks that you hadn't been forced to revoke. > > --b. > _______________________________________________ > nfsv4 mailing list > nfsv4@ietf.org > https://www.ietf.org/mailman/listinfo/nfsv4 >
- [nfsv4] "Courtesy locks" david.noveck
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Trond Myklebust
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Mike Mackovitch
- Re: [nfsv4] "Courtesy locks" Trond Myklebust
- Re: [nfsv4] "Courtesy locks" J. Bruce Fields
- Re: [nfsv4] "Courtesy locks" Everhart, Craig
- Re: [nfsv4] "Courtesy locks" Trond Myklebust
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Mike Mackovitch
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Mike Mackovitch
- Re: [nfsv4] "Courtesy locks" J. Bruce Fields
- Re: [nfsv4] "Courtesy locks" david.noveck
- Re: [nfsv4] "Courtesy locks" J. Bruce Fields
- Re: [nfsv4] "Courtesy locks" Rick Macklem
- Re: [nfsv4] "Courtesy locks" Mike Mackovitch