From patchwork Fri Aug 9 16:52:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 2842052 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 0F6D99F271 for ; Fri, 9 Aug 2013 16:52:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CFDA202EA for ; Fri, 9 Aug 2013 16:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46C09202A7 for ; Fri, 9 Aug 2013 16:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968224Ab3HIQwc (ORCPT ); Fri, 9 Aug 2013 12:52:32 -0400 Received: from mail-ye0-f174.google.com ([209.85.213.174]:45040 "EHLO mail-ye0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968218Ab3HIQwc (ORCPT ); Fri, 9 Aug 2013 12:52:32 -0400 Received: by mail-ye0-f174.google.com with SMTP id q9so1300585yen.19 for ; Fri, 09 Aug 2013 09:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:from:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=6qhr/46XHF1sKSW3dyesHplj2ry83sOl84qOHahdRa4=; b=JW6fywbVbgqOakVlkQS6ZvLP6bCJIXaoWBJ/WBCHGiYf6BQT9PvXCiYV5t4NZw5XgE 4ucWcL0uIsD/usCiDgFcw0j1HO8OI0lmTyTTr5s7aSGJ2PL9OtX9yzOeffFrHOQ0MBEU 7wR2rAiQ+hiiuccO17pSRTOC+hNEHC9KCvIOS+eeDBHK/ApYvvQxOKfe/IH4aAkY749i u+EMp1GX15EmNOsZ1oXGnuMCScJd5ftP9acW5GWNzoJ3AiegEY85f4jRyd+4g3m34a6w BS0DhzUWBO50xYVsQhj5Zq/DNtxevK+/NgK11rV41wOyZoTj1NzBaU/x9mpZaZLZS2/i KKRA== X-Received: by 10.236.142.105 with SMTP id h69mr5777534yhj.174.1376067151481; Fri, 09 Aug 2013 09:52:31 -0700 (PDT) Received: from seurat.1015granger.net ([2604:8800:100:81fc:20c:29ff:fe44:ec31]) by mx.google.com with ESMTPSA id v32sm20695277yhc.12.2013.08.09.09.52.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 09:52:30 -0700 (PDT) Subject: [PATCH v2 31/33] NFS: Implement support for NFS4ERR_LEASE_MOVED To: linux-nfs@vger.kernel.org From: Chuck Lever Date: Fri, 09 Aug 2013 12:52:29 -0400 Message-ID: <20130809165229.5362.54228.stgit@seurat.1015granger.net> In-Reply-To: <20130809161957.5362.90865.stgit@seurat.1015granger.net> References: <20130809161957.5362.90865.stgit@seurat.1015granger.net> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 With NFSv4 minor version 0, the asynchronous lease RENEW heartbeat can return NFS4ERR_LEASE_MOVED. Error recovery logic for async RENEW is a separate code path from the generic NFS proc paths, so it must be updated to handle LEASE_MOVED as well. Signed-off-by: Chuck Lever --- fs/nfs/nfs4proc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 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/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 11283da..ecf8e96 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4158,7 +4158,13 @@ static void nfs4_renew_done(struct rpc_task *task, void *calldata) struct nfs_client *clp = data->client; unsigned long timestamp = data->timestamp; - if (task->tk_status < 0) { + switch (task->tk_status) { + case 0: + break; + case -NFS4ERR_LEASE_MOVED: + nfs4_schedule_lease_moved_recovery(clp); + break; + default: /* Unless we're shutting down, schedule state recovery! */ if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0) return;