From patchwork Wed Dec 24 07:12:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5536941 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1C0DBEEA8 for ; Wed, 24 Dec 2014 07:14:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 027FC201B9 for ; Wed, 24 Dec 2014 07:14:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E793200F2 for ; Wed, 24 Dec 2014 07:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbaLXHNy (ORCPT ); Wed, 24 Dec 2014 02:13:54 -0500 Received: from mail-ig0-f170.google.com ([209.85.213.170]:63006 "EHLO mail-ig0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbaLXHNx (ORCPT ); Wed, 24 Dec 2014 02:13:53 -0500 Received: by mail-ig0-f170.google.com with SMTP id r2so7792183igi.5 for ; Tue, 23 Dec 2014 23:13:52 -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=hPZhc8UkK0VwxAp7BrzmvY/aBZlclx5nfGoKSJoT4PlbuITNomUUc2icKSvzZK1UmC VfJ4HUfiwy+vH9eRKbiKwHYCOW57f0Am8hxjE8MhaED7KCdpdSblkudC8viTlCT79vJ1 8Y+i0jnwKpXEo1k5T/5sU3zjJzrYbYloeaByq61AXEDlcOomx+g+pBWTSIZC391/wFJ8 W8dL6TVT1LbXJdjSiIfN6rZH2LJEC8/WCDPtwT58U8I0jl/l7U5WIsBtMoE5HJ1ifmW2 2c4DcJQCkMusz+SQIZSQ1FulbotuBZJ636BGk3QIrCzg8tDyRMoSeT+slxaPfsSdBXaO 9bIQ== X-Gm-Message-State: ALoCoQm2St/rBZvve+APO71vJOrioblykKHhNGK6vHVQR2Oo8R+8+l5qVRSrHdVK1iCosA5ekL1t X-Received: by 10.107.36.5 with SMTP id k5mr29922441iok.13.1419405232442; Tue, 23 Dec 2014 23:13:52 -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.13.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 23:13:52 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing List Subject: [PATCH v2 16/49] NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done() Date: Tue, 23 Dec 2014 23:12:55 -0800 Message-Id: <1419405208-25975-17-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: 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);