Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1049355pxb; Thu, 28 Jan 2021 07:00:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2tkaukk606ju2ldkA5FNFcT8WikmWDbN9z19h4noKKHqKtkqMzroY6UqdfXRdc0Ac9z/8 X-Received: by 2002:aa7:d5d5:: with SMTP id d21mr14626547eds.252.1611845999840; Thu, 28 Jan 2021 06:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611845999; cv=none; d=google.com; s=arc-20160816; b=0xaSDrMtNE3rQ9Gt149PU4mFLxslWClzRwYhTrwgEdyTylSFGLb9l0BTSx+WA+qmFN 92rxtcYG8WUYl0092TEeJ3IJrpscipzVyKyqNRVamIAE4TWuhNB9HGED7lt4lrlyq8Kd KHZIQNkGLLLmdX4C/8JY5U00oe++OK2Z+VwNCY1JqhH8y7bVB4h4cZTB8Dzi2YewO11o rfp3glpyByYDw6UjY2F1UPBNuOx4Uu1/PJ4KNLrO8mPP4PVTLDWFWoSuTtA0z7fR8+jl M+Yg5JI4qLYMfysgUcn48gUHzhZ99rky089QUi+TSt0rS3DpS7pzlvTrhqU3872k7arM y1Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=gHJF4jk8KhLzZHekQ9mnv2EKCBiL8OEfeMhNYWKWB0U=; b=stsHA5U8ICs/47yZdv8SCGeMH2qBxHYr6rps+9craKJokp4ODPTcihOsHi6sKrdTEF NeOnVWhwFg22PQbDBqrtVp8tLiMbyPfSJ22BG2mzOlmgCdpwkQfnhjLF5lNiStuDekjy UupDvTjykxPK3gLUUlktCpIPgMTzLJh8DeEVS1+jNZiCUl2waqy1yp2QI7bX+/6/eB23 TBxtOYjQ9A/4GyDCK1QEhSI0pOJMBDnutxevjv9ltVruQAHJm8L+x41aB1AptlcrOvJb XeQfVgsBNEYqQe7k2fCpi6I5LsrVkWbjFT7mVBmHbCD3Cpf+h1SNysI7580Xh9pkswOg 1lVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bW/GlaPV"; 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 e6si3579699edz.362.2021.01.28.06.59.35; Thu, 28 Jan 2021 06:59:59 -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="bW/GlaPV"; 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 S232213AbhA1O5m (ORCPT + 99 others); Thu, 28 Jan 2021 09:57:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49057 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbhA1O4m (ORCPT ); Thu, 28 Jan 2021 09:56:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611845716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=gHJF4jk8KhLzZHekQ9mnv2EKCBiL8OEfeMhNYWKWB0U=; b=bW/GlaPVNZZhYJAI+G/rT50vK7xKTKSArjwcoEn2rhRzKWLZWc2qIaXxsB8CyYmf3ie44X CdmDDcdd9GrMgHrGnEVJtcfM4IwgyvGJMVQyH52KpajZT8Og/R7N06Nbg0Sy5RM7GSfOH3 qIdAaJN0coaaXmSj1lwglGkD/PGWjfs= 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-554-oOYKOrQHOAuhu7FX_F9HRQ-1; Thu, 28 Jan 2021 09:55:14 -0500 X-MC-Unique: oOYKOrQHOAuhu7FX_F9HRQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 552321005504; Thu, 28 Jan 2021 14:55:13 +0000 (UTC) Received: from dwysocha.rdu.csb (ovpn-112-111.rdu2.redhat.com [10.10.112.111]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E6F78189B6; Thu, 28 Jan 2021 14:55:12 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH 06/10] NFS: Allow internal use of read structs and functions Date: Thu, 28 Jan 2021 09:55:04 -0500 Message-Id: <1611845708-6752-7-git-send-email-dwysocha@redhat.com> In-Reply-To: <1611845708-6752-1-git-send-email-dwysocha@redhat.com> References: <1611845708-6752-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 62d3189745cd..8514d002c922 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -457,9 +457,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 d2b6dce1f99f..9618abf01136 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 = data; -- 1.8.3.1