From: Jeff Layton <jlayton@kernel.org>
To: Mike Snitzer <snitzer@kernel.org>, linux-nfs@vger.kernel.org
Cc: Chuck Lever <chuck.lever@oracle.com>,
Trond Myklebust <trondmy@hammerspace.com>,
snitzer@hammerspace.com
Subject: Re: [for-6.11 PATCH 01/29] nfs: pass nfs_client to nfs_initiate_pgio
Date: Mon, 10 Jun 2024 08:02:17 -0400 [thread overview]
Message-ID: <28ac0f056e15c57a3d45cc7155580eb4494afc04.camel@kernel.org> (raw)
In-Reply-To: <20240607142646.20924-2-snitzer@kernel.org>
On Fri, 2024-06-07 at 10:26 -0400, Mike Snitzer wrote:
> From: Weston Andros Adamson <dros@primarydata.com>
>
> The nfs_client is needed for localio support.
>
> Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
> Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com>
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
> ---
> fs/nfs/filelayout/filelayout.c | 4 ++--
> fs/nfs/flexfilelayout/flexfilelayout.c | 6 ++++--
> fs/nfs/internal.h | 5 +++--
> fs/nfs/pagelist.c | 10 ++++++----
> 4 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/fs/nfs/filelayout/filelayout.c
> b/fs/nfs/filelayout/filelayout.c
> index 29d84dc66ca3..43e16e9e0176 100644
> --- a/fs/nfs/filelayout/filelayout.c
> +++ b/fs/nfs/filelayout/filelayout.c
> @@ -486,7 +486,7 @@ filelayout_read_pagelist(struct nfs_pgio_header
> *hdr)
> hdr->mds_offset = offset;
>
> /* Perform an asynchronous read to ds */
> - nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
> + nfs_initiate_pgio(ds->ds_clp, ds_clnt, hdr, hdr->cred,
> NFS_PROTO(hdr->inode),
> &filelayout_read_call_ops,
> 0, RPC_TASK_SOFTCONN);
> return PNFS_ATTEMPTED;
> @@ -528,7 +528,7 @@ filelayout_write_pagelist(struct nfs_pgio_header
> *hdr, int sync)
> hdr->args.offset = filelayout_get_dserver_offset(lseg,
> offset);
>
> /* Perform an asynchronous write */
> - nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
> + nfs_initiate_pgio(ds->ds_clp, ds_clnt, hdr, hdr->cred,
> NFS_PROTO(hdr->inode),
> &filelayout_write_call_ops,
> sync, RPC_TASK_SOFTCONN);
> return PNFS_ATTEMPTED;
> diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c
> b/fs/nfs/flexfilelayout/flexfilelayout.c
> index 24188af56d5b..327f1a5c9fbe 100644
> --- a/fs/nfs/flexfilelayout/flexfilelayout.c
> +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
> @@ -1803,7 +1803,8 @@ ff_layout_read_pagelist(struct nfs_pgio_header
> *hdr)
> hdr->mds_offset = offset;
>
> /* Perform an asynchronous read to ds */
> - nfs_initiate_pgio(ds_clnt, hdr, ds_cred, ds->ds_clp-
> >rpc_ops,
> + nfs_initiate_pgio(ds->ds_clp, ds_clnt, hdr, ds_cred,
> + ds->ds_clp->rpc_ops,
> vers == 3 ? &ff_layout_read_call_ops_v3 :
> &ff_layout_read_call_ops_v4,
> 0, RPC_TASK_SOFTCONN);
> @@ -1871,7 +1872,8 @@ ff_layout_write_pagelist(struct nfs_pgio_header
> *hdr, int sync)
> hdr->args.offset = offset;
>
> /* Perform an asynchronous write */
> - nfs_initiate_pgio(ds_clnt, hdr, ds_cred, ds->ds_clp-
> >rpc_ops,
> + nfs_initiate_pgio(ds->ds_clp, ds_clnt, hdr, ds_cred,
> + ds->ds_clp->rpc_ops,
> vers == 3 ? &ff_layout_write_call_ops_v3 :
> &ff_layout_write_call_ops_v4,
> sync, RPC_TASK_SOFTCONN);
> diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
> index 9f0f4534744b..a9c0c29f7804 100644
> --- a/fs/nfs/internal.h
> +++ b/fs/nfs/internal.h
> @@ -306,8 +306,9 @@ extern const struct nfs_pageio_ops
> nfs_pgio_rw_ops;
> struct nfs_pgio_header *nfs_pgio_header_alloc(const struct
> nfs_rw_ops *);
> void nfs_pgio_header_free(struct nfs_pgio_header *);
> int nfs_generic_pgio(struct nfs_pageio_descriptor *, struct
> nfs_pgio_header *);
> -int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header
> *hdr,
> - const struct cred *cred, const struct
> nfs_rpc_ops *rpc_ops,
> +int nfs_initiate_pgio(struct nfs_client *clp, struct rpc_clnt
> *rpc_clnt,
> + struct nfs_pgio_header *hdr, const struct cred
> *cred,
> + const struct nfs_rpc_ops *rpc_ops,
> const struct rpc_call_ops *call_ops, int how,
> int flags);
> void nfs_free_request(struct nfs_page *req);
> struct nfs_pgio_mirror *
> diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
> index 6efb5068c116..d9b795c538cd 100644
> --- a/fs/nfs/pagelist.c
> +++ b/fs/nfs/pagelist.c
> @@ -844,8 +844,9 @@ static void nfs_pgio_prepare(struct rpc_task
> *task, void *calldata)
> rpc_exit(task, err);
> }
>
> -int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header
> *hdr,
> - const struct cred *cred, const struct
> nfs_rpc_ops *rpc_ops,
> +int nfs_initiate_pgio(struct nfs_client *clp, struct rpc_clnt
> *rpc_clnt,
> + struct nfs_pgio_header *hdr, const struct cred
> *cred,
> + const struct nfs_rpc_ops *rpc_ops,
> const struct rpc_call_ops *call_ops, int how,
> int flags)
> {
> struct rpc_task *task;
> @@ -855,7 +856,7 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt,
> struct nfs_pgio_header *hdr,
> .rpc_cred = cred,
> };
> struct rpc_task_setup task_setup_data = {
> - .rpc_client = clnt,
> + .rpc_client = rpc_clnt,
> .task = &hdr->task,
> .rpc_message = &msg,
> .callback_ops = call_ops,
> @@ -1070,7 +1071,8 @@ static int nfs_generic_pg_pgios(struct
> nfs_pageio_descriptor *desc)
> if (ret == 0) {
> if (NFS_SERVER(hdr->inode)->nfs_client-
> >cl_minorversion)
> task_flags = RPC_TASK_MOVEABLE;
> - ret = nfs_initiate_pgio(NFS_CLIENT(hdr->inode),
> + ret = nfs_initiate_pgio(NFS_SERVER(hdr->inode)-
> >nfs_client,
> + NFS_CLIENT(hdr->inode),
> hdr,
> hdr->cred,
> NFS_PROTO(hdr->inode),
My first inclination was that this is redundant since the nfs_client
has a pointer to the rpc_client in it, but in the pNFS situation I
suppose they aren't necessary the same thing, so I guess you have to do
it this way.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2024-06-10 12:02 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 14:26 [for-6.11 PATCH 00/29] nfs/nfsd: add support for localio bypass Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 01/29] nfs: pass nfs_client to nfs_initiate_pgio Mike Snitzer
2024-06-10 12:02 ` Jeff Layton [this message]
2024-06-07 14:26 ` [for-6.11 PATCH 02/29] nfs: pass nfs_client to nfs_initiate_commit Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 03/29] nfs: pass descriptor thru nfs_initiate_pgio path Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 04/29] sunrpc: handle NULL req->defer in cache_defer_req Mike Snitzer
2024-06-10 12:21 ` Jeff Layton
2024-06-11 1:03 ` NeilBrown
2024-06-11 2:57 ` Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 05/29] sunrpc: export svc_defer Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 06/29] sunrpc: add rpcauth_map_to_svc_cred Mike Snitzer
2024-06-10 12:19 ` Jeff Layton
2024-06-07 14:26 ` [for-6.11 PATCH 07/29] sunrpc: add and export rpc_ntop6_addr_noscopeid Mike Snitzer
2024-06-09 12:36 ` Jeff Layton
2024-06-10 16:33 ` Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 08/29] nfs: move nfs_stat_to_errno to nfs.h Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 09/29] NFS: Manage boot verifier correctly in the case of localio Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 10/29] nfs/nfsd: add "local io" support Mike Snitzer
2024-06-10 12:43 ` Jeff Layton
2024-06-10 16:42 ` Mike Snitzer
2024-06-12 2:25 ` Mike Snitzer
2024-06-12 3:17 ` NeilBrown
2024-06-12 3:41 ` Mike Snitzer
2024-06-12 4:09 ` NeilBrown
2024-06-12 4:48 ` Mike Snitzer
2024-06-12 6:30 ` NeilBrown
2024-06-07 14:26 ` [for-6.11 PATCH 11/29] NFS: Enable localio for non-pNFS I/O Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 12/29] nfs/flexfiles: check local DS when making DS connections Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 13/29] pnfs/flexfiles: Enable localio for flexfiles I/O Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 14/29] NFS: Add tracepoints for nfs_local_enable and nfs_local_disable Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 15/29] NFS: Don't call filesystem write() routines directly Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 16/29] NFS: Don't call filesystem read() " Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 17/29] NFS: Use completion rather than flush_work() in nfs_local_commit() Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 18/29] NFS: localio writes need to use a normal workqueue Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 19/29] nfs/write: fix nfs_initiate_commit to return error from nfs_local_commit Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 20/29] nfs/localio: discontinue network address based localio setup Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 21/29] nfs_common: add NFS v3 LOCALIO protocol extension enablement Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 22/29] nfs: implement v3 client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 23/29] nfsd: implement v3 server " Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 24/29] nfs_common: add NFS v4 LOCALIO protocol extension enablement Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 25/29] nfs: implement v4 client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 26/29] nfsd: implement v4 server " Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 27/29] nfs/nfsd: switch GETUUID to using {encode,decode}_opaque_fixed Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 28/29] nfs/nfsd: consolidate {encode,decode}_opaque_fixed in nfs_xdr.h Mike Snitzer
2024-06-07 14:26 ` [for-6.11 PATCH 29/29] nfs/localio: move managing nfsd_open_local_fh symbol to nfs_common Mike Snitzer
2024-06-07 18:06 ` [for-6.11 PATCH 30/29] nfs/nfsd: ensure localio server always uses its network namespace Mike Snitzer
2024-06-09 15:44 ` Chuck Lever
2024-06-10 16:50 ` Mike Snitzer
2024-06-10 22:37 ` Mike Snitzer
2024-06-07 18:09 ` [for-6.11 PATCH 00/29] nfs/nfsd: add support for localio bypass Mike Snitzer
2024-06-10 12:47 ` Jeff Layton
2024-06-10 16:47 ` Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28ac0f056e15c57a3d45cc7155580eb4494afc04.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=snitzer@hammerspace.com \
--cc=snitzer@kernel.org \
--cc=trondmy@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox