Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1956189pxb; Fri, 5 Feb 2021 05:53:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/uubSPCcQGOkebPO1q/tHcEc94rj73jBdOQiIa9neUiTn7t561fHnojHudkWjRlQvNLGJ X-Received: by 2002:a05:6402:215:: with SMTP id t21mr3608850edv.363.1612533190836; Fri, 05 Feb 2021 05:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612533190; cv=none; d=google.com; s=arc-20160816; b=rK1c/rgQX2Oth/jRg2R4zUT4e5PbpHQ1YqZFsCIFtzx0vCpaRInG22/8jWVOozZi2H 0LGbPJYnh/xBXgHUCLpuOt6ZRQkJjcuxeY1I2Gr4MWQQdvXfr/MOHOlYOH3qInXspc65 Gtaqquro2pmMbY2QhDc9OLyWM5kGGCrvAlb2aKT7gLDp+oQGsMEfL4PFnsZXDtgFB/E5 fpRw3qTe5yido6u+ImYqwfWws1Any6XKSV8ygHXSGUj7pel2HPmqHALGVgqVBJUj2JIH kautyV+0Bq2pXEEde4huGr8Xjqc2OEjqRFjxLOOfQb49+HBLWFvRWIKzVSDWtavFByjq AiLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FIFkNLl5v/SguqXZhdWO0Mq3LcGhxJ3ad0PNY2vLZXs=; b=wLtgjcAPaFHc8ia6mPKiLi3Qj2nFeL3uPlMnQR1VALGRUo+drng6QoAgZrnm74GJt3 iGxpaumbBPD5ddlCQmOM4hGHUJR82IEpeF3K/8kU2FzbPdkkdOHKOQCJllBCOoVWDfFZ LVImmUKbyqWjA757EZSvHv+Khqjy2RIKC4arIZZf7mKC1Xeuu8h5xE9xxUWPQ87qdYS6 2neGNtCf6UJjVZr67o0cSPA9ti/W1g13dtuLMf0OPXU/CQj0zQW9YpH3cEq89hym77+M Doj1/+lhvv5gMGwUY5ZhHGNfoZaNNc/a1EUbBYLSFTNFjgvj1iPK8V1AMp/RpaAdklu8 BG3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KqSxYK4h; 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 o6si2863235edr.440.2021.02.05.05.52.35; Fri, 05 Feb 2021 05:53:10 -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=KqSxYK4h; 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 S231446AbhBENvx (ORCPT + 99 others); Fri, 5 Feb 2021 08:51:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57446 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbhBENtZ (ORCPT ); Fri, 5 Feb 2021 08:49:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612532878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FIFkNLl5v/SguqXZhdWO0Mq3LcGhxJ3ad0PNY2vLZXs=; b=KqSxYK4hIJyUtE+O/XxgRBuzBHbQyNteX0GRAXJa3DbTYGaFyUEE/P+6SUrf7ELGOXAZta xQdEvcVuMxHWSrCw5GWfQGZxykOxrpAlLuSj19nWStAZpCR82owaUNj83jMkG75W/fjLwf 2+VfYvuaaVRrxE3GwLtr7LK9bTYvRsA= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-137-2eoxVlOlOU21HGSijCpnaA-1; Fri, 05 Feb 2021 08:47:57 -0500 X-MC-Unique: 2eoxVlOlOU21HGSijCpnaA-1 Received: by mail-ed1-f69.google.com with SMTP id a26so7111180edx.8 for ; Fri, 05 Feb 2021 05:47:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FIFkNLl5v/SguqXZhdWO0Mq3LcGhxJ3ad0PNY2vLZXs=; b=ZCgKMTdjQ5ezlGQt45r9ELR39Mm0dFL1U7HE9o9MizAbnRN9hFhspBItGToQmgZ00g S4slRavmJ38awt8kd+cRbQOP4TktmDmrzwWqhJwn+TDFS3BnE4LQHyaKzglbwnqosMd/ 3UF3rSK+gBbjoI6M83KtGbEmIo+utTMjaxRxrBeagOMOn89M1ybTfkILEPvHfaY/fGKW Zwmg2gkVknWEuOX4LtclRll6B9IhhEWsDFHtaP0CPPf7NMHMnT8U3fg24g3gAiairvGA CLSkji2Yx+9aZx0/MZlgpo33ulzkQ0+LE2WnXPuIlehgafutyH5Pv0/y9gWcdXjFIPEK YDng== X-Gm-Message-State: AOAM533/qD/GjVGgOS2faHzJiEGBZeST6Qeopd2NqziFm3RkGrTWN3zf 6GxlqAvC3s0Fpqh8ND04a9wibKbUUB+SKCKqyPwH8Ll0dGTGhBPLX/kIO8tjq0yQ2CWjApN4HPB M7a59QYjU1coZOJB2D0BBCPoluHatPsIVxi6v X-Received: by 2002:a17:906:4451:: with SMTP id i17mr3892184ejp.436.1612532875821; Fri, 05 Feb 2021 05:47:55 -0800 (PST) X-Received: by 2002:a17:906:4451:: with SMTP id i17mr3892177ejp.436.1612532875655; Fri, 05 Feb 2021 05:47:55 -0800 (PST) MIME-Version: 1.0 References: <1611845708-6752-1-git-send-email-dwysocha@redhat.com> <1611845708-6752-7-git-send-email-dwysocha@redhat.com> In-Reply-To: <1611845708-6752-7-git-send-email-dwysocha@redhat.com> From: David Wysochanski Date: Fri, 5 Feb 2021 08:47:19 -0500 Message-ID: Subject: Re: [PATCH 06/10] NFS: Allow internal use of read structs and functions To: Trond Myklebust , Anna Schumaker Cc: linux-nfs Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jan 28, 2021 at 9:59 AM Dave Wysochanski wrote: > > 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 > Anna, FYI, you could drop this from your linux-next branch if you want. Since the fscache conversion patches are not included, we don't really need this patch. The other patches 1-5 I are valid cleanups but this really goes with the conversion patches. It's your call though.