From: "J. Bruce Fields" Subject: Re: starting 90-second grace period Date: Fri, 11 Dec 2009 15:12:21 -0500 Message-ID: <20091211201221.GD15758@fieldses.org> References: <1629BB1E-EB8B-478C-8170-60413A5140A2@netapp.com> <1260554515.15701.0.camel@localhost> <1260555643.15701.4.camel@localhost> <20091211195047.GA15758@fieldses.org> <1260562171.15701.40.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tharindu Rukshan Bamunuarachchi , Andy Adamson , linux-nfs@vger.kernel.org To: Trond Myklebust Return-path: Received: from fieldses.org ([174.143.236.118]:37894 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbZLKUMO (ORCPT ); Fri, 11 Dec 2009 15:12:14 -0500 In-Reply-To: <1260562171.15701.40.camel@localhost> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Fri, Dec 11, 2009 at 03:09:31PM -0500, Trond Myklebust wrote: > On Fri, 2009-12-11 at 14:50 -0500, J. Bruce Fields wrote: > > On Fri, Dec 11, 2009 at 01:20:43PM -0500, Trond Myklebust wrote: > > > On Fri, 2009-12-11 at 23:39 +0530, Tharindu Rukshan Bamunuarachchi > > > wrote: > > > > then why is it 90 by default ... is it RFC/Protocol requirement ? > > > > > > The purpose of the grace period is to give the clients enough time to > > > notice that the server has rebooted, and to reclaim their existing locks > > > without danger of having somebody else steal the lock from them. > > > > > > It is not a protocol requirement, but it is definitely a strongly > > > recommended feaature if you don't want to see corruption in your > > > mailbox/database/logfile/... that relies on those locks. > > > > There are a few things we could do to lessen the pain of the grace > > period, though--such as ending it when we know it's done. (In the v4 > > case, that's just when we know there are no clients to recover state; in > > the v4.1 case, that's when all the RECLAIM_COMPLETE's are done.) > > You can't clear the grace period unless you know that all 3 protocols > are done. I.e. the list of NSM monitored clients was empty, the list of > NFSv4 clients was empty, and the NFSv4.1 reclaim_completes are all done > (or the list was empty). Yup. > In no case should it be done by adjusting the duration of the lease > period. Agreed. --b.