From patchwork Wed Dec 24 07:13:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5537211 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 3899F9F301 for ; Wed, 24 Dec 2014 07:14:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 622AF201C7 for ; Wed, 24 Dec 2014 07:14:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82F37201B9 for ; Wed, 24 Dec 2014 07:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751893AbaLXHOX (ORCPT ); Wed, 24 Dec 2014 02:14:23 -0500 Received: from mail-ig0-f181.google.com ([209.85.213.181]:41613 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbaLXHOT (ORCPT ); Wed, 24 Dec 2014 02:14:19 -0500 Received: by mail-ig0-f181.google.com with SMTP id l13so7099415iga.14 for ; Tue, 23 Dec 2014 23:14:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=anLIbt8kUGHENfmoM1/WkGifLw94kjVhlmueUATkca0=; b=EaIx3M2eG46zHsyLV+ZBiaROnzb9W22qONs75aH8emnHvsgNTrrOCLl4eOgw8sWQkb bjS3JU4HPiGP5uOdKCLc9bcBRgA3zrNIph3sfBSjdVieOKwsQluYoMAUoY1KdP4a6XyT fb7dNIUpJjIRRws4WQuElRf+ZcYrj6dfHe4gLJ2Nqdz0a67jT/783Cqf52huibjTLhXn +j5ZLyEkLNijCiWra0MlGfILq7EEkuffrNT+to6c4No5i0tffCNhGF3j+WOXGtE96SM3 8OP5nFBzLo3qaGbY/QffzSqznFaMpzxWqdLKRcM5yiJrvcMgIZ6cOMhQuvT1qca19PEA v2tQ== X-Gm-Message-State: ALoCoQnTbleq1MwMQ2cZpVENpO5gcYWXRMu+K4GoZNZrY8d6jMtNPWsoFFeh05bJAqAIAIMChdAt X-Received: by 10.50.143.37 with SMTP id sb5mr24681575igb.33.1419405258565; Tue, 23 Dec 2014 23:14:18 -0800 (PST) Received: from localhost.localdomain (c-68-40-185-14.hsd1.mi.comcast.net. [68.40.185.14]) by mx.google.com with ESMTPSA id 37sm8821410iog.39.2014.12.23.23.14.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 23:14:18 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing List Subject: [PATCH v2 47/49] nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes Date: Tue, 23 Dec 2014 23:13:26 -0800 Message-Id: <1419405208-25975-48-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1419405208-25975-1-git-send-email-loghyr@primarydata.com> References: <1419405208-25975-1-git-send-email-loghyr@primarydata.com> 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, T_RP_MATCHES_RCVD, 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 From: Peng Tao To allow pnfs LD to ask direct writes to be resend. Signed-off-by: Peng Tao --- fs/nfs/direct.c | 6 ++++++ fs/nfs/internal.h | 1 + 2 files changed, 7 insertions(+) diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index eb81478..4fad6b7 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -116,6 +116,12 @@ static inline int put_dreq(struct nfs_direct_req *dreq) return atomic_dec_and_test(&dreq->io_count); } +void nfs_direct_set_resched_writes(struct nfs_direct_req *dreq) +{ + dreq->flags = NFS_ODIRECT_RESCHED_WRITES; +} +EXPORT_SYMBOL_GPL(nfs_direct_set_resched_writes); + static void nfs_direct_good_bytes(struct nfs_direct_req *dreq, struct nfs_pgio_header *hdr) { diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index ffe4b7a..44e8496 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -502,6 +502,7 @@ static inline void nfs_inode_dio_wait(struct inode *inode) inode_dio_wait(inode); } extern ssize_t nfs_dreq_bytes_left(struct nfs_direct_req *dreq); +extern void nfs_direct_set_resched_writes(struct nfs_direct_req *dreq); /* nfs4proc.c */ extern void __nfs4_read_done_cb(struct nfs_pgio_header *);