From: Mike Snitzer <snitzer@kernel.org>
To: linux-nfs@vger.kernel.org
Cc: Jeff Layton <jlayton@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
Anna Schumaker <anna@kernel.org>,
Trond Myklebust <trondmy@hammerspace.com>,
NeilBrown <neilb@suse.de>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH v14 00/25] nfs/nfsd: add support for LOCALIO
Date: Wed, 28 Aug 2024 21:03:55 -0400 [thread overview]
Message-ID: <20240829010424.83693-1-snitzer@kernel.org> (raw)
These latest changes are available in my git tree here:
https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git/log/?h=nfs-localio-for-next
I _think_ I addressed all of v13's very helpful review comments.
Special thanks to Neil and Chuck for their time and help!
And hopefully I didn't miss anything in the changelog below.
Changes since v13:
- Extended the nn->nfsd_serv reference lifetime to be identical to the
nfsd_file (until after localio's IO is complete), suggested by Neil.
This is made easier by introducing a 'struct nfs_localio_ctx' that
contains both the 'nfsd_file' and 'nfsd_net' associated with
localio.
- Switched nfs_common's 'nfs_to' symbol management locking from using
mutex to spinlock, suggested by Neil.
- Eliminated nfs_local_file_open() by folding it into
nfs_local_open_fh(), suggested by Neil.
- Updated nfs_uuid_is_local() to get reference on the net, drop it in
nfs_local_disable(), suggested by Neil.
- Pushed saving/restoring of client's cred down from
nfsd_open_local_fh() to nfsd_file_acquire_local(), suggested by
Neil.
- Dropped the pNFS flexfiles-specific open file caching that caused
lifetime issues (inability to unmount backing filesystem), noticed
by Neil. Also removed nfsd_file dummy definition as a side-effect.
- Updated NFSD_LOCALIO in fs/nfsd/Kconfig to explicitly 'default n'
and improve description, suggested by Chuck. Also made the same
updates to NFS_LOCALIO in fs/nfs/Kconfig.
- Split out a separate preliminary patch that introduces
nfsd_serv_try_get() and nfsd_serv_put() and the associated
percpu_ref, suggested by Chuck.
- Moved rpcauth_map_clnt_to_svc_cred_local from net/sunrpc/auth.c to
net/sunrpc/svcauth.c and renamed it to
svcauth_map_clnt_to_svc_cred_local. Also added kdoc. Suggested by
Chuck.
- Added Chuck's Acked-by to 2 patches.
- Incorporated Chuck's 6 patches that split up and improved the
__fh_verify and nfsd_file_acquire_local patches. Added
fh_verify_local as Chuck suggested. Used Neil's improved comment
for localio's early return from check_nfsd_access.
- Revised the answer to FAQ 6 in localio.rst, hopefully for the
better.
- Fixed issue Neil pointed out about nfs_local_disable() racing with
nfsd_open_local_fh() by adding the use of a clp->cl_localio_lock
(spinlock_t) and RCU to dereference clp->cl_nfssvc_net and
clp->cl_nfssvc_dom. The call to nfsd_open_local_fh() is covered by
RCU.
- Split the patch "nfs_common: add NFS LOCALIO auxiliary protocol
enablement" out to 3 separate patches. Hope is that it helps reduce
review burden thanks to each patch header explaining things with
more precision and detail.
All review appreciated, thanks!
Mike
Chuck Lever (2):
NFSD: Avoid using rqstp->rq_vers in nfsd_set_fh_dentry()
NFSD: Short-circuit fh_verify tracepoints for LOCALIO
Mike Snitzer (11):
nfs_common: factor out nfs_errtbl and nfs_stat_to_errno
nfs_common: factor out nfs4_errtbl and nfs4_stat_to_errno
nfs: factor out {encode,decode}_opaque_fixed to nfs_xdr.h
nfsd: add nfsd_serv_try_get and nfsd_serv_put
SUNRPC: remove call_allocate() BUG_ONs
nfs_common: add NFS LOCALIO auxiliary protocol enablement
nfs_common: introduce nfs_localio_ctx struct and interfaces
nfsd: implement server support for NFS_LOCALIO_PROGRAM
nfs: pass struct nfs_localio_ctx to nfs_init_pgio and nfs_init_commit
nfs: implement client support for NFS_LOCALIO_PROGRAM
nfs: add Documentation/filesystems/nfs/localio.rst
NeilBrown (5):
NFSD: Handle @rqstp == NULL in check_nfsd_access()
NFSD: Refactor nfsd_setuser_and_check_port()
nfsd: factor out __fh_verify to allow NULL rqstp to be passed
nfsd: add nfsd_file_acquire_local()
SUNRPC: replace program list with program array
Trond Myklebust (4):
nfs: enable localio for non-pNFS IO
pnfs/flexfiles: enable localio support
nfs/localio: use dedicated workqueues for filesystem read and write
nfs: add FAQ section to Documentation/filesystems/nfs/localio.rst
Weston Andros Adamson (3):
SUNRPC: add svcauth_map_clnt_to_svc_cred_local
nfsd: add localio support
nfs: add localio support
Documentation/filesystems/nfs/localio.rst | 276 ++++++++
fs/Kconfig | 3 +
fs/nfs/Kconfig | 17 +
fs/nfs/Makefile | 1 +
fs/nfs/client.c | 15 +-
fs/nfs/filelayout/filelayout.c | 6 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 56 +-
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 +
fs/nfs/inode.c | 57 +-
fs/nfs/internal.h | 53 +-
fs/nfs/localio.c | 789 ++++++++++++++++++++++
fs/nfs/nfs2xdr.c | 70 +-
fs/nfs/nfs3xdr.c | 108 +--
fs/nfs/nfs4xdr.c | 84 +--
fs/nfs/nfstrace.h | 61 ++
fs/nfs/pagelist.c | 16 +-
fs/nfs/pnfs_nfs.c | 2 +-
fs/nfs/write.c | 12 +-
fs/nfs_common/Makefile | 5 +
fs/nfs_common/common.c | 134 ++++
fs/nfs_common/nfslocalio.c | 233 +++++++
fs/nfsd/Kconfig | 17 +
fs/nfsd/Makefile | 1 +
fs/nfsd/export.c | 30 +-
fs/nfsd/filecache.c | 98 ++-
fs/nfsd/filecache.h | 4 +
fs/nfsd/localio.c | 180 +++++
fs/nfsd/lockd.c | 6 +-
fs/nfsd/netns.h | 8 +-
fs/nfsd/nfsctl.c | 2 +-
fs/nfsd/nfsd.h | 6 +-
fs/nfsd/nfsfh.c | 141 ++--
fs/nfsd/nfsfh.h | 2 +
fs/nfsd/nfssvc.c | 105 ++-
fs/nfsd/trace.h | 21 +-
fs/nfsd/vfs.h | 7 +
include/linux/nfs.h | 9 +
include/linux/nfs_common.h | 17 +
include/linux/nfs_fs_sb.h | 10 +
include/linux/nfs_xdr.h | 20 +-
include/linux/nfslocalio.h | 69 ++
include/linux/sunrpc/svc.h | 7 +-
include/linux/sunrpc/svcauth.h | 5 +
net/sunrpc/clnt.c | 6 -
net/sunrpc/svc.c | 68 +-
net/sunrpc/svc_xprt.c | 2 +-
net/sunrpc/svcauth.c | 28 +
net/sunrpc/svcauth_unix.c | 3 +-
48 files changed, 2467 insertions(+), 409 deletions(-)
create mode 100644 Documentation/filesystems/nfs/localio.rst
create mode 100644 fs/nfs/localio.c
create mode 100644 fs/nfs_common/common.c
create mode 100644 fs/nfs_common/nfslocalio.c
create mode 100644 fs/nfsd/localio.c
create mode 100644 include/linux/nfs_common.h
create mode 100644 include/linux/nfslocalio.h
--
2.44.0
next reply other threads:[~2024-08-29 1:04 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 1:03 Mike Snitzer [this message]
2024-08-29 1:03 ` [PATCH v14 01/25] nfs_common: factor out nfs_errtbl and nfs_stat_to_errno Mike Snitzer
2024-08-29 14:17 ` Jeff Layton
2024-08-29 1:03 ` [PATCH v14 02/25] nfs_common: factor out nfs4_errtbl and nfs4_stat_to_errno Mike Snitzer
2024-08-29 14:17 ` Jeff Layton
2024-08-29 1:03 ` [PATCH v14 03/25] nfs: factor out {encode,decode}_opaque_fixed to nfs_xdr.h Mike Snitzer
2024-08-29 14:19 ` Jeff Layton
2024-08-29 1:03 ` [PATCH v14 04/25] NFSD: Handle @rqstp == NULL in check_nfsd_access() Mike Snitzer
2024-08-29 14:20 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 05/25] NFSD: Refactor nfsd_setuser_and_check_port() Mike Snitzer
2024-08-29 14:23 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 06/25] NFSD: Avoid using rqstp->rq_vers in nfsd_set_fh_dentry() Mike Snitzer
2024-08-29 1:45 ` [PATCH v14.5 " Mike Snitzer
2024-08-29 16:52 ` Jeff Layton
2024-08-29 14:28 ` [PATCH v14 " Jeff Layton
2024-08-29 15:28 ` Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 07/25] NFSD: Short-circuit fh_verify tracepoints for LOCALIO Mike Snitzer
2024-08-29 14:33 ` Jeff Layton
2024-08-29 14:35 ` Chuck Lever
2024-08-29 1:04 ` [PATCH v14 08/25] nfsd: factor out __fh_verify to allow NULL rqstp to be passed Mike Snitzer
2024-08-29 14:39 ` Jeff Layton
2024-08-29 15:35 ` Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 09/25] nfsd: add nfsd_file_acquire_local() Mike Snitzer
2024-08-29 14:49 ` Jeff Layton
2024-08-29 15:47 ` Chuck Lever
2024-08-29 15:59 ` Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 10/25] nfsd: add nfsd_serv_try_get and nfsd_serv_put Mike Snitzer
2024-08-29 15:49 ` Chuck Lever
2024-08-29 15:57 ` Jeff Layton
2024-08-29 16:01 ` Mike Snitzer
2024-08-29 16:04 ` Chuck Lever
2024-08-29 1:04 ` [PATCH v14 11/25] SUNRPC: remove call_allocate() BUG_ONs Mike Snitzer
2024-08-29 15:58 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 12/25] SUNRPC: add svcauth_map_clnt_to_svc_cred_local Mike Snitzer
2024-08-29 15:50 ` Chuck Lever
2024-08-29 16:01 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 13/25] SUNRPC: replace program list with program array Mike Snitzer
2024-08-29 16:02 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 14/25] nfs_common: add NFS LOCALIO auxiliary protocol enablement Mike Snitzer
2024-08-29 16:07 ` Jeff Layton
2024-08-29 16:22 ` Mike Snitzer
2024-08-29 23:39 ` NeilBrown
2024-08-30 1:45 ` Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 15/25] nfs_common: introduce nfs_localio_ctx struct and interfaces Mike Snitzer
2024-08-29 16:40 ` Jeff Layton
2024-08-29 16:52 ` Mike Snitzer
2024-08-29 17:48 ` Jeff Layton
2024-08-30 4:36 ` NeilBrown
2024-08-30 5:01 ` Mike Snitzer
2024-08-30 5:08 ` Mike Snitzer
2024-08-30 5:12 ` Mike Snitzer
2024-08-30 5:34 ` NeilBrown
2024-08-30 6:02 ` Mike Snitzer
2024-08-30 5:46 ` NeilBrown
2024-08-30 5:56 ` Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 16/25] nfsd: add localio support Mike Snitzer
2024-08-29 16:01 ` Chuck Lever
2024-08-29 16:15 ` Mike Snitzer
2024-08-29 23:10 ` NeilBrown
2024-08-29 16:49 ` Jeff Layton
2024-08-29 16:59 ` Mike Snitzer
2024-08-29 17:18 ` Chuck Lever
2024-08-29 1:04 ` [PATCH v14 17/25] nfsd: implement server support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-08-29 16:50 ` Jeff Layton
2024-08-29 1:04 ` [PATCH v14 18/25] nfs: pass struct nfs_localio_ctx to nfs_init_pgio and nfs_init_commit Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 19/25] nfs: add localio support Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 20/25] nfs: enable localio for non-pNFS IO Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 21/25] pnfs/flexfiles: enable localio support Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 22/25] nfs/localio: use dedicated workqueues for filesystem read and write Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 23/25] nfs: implement client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 24/25] nfs: add Documentation/filesystems/nfs/localio.rst Mike Snitzer
2024-08-29 1:04 ` [PATCH v14 25/25] nfs: add FAQ section to Documentation/filesystems/nfs/localio.rst Mike Snitzer
2024-08-29 1:47 ` [PATCH v14.5 " Mike Snitzer
2024-08-29 1:42 ` [PATCH v14 00/25] nfs/nfsd: add support for LOCALIO Mike Snitzer
2024-08-29 1:50 ` 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=20240829010424.83693-1-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.