Re: [nfsv4] "Courtesy locks"

<david.noveck@emc.com> Tue, 14 September 2010 19:56 UTC

Return-Path: <david.noveck@emc.com>
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 771933A6974 for <nfsv4@core3.amsl.com>; Tue, 14 Sep 2010 12:56:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.755
X-Spam-Level:
X-Spam-Status: No, score=-5.755 tagged_above=-999 required=5 tests=[AWL=-0.356, BAYES_00=-2.599, J_CHICKENPOX_44=0.6, J_CHICKENPOX_82=0.6, RCVD_IN_DNSWL_MED=-4]
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 MClEMficKUS2 for <nfsv4@core3.amsl.com>; Tue, 14 Sep 2010 12:55:59 -0700 (PDT)
Received: from mexforward.lss.emc.com (mexforward.lss.emc.com [128.222.32.20]) by core3.amsl.com (Postfix) with ESMTP id C30483A69A1 for <nfsv4@ietf.org>; Tue, 14 Sep 2010 12:55:58 -0700 (PDT)
Received: from hop04-l1d11-si01.isus.emc.com (HOP04-L1D11-SI01.isus.emc.com [10.254.111.54]) by mexforward.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id o8EJuH8Q014239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Sep 2010 15:56:17 -0400
Received: from mailhub.lss.emc.com (mailhub.lss.emc.com [10.254.221.253]) by hop04-l1d11-si01.isus.emc.com (RSA Interceptor); Tue, 14 Sep 2010 15:56:15 -0400
Received: from corpussmtp3.corp.emc.com (corpussmtp3.corp.emc.com [10.254.169.196]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id o8EJtdRX000513; Tue, 14 Sep 2010 15:56:14 -0400
Received: from CORPUSMX50A.corp.emc.com ([128.221.62.39]) by corpussmtp3.corp.emc.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 14 Sep 2010 15:55:32 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 14 Sep 2010 15:55:30 -0400
Message-ID: <BF3BB6D12298F54B89C8DCC1E4073D8002665622@CORPUSMX50A.corp.emc.com>
In-Reply-To: <20100914170707.GA2409@fieldses.org>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [nfsv4] "Courtesy locks"
Thread-Index: ActUQA0GagEu/jc3QI+ywPACgvg7GwABDRNA
References: <20100914000019.GA48838@m12.macko.edu><874825331.864357.1284426810883.JavaMail.root@erie.cs.uoguelph.ca> <20100914170707.GA2409@fieldses.org>
From: david.noveck@emc.com
To: bfields@fieldses.org, rmacklem@uoguelph.ca
X-OriginalArrivalTime: 14 Sep 2010 19:55:32.0179 (UTC) FILETIME=[C9E3E230:01CB5446]
X-EMM-MHVC: 1
Cc: 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 19:56:00 -0000

> 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).

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, 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