From patchwork Wed Jan 6 16:51:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 7968911 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2442ABEEE5 for ; Wed, 6 Jan 2016 16:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F02920125 for ; Wed, 6 Jan 2016 16:51:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74FCA20123 for ; Wed, 6 Jan 2016 16:51:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbcAFQvv (ORCPT ); Wed, 6 Jan 2016 11:51:51 -0500 Received: from smtp-o-3.desy.de ([131.169.56.156]:60233 "EHLO smtp-o-3.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbcAFQvv (ORCPT ); Wed, 6 Jan 2016 11:51:51 -0500 X-Clacks-Overhead: GNU Terry Pratchett Received: from smtp-map-3.desy.de (smtp-map-3.desy.de [131.169.56.68]) by smtp-o-3.desy.de (DESY-O-3) with ESMTP id D25932802D5 for ; Wed, 6 Jan 2016 17:51:49 +0100 (CET) Received: from ZITSWEEP2.win.desy.de (zitsweep2.win.desy.de [131.169.97.96]) by smtp-map-3.desy.de (DESY_MAP_3) with ESMTP id BF94A4475 for ; Wed, 6 Jan 2016 17:51:49 +0100 (MET) Received: from smtp-intra-3.desy.de (lb-40-26.desy.de) by ZITSWEEP2.win.desy.de (Clearswift SMTPRS 5.5.0) with ESMTP id ; Wed, 6 Jan 2016 17:51:49 +0100 Received: from anahit.desy.de (anahit.desy.de [131.169.185.68]) by smtp-intra-3.desy.de (DESY-INTRA-3) with ESMTP id 5C2FE4473; Wed, 6 Jan 2016 17:51:49 +0100 (MET) From: Tigran Mkrtchyan To: trond.myklebust@primarydata.com Cc: linux-nfs@vger.kernel.org, Tigran Mkrtchyan Subject: [PATCH] nfs: set RPC_TASK_TIMEOUT on rpc task to separate TIMEOUT from IO errors Date: Wed, 6 Jan 2016 17:51:30 +0100 Message-Id: <1452099090-31729-2-git-send-email-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452099090-31729-1-git-send-email-tigran.mkrtchyan@desy.de> References: <1452099090-31729-1-git-send-email-tigran.mkrtchyan@desy.de> 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 to help debug nfs problems Signed-off-by: Tigran Mkrtchyan --- fs/nfs/read.c | 2 +- fs/nfs/write.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 0a5e33f..0fae3f3 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -191,7 +191,7 @@ static void nfs_initiate_read(struct nfs_pgio_header *hdr, struct inode *inode = hdr->inode; int swap_flags = IS_SWAPFILE(inode) ? NFS_RPC_SWAPFLAGS : 0; - task_setup_data->flags |= swap_flags; + task_setup_data->flags |= swap_flags | RPC_TASK_TIMEOUT; rpc_ops->read_setup(hdr, msg); } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 7b93164..05c9963 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1296,6 +1296,7 @@ static void nfs_initiate_write(struct nfs_pgio_header *hdr, int priority = flush_task_priority(how); task_setup_data->priority = priority; + task_setup_data->flags |= RPC_TASK_TIMEOUT; rpc_ops->write_setup(hdr, msg); nfs4_state_protect_write(NFS_SERVER(hdr->inode)->nfs_client, @@ -1578,7 +1579,7 @@ int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data, .callback_ops = call_ops, .callback_data = data, .workqueue = nfsiod_workqueue, - .flags = RPC_TASK_ASYNC | flags, + .flags = RPC_TASK_ASYNC | RPC_TASK_TIMEOUT | flags, .priority = priority, }; /* Set up the initial task struct. */