From patchwork Wed Jan 7 00:28:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5578161 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 6C616BF6C3 for ; Wed, 7 Jan 2015 00:29:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 935C82010B for ; Wed, 7 Jan 2015 00:29:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B157820251 for ; Wed, 7 Jan 2015 00:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754604AbbAGA33 (ORCPT ); Tue, 6 Jan 2015 19:29:29 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:61840 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754487AbbAGA32 (ORCPT ); Tue, 6 Jan 2015 19:29:28 -0500 Received: by mail-pa0-f44.google.com with SMTP id et14so1105297pad.3 for ; Tue, 06 Jan 2015 16:29:28 -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=EO4SI3j6TBrtjlpKBd7t4pdG8qSXunIlGwydh3QXkBm7T8u1V8QBtfe60CItOWSetA 5qSXnof6ejh+l4tCC/KqVEPlelk3386MwYTul8xgtLC5O4SlqaqF+b6WJg0BcNU2UtsO ft1xseT4H6HzJyowAfH57chIc3viYyh57Ne5IxjoUcPk9jI9EUbTZbjtSO8KGBrAYG6z Z0t2MATrJ76r1PfQOwDWaO1R3bo7LL1+oVDdy629c572V56rxUDNKYHMcmNln1615F7I zMkoG4DJOs8tlabdLTt45m7N9iMEtKMihcNlEbPl9N0XPUiIPsTVRYSqwzmziJDb5uFp SHEQ== X-Gm-Message-State: ALoCoQkD5dhx3CYTVAxQOflaFFA+wiHwDu3g0Nt9+JiDGKf7xabuBBVqW3XeT7xDZhcHHjVj6lZs X-Received: by 10.66.254.68 with SMTP id ag4mr154761pad.39.1420590567968; Tue, 06 Jan 2015 16:29:27 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id wi15sm53763pac.21.2015.01.06.16.29.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jan 2015 16:29:27 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list Subject: [PATCH v3 16/49] NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done() Date: Tue, 6 Jan 2015 16:28:21 -0800 Message-Id: <1420590534-84063-17-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: 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);