From patchwork Tue Dec 16 19:01:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5502901 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 0B521BEEBA for ; Tue, 16 Dec 2014 19:02:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 326FD209D2 for ; Tue, 16 Dec 2014 19:02:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D72F209C4 for ; Tue, 16 Dec 2014 19:02:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751222AbaLPTCf (ORCPT ); Tue, 16 Dec 2014 14:02:35 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:45405 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbaLPTCe (ORCPT ); Tue, 16 Dec 2014 14:02:34 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so14710693pad.38 for ; Tue, 16 Dec 2014 11:02:34 -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=Fp04FqUEc5XRO0jKG8RVyfpX8Cyg/BLkJoOWYzZxXkv8v1N67xlRamG0qv10/TsUg/ fUqEzgyzw4CR8mt1c4YcRYOXbY3Pdfu4SIoTw2XRns/Tvpj3CaUS7alGLz0lEKpT9I7f XKPkNDHpdCd6BO//0LqKppyFO1+FcJgXPj50hsGCqA0xidj/eKzRkdZgQKXtCuRcw4+e fBOt0DFfwYowhFLj0QLXKgPJTepuXyCNXiRW3HQrYYzWboKbxA845cchTmy5VWZDR2CA Q3BH4A5cOTuFXeo/o4uN0ikuwaMblJROcbCKH4KTuSKdNcgrGFCXFRNEVL4ZAlKcrrZ8 iabA== X-Gm-Message-State: ALoCoQm3uNAWOhKHXAwZLqJzq6TvlMgUhgijs64AKfijXJFyhdPleX7lk8ma3CKQ127CtXyi2Uon X-Received: by 10.66.119.193 with SMTP id kw1mr34210378pab.45.1418756553766; Tue, 16 Dec 2014 11:02:33 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id q4sm1620669pdh.79.2014.12.16.11.02.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 11:02:33 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing List Subject: [PATCH 16/50] NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done() Date: Tue, 16 Dec 2014 11:01:19 -0800 Message-Id: <1418756513-95187-17-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1418756513-95187-1-git-send-email-loghyr@primarydata.com> References: <1418756513-95187-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);