]> git.infradead.org Git - users/hch/misc.git/commit
nfs_common: prepare for the NFS client to use nfsd_file for LOCALIO
authorMike Snitzer <snitzer@kernel.org>
Thu, 5 Sep 2024 19:09:49 +0000 (15:09 -0400)
committerAnna Schumaker <anna.schumaker@oracle.com>
Mon, 23 Sep 2024 19:03:30 +0000 (15:03 -0400)
commita61e147e6be6e763d9c6dec8061d2893c0bb3423
tree5e88a0e7af2b714da3ab61796f0810deb7f16231
parent2a33a85be45178198245e1f656e6224c899895e4
nfs_common: prepare for the NFS client to use nfsd_file for LOCALIO

The next commit will introduce nfsd_open_local_fh() which returns an
nfsd_file structure.  This commit exposes LOCALIO's required NFSD
symbols to the NFS client:

- Make nfsd_open_local_fh() symbol and other required NFSD symbols
  available to NFS in a global 'nfs_to' nfsd_localio_operations
  struct (global access suggested by Trond, nfsd_localio_operations
  suggested by NeilBrown).  The next commit will also introduce
  nfsd_localio_ops_init() that init_nfsd() will call to initialize
  'nfs_to'.

- Introduce nfsd_file_file() that provides access to nfsd_file's
  backing file.  Keeps nfsd_file structure opaque to NFS client (as
  suggested by Jeff Layton).

- Introduce nfsd_file_put_local() that will put the reference to the
  nfsd_file's associated nn->nfsd_serv and then put the reference to
  the nfsd_file (as suggested by NeilBrown).

Suggested-by: Trond Myklebust <trond.myklebust@hammerspace.com> # nfs_to
Suggested-by: NeilBrown <neilb@suse.de> # nfsd_localio_operations
Suggested-by: Jeff Layton <jlayton@kernel.org> # nfsd_file_file
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs_common/nfslocalio.c
fs/nfsd/filecache.c
fs/nfsd/filecache.h
fs/nfsd/nfssvc.c
include/linux/nfslocalio.h