From patchwork Wed Jan 7 00:28:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5578431 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 B7207BF6C3 for ; Wed, 7 Jan 2015 00:30:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E57D52024C for ; Wed, 7 Jan 2015 00:30:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BFF6201EF for ; Wed, 7 Jan 2015 00:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756307AbbAGAaC (ORCPT ); Tue, 6 Jan 2015 19:30:02 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34554 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057AbbAGAaA (ORCPT ); Tue, 6 Jan 2015 19:30:00 -0500 Received: by mail-pa0-f48.google.com with SMTP id rd3so1086179pab.7 for ; Tue, 06 Jan 2015 16:30:00 -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=j+6ZNq9hZoExtzgJXzHgcvigBua6dgiyWzG5kqw8C23KAbCUBmDNEzzuIM7hZPqrdb U1bTbP86e7VeTFqJo+DKGpdfHGcpESH/T8sSD8GNGtxoh02+G7X5W7p2nQRce84j7hOE 0K52tKOkj4qqNiMjrCB+1EBxNRxrDLxG/P/pF05Z1m4Q2ZattGs6nCGTcoSC+Cd2K8B4 Zg5iG0RYd0BVTmZYlzXqNITIOYiD9HXz32q3DSVwJPDZS7O94CLZqJyH/b7nPWKaBzF2 PwXU6yf37bctxKH2Ga2bL6VavFitmefboaTfNgwGf8pOFQbI8lxR3slNn1PMgkN+bsv+ KDjw== X-Gm-Message-State: ALoCoQmZxYwM+bgYsJ58XCiN5EOHmbGB/cPKMvAxAFZHmQThS7s1EV90W2zJw0ER0TfnPdi2I94g X-Received: by 10.70.128.173 with SMTP id np13mr177498pdb.15.1420590600451; Tue, 06 Jan 2015 16:30:00 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id wi15sm53763pac.21.2015.01.06.16.29.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jan 2015 16:29:59 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list Subject: [PATCH v3 47/49] nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes Date: Tue, 6 Jan 2015 16:28:52 -0800 Message-Id: <1420590534-84063-48-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1420590534-84063-1-git-send-email-loghyr@primarydata.com> References: <1420590534-84063-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 *);