From patchwork Thu Jan 22 23:35:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5689471 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 2748CC058D for ; Thu, 22 Jan 2015 23:37:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E9F52026F for ; Thu, 22 Jan 2015 23:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7300520274 for ; Thu, 22 Jan 2015 23:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbbAVXhI (ORCPT ); Thu, 22 Jan 2015 18:37:08 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:61926 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858AbbAVXhH (ORCPT ); Thu, 22 Jan 2015 18:37:07 -0500 Received: by mail-pa0-f42.google.com with SMTP id bj1so3883772pad.1 for ; Thu, 22 Jan 2015 15:37:06 -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=wz/lE5GBil98x41tBKDAGIWCSyx7hudNwtqN+HnaOD0=; b=SrUN1hpw1anrFhgmRLgZIZ8pKtIYokUJ+nfMLAMuzo8VGlIe/oltlf6FIKUYTCUvLA aO/TxbkuRDNDJfur50TuHgQ4oH/+fTLBwbGIJIWd5xsSLZRiTr+q9FaUMPfYIl4rv+ED JZyqN4qlDvrLMJurM4gE16RqF5dsi1CaK6R2hxCF0saflvz+OmGYVn+oFFbVLl9E94Cc fa7Q9kxZxrZc91OkD6gJrLeI/XivBifpavSlbT5gQGjwxT7Hz7+Dg95QoJ99+7eN9p4m LnbAOAyap87SJbDB/b24PbgjB2HMwDKa4XEYUo8F+ZZcSPo+dRvpfM//C8yZBSm0OtbX gqAQ== X-Gm-Message-State: ALoCoQkSK5OGwXa5pAuzZM7FHmOk4zQG6HsRFg0y8cnAH4kZkQpE9EQjQgZ7hZcCSRwkvpZuYAmm X-Received: by 10.66.63.106 with SMTP id f10mr6653087pas.0.1421969826505; Thu, 22 Jan 2015 15:37:06 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id fu1sm366817pdb.80.2015.01.22.15.37.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 15:37:06 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list Subject: [PATCH v5 16/51] NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done() Date: Thu, 22 Jan 2015 15:35:48 -0800 Message-Id: <1421969783-92997-17-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1421969783-92997-1-git-send-email-loghyr@primarydata.com> References: <1421969783-92997-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: Trond Myklebust Enable pNFS callbacks to allow flex files to work correctly with a NFSv3-enabled data server. Signed-off-by: Trond Myklebust --- fs/nfs/nfs3proc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 524f9f8..78e557c 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -800,6 +800,9 @@ static int nfs3_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr) { struct inode *inode = hdr->inode; + if (hdr->pgio_done_cb != NULL) + return hdr->pgio_done_cb(task, hdr); + if (nfs3_async_handle_jukebox(task, inode)) return -EAGAIN; @@ -825,6 +828,9 @@ static int nfs3_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr) { struct inode *inode = hdr->inode; + if (hdr->pgio_done_cb != NULL) + return hdr->pgio_done_cb(task, hdr); + if (nfs3_async_handle_jukebox(task, inode)) return -EAGAIN; if (task->tk_status >= 0) @@ -845,6 +851,9 @@ static void nfs3_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commi static int nfs3_commit_done(struct rpc_task *task, struct nfs_commit_data *data) { + if (data->commit_done_cb != NULL) + return data->commit_done_cb(task, data); + if (nfs3_async_handle_jukebox(task, data->inode)) return -EAGAIN; nfs_refresh_inode(data->inode, data->res.fattr);