Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1998189pxb; Sat, 21 Nov 2020 05:31:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOwEyRLYcqoM/ZQWy2Mbs4bW5ONgnL2rhPSn7+AkLQyXTiMeRuRjuVEH95Q7kJsoXugknl X-Received: by 2002:a17:906:f753:: with SMTP id jp19mr36044507ejb.280.1605965477065; Sat, 21 Nov 2020 05:31:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605965477; cv=none; d=google.com; s=arc-20160816; b=SOUuzvlu7KLR+AjPjeeP+iRluHwfhyXg4rIS0Exw1JRiYAL8WiRHgINC85kZbE26As NaIs3O/NFHiFpR0NzAi/QfJ2Oyb313pjKo3zQsnvCRCvxDSSDk8mxCbkQzINbD5bVzWq TiVW3mDJPGdxSIRMGRHEjQnmaxf0Jz4MuYklOMmd4AvdKBd79zyMZ7e3q3nZRacy23KY fZfhoPEFHQZga+W2Mba+ZuzwbNKqz28L+PuclTHdadSPqoEyypiRAhYNkGgGLBijOYmT 4K8LCplOPi1DCJUMoB8sAeuVl6Z5ZupncOq1a/rnX5L2yjwdfQEpvmFkuV2nroZ5tr+U /koQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=99+yO/aWThQ14Eme0jkMqC+QKGQbeO7+eG+X+ZgQ/3o=; b=bR25BY8wZ6grGEqW960AVi6B5TaGMYlkf5FaNFyrCwB2fCQoX1oaFyj3nvxGKW2fJc m+zcrKGJ4f/foi8KK9ak8E+G8EKm82WigSVP8TVry/w0yRXdFaLl+ozs0+moMYsRoS3V hT4QR6BUo0q+R7eOZPOzja3CB/CS6VF7WsoYDUfxXrcHunPHJM+aV08LfIcWwB0zCgJF 5krD1bM9x1/hFh3G8xCmtz8eo+fLX95vrnRjNfS+08Wy09EGcerZQHGtdGMXEaVmLNaa FUA8EZV+yVy2Oe3DSM4guMMN1PNIAeUzjCXJX0S8pQF3tWbKltB5fU4uR5vACxh045Lr S4WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Tp3zjf/d"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by4si3272283ejc.732.2020.11.21.05.30.54; Sat, 21 Nov 2020 05:31:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Tp3zjf/d"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727817AbgKUN32 (ORCPT + 99 others); Sat, 21 Nov 2020 08:29:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43363 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbgKUN32 (ORCPT ); Sat, 21 Nov 2020 08:29:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605965367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=99+yO/aWThQ14Eme0jkMqC+QKGQbeO7+eG+X+ZgQ/3o=; b=Tp3zjf/dCasZmIKfdNFJoHIMX3dqdk9WTRFZRLX3/l6XO/FuyeSbQtDO0RF7VNb8JUFqEf xo54MfayPCwUrLPqnIGRqommRVDEKmde01D/Wmq7T/jYMolyiUcAesLHR4se4310diusGH /F61mBlHIivCGZnXJdfMW2DgLl+6RI0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-130-o_95wvC1NtOZU41jjQyX4Q-1; Sat, 21 Nov 2020 08:29:25 -0500 X-MC-Unique: o_95wvC1NtOZU41jjQyX4Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A3C6E1005D65; Sat, 21 Nov 2020 13:29:24 +0000 (UTC) Received: from dwysocha.rdu.csb (ovpn-112-41.rdu2.redhat.com [10.10.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CD6B5D9D7; Sat, 21 Nov 2020 13:29:24 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org, dhowells@redhat.com Subject: [PATCH v1 06/13] NFS: Allow internal use of read structs and functions Date: Sat, 21 Nov 2020 08:29:22 -0500 Message-Id: <1605965362-24677-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The conversion of the NFS read paths to the new fscache API will require use of a few read structs and functions, so move these declarations as required. Signed-off-by: Dave Wysochanski --- fs/nfs/internal.h | 8 ++++++++ fs/nfs/read.c | 13 ++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 6673a77884d9..513c62fc3df0 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -443,9 +443,17 @@ extern char *nfs_path(char **p, struct dentry *dentry, struct nfs_pgio_completion_ops; /* read.c */ +extern const struct nfs_pgio_completion_ops nfs_async_read_completion_ops; extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, struct inode *inode, bool force_mds, const struct nfs_pgio_completion_ops *compl_ops); +struct nfs_readdesc { + struct nfs_pageio_descriptor pgio; + struct nfs_open_context *ctx; +}; +extern int readpage_async_filler(void *data, struct page *page); +extern void nfs_pageio_complete_read(struct nfs_pageio_descriptor *pgio, + struct inode *inode); extern void nfs_read_prepare(struct rpc_task *task, void *calldata); extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio); diff --git a/fs/nfs/read.c b/fs/nfs/read.c index c2df4040f26c..13266eda8f60 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -30,7 +30,7 @@ #define NFSDBG_FACILITY NFSDBG_PAGECACHE -static const struct nfs_pgio_completion_ops nfs_async_read_completion_ops; +const struct nfs_pgio_completion_ops nfs_async_read_completion_ops; static const struct nfs_rw_ops nfs_rw_read_ops; static struct kmem_cache *nfs_rdata_cachep; @@ -74,7 +74,7 @@ void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, } EXPORT_SYMBOL_GPL(nfs_pageio_init_read); -static void nfs_pageio_complete_read(struct nfs_pageio_descriptor *pgio, +void nfs_pageio_complete_read(struct nfs_pageio_descriptor *pgio, struct inode *inode) { struct nfs_pgio_mirror *pgm; @@ -132,11 +132,6 @@ static void nfs_readpage_release(struct nfs_page *req, int error) nfs_release_request(req); } -struct nfs_readdesc { - struct nfs_pageio_descriptor pgio; - struct nfs_open_context *ctx; -}; - static void nfs_page_group_set_uptodate(struct nfs_page *req) { if (nfs_page_group_sync_on_bit(req, PG_UPTODATE)) @@ -215,7 +210,7 @@ static void nfs_initiate_read(struct nfs_pgio_header *hdr, } } -static const struct nfs_pgio_completion_ops nfs_async_read_completion_ops = { +const struct nfs_pgio_completion_ops nfs_async_read_completion_ops = { .error_cleanup = nfs_async_read_error, .completion = nfs_read_completion, }; @@ -290,7 +285,7 @@ static void nfs_readpage_result(struct rpc_task *task, nfs_readpage_retry(task, hdr); } -static int +int readpage_async_filler(void *data, struct page *page) { struct nfs_readdesc *desc = (struct nfs_readdesc *)data; -- 1.8.3.1