Linux NFS development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org, Jeff Layton <jlayton@kernel.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	Trond Myklebust <trondmy@hammerspace.com>,
	snitzer@hammerspace.com
Subject: Re: [RFC PATCH v2 07/15] nfs/nfsd: add "localio" support
Date: Wed, 12 Jun 2024 00:51:29 -0400	[thread overview]
Message-ID: <ZmkpUWUUFnftOtdl@kernel.org> (raw)
In-Reply-To: <171816697836.14261.17806813255162604456@noble.neil.brown.name>

On Wed, Jun 12, 2024 at 02:36:18PM +1000, NeilBrown wrote:
> On Wed, 12 Jun 2024, Mike Snitzer wrote:
> > From: Weston Andros Adamson <dros@primarydata.com>
> > 
> > Add client support for bypassing NFS for localhost reads, writes, and
> > commits. This is only useful when the client and the server are
> > running on the same host.
> > 
> > nfs_local_probe() is stubbed out, later commits will enable client and
> > server handshake via a LOCALIO protocol extension.
> > 
> > This has dynamic binding with the nfsd module. Localio will only work
> > if nfsd is already loaded.
> > 
> > The "localio_enabled" nfs kernel module parameter can be used to
> > disable and enable the ability to use localio support.
> > 
> > Also, tracepoints were added for nfs_local_open_fh, nfs_local_enable
> > and nfs_local_disable.
> > 
> > Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
> > Signed-off-by: Peng Tao <tao.peng@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/Makefile           |   2 +
> >  fs/nfs/client.c           |   7 +
> >  fs/nfs/inode.c            |   5 +
> >  fs/nfs/internal.h         |  55 +++
> >  fs/nfs/localio.c          | 798 ++++++++++++++++++++++++++++++++++++++
> >  fs/nfs/nfstrace.h         |  61 +++
> >  fs/nfs/pagelist.c         |   3 +
> >  fs/nfs/write.c            |   3 +
> >  fs/nfsd/Makefile          |   2 +
> >  fs/nfsd/filecache.c       |   2 +-
> >  fs/nfsd/localio.c         | 184 +++++++++
> >  fs/nfsd/trace.h           |   3 +-
> >  fs/nfsd/vfs.h             |   8 +
> >  include/linux/nfs.h       |   6 +
> >  include/linux/nfs_fs.h    |   2 +
> >  include/linux/nfs_fs_sb.h |   5 +
> >  include/linux/nfs_xdr.h   |   1 +
> >  17 files changed, 1145 insertions(+), 2 deletions(-)
> >  create mode 100644 fs/nfs/localio.c
> >  create mode 100644 fs/nfsd/localio.c
> > 
> > diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
> > index 5f6db37f461e..ad9923fb0f03 100644
> > --- a/fs/nfs/Makefile
> > +++ b/fs/nfs/Makefile
> > @@ -13,6 +13,8 @@ nfs-y 			:= client.o dir.o file.o getroot.o inode.o super.o \
> >  nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o
> >  nfs-$(CONFIG_SYSCTL)	+= sysctl.o
> >  nfs-$(CONFIG_NFS_FSCACHE) += fscache.o
> > +nfs-$(CONFIG_NFS_V3_LOCALIO) += localio.o
> > +nfs-$(CONFIG_NFS_V4_LOCALIO) += localio.o
> 
> Should be just
> 
>    nfs-$(CONFIG_NFS_LOCALIO_SUPPORT) += localio.o
> 
> >  
> >  obj-$(CONFIG_NFS_V2) += nfsv2.o
> >  nfsv2-y := nfs2super.o proc.o nfs2xdr.o
> > diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> > index de77848ae654..c123ad22ac79 100644
> > --- a/fs/nfs/client.c
> > +++ b/fs/nfs/client.c
> > @@ -178,6 +178,10 @@ struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init)
> >  	clp->cl_max_connect = cl_init->max_connect ? cl_init->max_connect : 1;
> >  	clp->cl_net = get_net(cl_init->net);
> >  
> > +#if defined(CONFIG_NFS_V3_LOCALIO) || defined(CONFIG_NFS_V4_LOCALIO)
> 
> Maybe CONFIG_NFS_LOCALIO_SUPPORT here too?  And one more place below.

Yeah, I had issues with accessing CONFIG_NFS_LOCALIO_SUPPORT.. I did
try it though. Can revisit and try harder ;)

  reply	other threads:[~2024-06-12  4:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  3:07 [RFC PATCH v2 00/15] nfs/nfsd: add support for localio Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 01/15] nfs: pass nfs_client to nfs_initiate_pgio Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 02/15] nfs: pass descriptor thru nfs_initiate_pgio path Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 03/15] nfs: pass struct file to nfs_init_pgio and nfs_init_commit Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 04/15] sunrpc: add rpcauth_map_to_svc_cred_local Mike Snitzer
2024-06-12  4:28   ` NeilBrown
2024-06-12 18:32   ` Anna Schumaker
2024-06-12  3:07 ` [RFC PATCH v2 05/15] nfs: move nfs_stat_to_errno to nfs.h Mike Snitzer
2024-06-12  3:23   ` NeilBrown
2024-06-12  3:50     ` Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 06/15] nfs_common: add NFS LOCALIO protocol extension enablement Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 07/15] nfs/nfsd: add "localio" support Mike Snitzer
2024-06-12  4:36   ` NeilBrown
2024-06-12  4:51     ` Mike Snitzer [this message]
2024-06-12  3:07 ` [RFC PATCH v2 08/15] NFS: for localio don't call filesystem read() and write() routines directly Mike Snitzer
2024-06-12  4:39   ` NeilBrown
2024-06-12  3:07 ` [RFC PATCH v2 09/15] NFS: Enable localio for non-pNFS I/O Mike Snitzer
2024-06-12  5:12   ` NeilBrown
2024-06-12  3:07 ` [RFC PATCH v2 10/15] pnfs/flexfiles: Enable localio for flexfiles I/O Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 11/15] nfs: implement v3 and v4 client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 12/15] nfsd: implement v3 and v4 server " Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 13/15] nfs/nfsd: consolidate {encode,decode}_opaque_fixed in nfs_xdr.h Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 14/15] nfs/localio: move managing nfsd_open_local_fh symbol to nfs_common Mike Snitzer
2024-06-12  3:07 ` [RFC PATCH v2 15/15] nfs/nfsd: ensure localio server always uses its network namespace Mike Snitzer
2024-06-12  5:11   ` NeilBrown
2024-06-12  3:12 ` [RFC PATCH v2 00/15] nfs/nfsd: add support for localio 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=ZmkpUWUUFnftOtdl@kernel.org \
    --to=snitzer@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=snitzer@hammerspace.com \
    --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