From patchwork Fri Jun 28 12:36:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donald Buczek X-Patchwork-Id: 11022333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FC9414C0 for ; Fri, 28 Jun 2019 12:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE5D283F9 for ; Fri, 28 Jun 2019 12:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03E772878E; Fri, 28 Jun 2019 12:37:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47DFD28783 for ; Fri, 28 Jun 2019 12:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbfF1Mg7 (ORCPT ); Fri, 28 Jun 2019 08:36:59 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:39019 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726578AbfF1Mg7 (ORCPT ); Fri, 28 Jun 2019 08:36:59 -0400 Received: from theinternet.molgen.mpg.de (theinternet.molgen.mpg.de [141.14.31.7]) by mx.molgen.mpg.de (Postfix) with ESMTP id D4A152000C012; Fri, 28 Jun 2019 14:36:57 +0200 (CEST) From: Donald Buczek To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: Donald Buczek Subject: [PATCH 0/4 RESEND] nfs4.0: Refetch lease_time after clientID reset Date: Fri, 28 Jun 2019 14:36:36 +0200 Message-Id: <20190628123640.8715-1-buczek@molgen.mpg.de> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP (rebased on linux-next) We've noticed, that nfs mounts with vers=4.0 do not pick up a updated lease_time after a restart of the nfs server. This was discussed in the thread "4.0 client and server restart with decreased lease time" on linux-nfs [1]. This patch set fixes the issue for nsf4.0 clients so that hey behave as nfs4.1 and nfs4.2 clients do. After a new clientID is established, the lease_time is re-fetched and used. I've notcied, that the flag NFS_CS_CHECK_LEASE_TIME is not functional in the existing code. It is set and tested, but never reset. Either nfs4_setup_state_renewal should reset the flag after it verified the lease_time or the flag could be removed altogether. I left it as is, because I don't known what is preferred. [1] https://marc.info/?t=154954022700002&r=1&w=2 Donald Buczek (4): nfs: Fix copy-and-paste error in debug message nfs4: Rename nfs41_setup_state_renewal nfs4: Move nfs4_setup_state_renewal nfs4.0: Refetch lease_time after clientid update fs/nfs/nfs4state.c | 46 +++++++++++++++++++++++----------------------- fs/nfs/nfs4xdr.c | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-)