From patchwork Mon Feb 2 22:39:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5765181 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 9D383BF440 for ; Mon, 2 Feb 2015 22:41:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C75F8209EB for ; Mon, 2 Feb 2015 22:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E67E6209EA for ; Mon, 2 Feb 2015 22:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965377AbbBBWlZ (ORCPT ); Mon, 2 Feb 2015 17:41:25 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:45368 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965376AbbBBWlZ (ORCPT ); Mon, 2 Feb 2015 17:41:25 -0500 Received: by mail-pa0-f45.google.com with SMTP id et14so87964435pad.4 for ; Mon, 02 Feb 2015 14:41:24 -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=09FfOY9Z6E9+BoQBndkrgV/TsQdlJfXij0QSxj36Nvw=; b=SxDDLF7XxEc1e8myXNnUps7MX9gblUQPWa1b6ar1NS975Si0QakDGzAE/H8AiyVymQ Hp5pIYCaLxgQ6HEenZENAGs+AsXJu+rf/xUPg+3BYJpoov56AUxRsfwjt4LYTthe7i3T poVsLlCS13dCrEusgNFd38HKnCq/NA7cw4vGPSVHGPG8L6HqTQ9L14hFXFSWoa4h1v3z bnKqYVdDrkAQss+4dJOQrioxwcXwA5KGnK/32xLfjkbbJ6R9sKea7jvUR7VaGO7t5TNY gI1Ygw5XmvRfF46uY87kVwzKQIyunjIATUxHzh8Yx4lCl2EVVxeaBTvgHB4PlVkQSAay NOIw== X-Gm-Message-State: ALoCoQk0mtYhrjJw5aDbRQhgN01RY9IrsLA2bcbPQZgb5ClKcNiiQgR8j1ggodbY7e5jiMEZ4rzg X-Received: by 10.70.61.6 with SMTP id l6mr26441093pdr.113.1422916884651; Mon, 02 Feb 2015 14:41:24 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id bx13sm94656pdb.19.2015.02.02.14.41.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Feb 2015 14:41:24 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list Subject: [PATCH v6 47/53] nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes Date: Mon, 2 Feb 2015 14:39:01 -0800 Message-Id: <1422916747-86649-48-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1422916747-86649-1-git-send-email-loghyr@primarydata.com> References: <1422916747-86649-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 c26cc22..93f8040 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 5c82bcc..a98cf20 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -500,6 +500,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 *);