From patchwork Wed Jan 14 16:44:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5633251 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BEDD89F8A6 for ; Wed, 14 Jan 2015 16:45:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0526E20138 for ; Wed, 14 Jan 2015 16:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 261A720123 for ; Wed, 14 Jan 2015 16:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753664AbbANQpk (ORCPT ); Wed, 14 Jan 2015 11:45:40 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:51668 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753348AbbANQpa (ORCPT ); Wed, 14 Jan 2015 11:45:30 -0500 Received: by mail-pa0-f53.google.com with SMTP id kq14so11495611pab.12 for ; Wed, 14 Jan 2015 08:45:30 -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=bl5ngY57bIQpuadbYlNCpuI//G9Ol2O4tv0yo5/HuhOWgs+82tMt0IUH7P6symvA/J fGfo/jx6Yq6SC3/6lr1nNo5Olh5dFCO2cS+CalJZEwR0unw1m5qM3C+b9xv25gCVbZ3i hvY7EokGirXvq1njMMU4GA6OQA3ORd86MwF36mz/SQKqsYUv/qF8DGYgoWVi/96wTU1f Cr7wtylNmqj6H8rx1S0OecU1XGc2+x43hzNRJt16WF8psx9Mv3E8LMSkedYHnbg3ljsp wAkbgynZuS0MpMfQFh2XWNhrLzyjz0A1hKR4ZuCEAeL1/PeKAy7Oq0fbQJ4BttewxPKk a0nw== X-Gm-Message-State: ALoCoQkMskxwvfplwQeURQbrseRZIPa9xVhky6+PpTh08pE3Uw2oFT2+kGGjsrPr/fgK/2t0/g5f X-Received: by 10.68.136.98 with SMTP id pz2mr7185600pbb.154.1421253930543; Wed, 14 Jan 2015 08:45:30 -0800 (PST) Received: from localhost.localdomain ([50.242.95.105]) by mx.google.com with ESMTPSA id u7sm12239039pdp.45.2015.01.14.08.45.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jan 2015 08:45:29 -0800 (PST) From: Tom Haynes X-Google-Original-From: Tom Haynes To: Trond Myklebust Cc: Linux NFS Mailing list Subject: [PATCH v4 16/50] NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done() Date: Wed, 14 Jan 2015 08:44:22 -0800 Message-Id: <1421253896-73106-17-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1421253896-73106-1-git-send-email-loghyr@primarydata.com> References: <1421253896-73106-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);