From patchwork Mon Sep 15 22:10:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 4913581 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6EE8A9F467 for ; Mon, 15 Sep 2014 23:20:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25E572015A for ; Mon, 15 Sep 2014 23:23:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 610712012D for ; Mon, 15 Sep 2014 23:23:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760460AbaIOXWd (ORCPT ); Mon, 15 Sep 2014 19:22:33 -0400 Received: from fieldses.org ([174.143.236.118]:54200 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507AbaIOWKb (ORCPT ); Mon, 15 Sep 2014 18:10:31 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1XTeTe-0001QJ-LI; Mon, 15 Sep 2014 18:10:30 -0400 Date: Mon, 15 Sep 2014 18:10:30 -0400 From: "J. Bruce Fields" To: Jeff Layton Cc: linux-nfs@vger.kernel.org Subject: Re: [PATCH v2 1/5] lockd: move lockd's grace period handling into its own module Message-ID: <20140915221030.GE31157@fieldses.org> References: <1408473509-14010-1-git-send-email-jlayton@primarydata.com> <1408473509-14010-2-git-send-email-jlayton@primarydata.com> <20140828200059.GB25203@fieldses.org> <20140828202442.GC25203@fieldses.org> <20140915220813.GC31157@fieldses.org> <20140915220939.GD31157@fieldses.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140915220939.GD31157@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Sep 15, 2014 at 06:09:39PM -0400, J. Bruce Fields wrote: > I considered doing something like the following anyway (total > off-the-cuff draft, not tested), but I think it's overkill. Oh, and the one other nit here is this. --b. commit 24e24d2e8125d917a49b3df6a5248d6ca5c9592b Author: J. Bruce Fields Date: Mon Sep 15 11:05:46 2014 -0400 nfsd4: stop grace_time update at end of grace period The attempt to automatically set a new grace period time at the end of the grace period isn't really helpful. We'll probably shut down and reboot before we actually make use of the new grace period time anyway. So may as well leave it up to the init system to get this right. This just confuses people when they see /proc/fs/nfsd/nfsv4gracetime change from what they set it to. Signed-off-by: J. Bruce Fields --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index fc88b57..a298c3d 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4124,12 +4124,6 @@ nfsd4_end_grace(struct nfsd_net *nn) nn->grace_ended = true; nfsd4_record_grace_done(nn); locks_end_grace(&nn->nfsd4_manager); - /* - * Now that every NFSv4 client has had the chance to recover and - * to see the (possibly new, possibly shorter) lease time, we - * can safely set the next grace time to the current lease time: - */ - nn->nfsd4_grace = nn->nfsd4_lease; } static time_t