mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
fa4983862e
Add server support for bypassing NFS for localhost reads, writes, and commits. This is only useful when both the client and server are running on the same host. If nfsd_open_local_fh() fails then the NFS client will both retry and fallback to normal network-based read, write and commit operations if localio is no longer supported. Care is taken to ensure the same NFS security mechanisms are used (authentication, etc) regardless of whether localio or regular NFS access is used. The auth_domain established as part of the traditional NFS client access to the NFS server is also used for localio. Store auth_domain for localio in nfsd_uuid_t and transfer it to the client if it is local to the server. Relative to containers, localio gives the client access to the network namespace the server has. This is required to allow the client to access the server's per-namespace nfsd_net struct. This commit also introduces the use of NFSD's percpu_ref to interlock nfsd_destroy_serv and nfsd_open_local_fh, to ensure nn->nfsd_serv is not destroyed while in use by nfsd_open_local_fh and other LOCALIO client code. CONFIG_NFS_LOCALIO enables NFS server support for LOCALIO. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Co-developed-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Mike Snitzer <snitzer@kernel.org> Co-developed-by: NeilBrown <neilb@suse.de> Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
27 lines
942 B
Makefile
27 lines
942 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the Linux nfs server
|
|
#
|
|
|
|
ccflags-y += -I$(src) # needed for trace events
|
|
|
|
obj-$(CONFIG_NFSD) += nfsd.o
|
|
|
|
# this one should be compiled first, as the tracing macros can easily blow up
|
|
nfsd-y += trace.o
|
|
|
|
nfsd-y += nfssvc.o nfsctl.o nfsfh.o vfs.o \
|
|
export.o auth.o lockd.o nfscache.o \
|
|
stats.o filecache.o nfs3proc.o nfs3xdr.o \
|
|
netlink.o
|
|
nfsd-$(CONFIG_NFSD_V2) += nfsproc.o nfsxdr.o
|
|
nfsd-$(CONFIG_NFSD_V2_ACL) += nfs2acl.o
|
|
nfsd-$(CONFIG_NFSD_V3_ACL) += nfs3acl.o
|
|
nfsd-$(CONFIG_NFSD_V4) += nfs4proc.o nfs4xdr.o nfs4state.o nfs4idmap.o \
|
|
nfs4acl.o nfs4callback.o nfs4recover.o
|
|
nfsd-$(CONFIG_NFSD_PNFS) += nfs4layouts.o
|
|
nfsd-$(CONFIG_NFSD_BLOCKLAYOUT) += blocklayout.o blocklayoutxdr.o
|
|
nfsd-$(CONFIG_NFSD_SCSILAYOUT) += blocklayout.o blocklayoutxdr.o
|
|
nfsd-$(CONFIG_NFSD_FLEXFILELAYOUT) += flexfilelayout.o flexfilelayoutxdr.o
|
|
nfsd-$(CONFIG_NFS_LOCALIO) += localio.o
|