Re: [RFC PATCH v2 07/15] nfs/nfsd: add "localio" support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxxxxxx>
> > Signed-off-by: Peng Tao <tao.peng@xxxxxxxxxxxxxxx>
> > Signed-off-by: Lance Shelton <lance.shelton@xxxxxxxxxxxxxxx>
> > Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> > Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
> > ---
> >  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 ;)




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux