From patchwork Fri Sep 28 21:05:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 1525351 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7E6B0DF283 for ; Fri, 28 Sep 2012 21:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965147Ab2I1VFZ (ORCPT ); Fri, 28 Sep 2012 17:05:25 -0400 Received: from mx2.netapp.com ([216.240.18.37]:57175 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031878Ab2I1VFV (ORCPT ); Fri, 28 Sep 2012 17:05:21 -0400 X-IronPort-AV: E=Sophos;i="4.80,504,1344236400"; d="scan'208";a="695369548" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 28 Sep 2012 14:05:19 -0700 Received: from fedora-64-2.androsad.fake (vpn2ntap-168502.hq.netapp.com [10.55.76.166]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q8SL5Ha0003131; Fri, 28 Sep 2012 14:05:18 -0700 (PDT) From: andros@netapp.com To: trond.myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, Andy Adamson Subject: [PATCH 1/1] NFSv4.0 reclaim reboot state when re-establishing clientid Date: Fri, 28 Sep 2012 17:05:09 -0400 Message-Id: <1348866309-2049-2-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1348866309-2049-1-git-send-email-andros@netapp.com> References: <1348866309-2049-1-git-send-email-andros@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Andy Adamson We should always reclaim state when the lease and therefore the clientid is expired. Signed-off-by: Andy Adamson --- fs/nfs/nfs4state.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index a5331ec..134323a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1600,8 +1600,8 @@ out: return nfs4_recovery_handle_error(clp, status); } -/* Set NFS4CLNT_LEASE_EXPIRED for all v4.0 errors and for recoverable errors - * on EXCHANGE_ID for v4.1 +/* Set NFS4CLNT_LEASE_EXPIRED and reclaim reboot state for all v4.0 errors + * and for recoverable errors on EXCHANGE_ID for v4.1 */ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status) { @@ -1647,6 +1647,8 @@ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status) return status; } set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); + nfs4_state_clear_reclaim_reboot(clp); + nfs4_state_start_reclaim_reboot(clp); dprintk("%s: handled error %d for server %s\n", __func__, status, clp->cl_hostname); return 0;