From patchwork Wed Mar 15 20:42:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olga Kornievskaia X-Patchwork-Id: 9626661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 13EDE604A9 for ; Wed, 15 Mar 2017 20:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0656F2808F for ; Wed, 15 Mar 2017 20:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF7E9284CB; Wed, 15 Mar 2017 20:43:06 +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=-6.9 required=2.0 tests=BAYES_00,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 3BCE62808F for ; Wed, 15 Mar 2017 20:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbdCOUnF (ORCPT ); Wed, 15 Mar 2017 16:43:05 -0400 Received: from mx142.netapp.com ([216.240.21.19]:13505 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753790AbdCOUmy (ORCPT ); Wed, 15 Mar 2017 16:42:54 -0400 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="177024172" Received: from vmwexchts02-prd.hq.netapp.com ([10.122.105.23]) by mx142-out.netapp.com with ESMTP; 15 Mar 2017 13:32:28 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS02-PRD.hq.netapp.com (10.122.105.23) with Microsoft SMTP Server id 15.0.1210.3; Wed, 15 Mar 2017 13:42:39 -0700 Received: from localhost.localdomain ([10.63.232.61]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id v2FKgfPj019560; Wed, 15 Mar 2017 13:42:42 -0700 (PDT) From: Olga Kornievskaia To: , CC: Subject: [PATCH 1/1] PNFS fix fallback to MDS if got error on commit to DS Date: Wed, 15 Mar 2017 16:42:40 -0400 Message-ID: <20170315204240.44221-1-kolga@netapp.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) 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 Upon receiving an error on commit to the DS, the code doesn't fallback to MDS and instead retried to the same DS again. Signed-off-by: Olga Kornievskaia --- fs/nfs/filelayout/filelayout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index e1d9bea..948cb70 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -382,6 +382,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task, switch (err) { case -NFS4ERR_RESET_TO_MDS: pnfs_generic_prepare_to_resend_writes(data); + pnfs_set_lo_fail(data->lseg); return -EAGAIN; case -EAGAIN: rpc_restart_call_prepare(task);