linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/16] Cache open file descriptors in knfsd
@ 2019-08-18 18:18 Trond Myklebust
  2019-08-18 18:18 ` [PATCH v2 01/16] sunrpc: add a new cache_detail operation for when a cache is flushed Trond Myklebust
  2019-08-19 15:01 ` [PATCH v2 00/16] Cache open file descriptors in knfsd J. Bruce Fields
  0 siblings, 2 replies; 19+ messages in thread
From: Trond Myklebust @ 2019-08-18 18:18 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

When a NFSv3 READ or WRITE request comes in, the first thing knfsd has
to do is open a new file descriptor. While this is often a relatively
inexpensive thing to do for most local filesystems, it is usually less
so for FUSE, clustered or networked filesystems that are being exported
by knfsd.

This set of patches attempts to reduce some of that cost by caching
open file descriptors so that they may be reused by other incoming
READ/WRITE requests for the same file.
One danger when doing this, is that knfsd may end up caching file
descriptors for files that have been unlinked. In order to deal with
this issue, we use fsnotify to monitor the files, and have hooks to
evict those descriptors from the file cache if the i_nlink value
goes to 0.

-------
v2:
- Fix a double semicolon in fs/nfsd/filecache.c
- Adjust changelog for "nfsd: rip out the raparms cache" as per Chuck's
  request.
-------

Jeff Layton (12):
  sunrpc: add a new cache_detail operation for when a cache is flushed
  locks: create a new notifier chain for lease attempts
  nfsd: add a new struct file caching facility to nfsd
  nfsd: hook up nfsd_write to the new nfsd_file cache
  nfsd: hook up nfsd_read to the nfsd_file cache
  nfsd: hook nfsd_commit up to the nfsd_file cache
  nfsd: convert nfs4_file->fi_fds array to use nfsd_files
  nfsd: convert fi_deleg_file and ls_file fields to nfsd_file
  nfsd: hook up nfs4_preprocess_stateid_op to the nfsd_file cache
  nfsd: have nfsd_test_lock use the nfsd_file cache
  nfsd: rip out the raparms cache
  nfsd: close cached files prior to a REMOVE or RENAME that would
    replace target

Trond Myklebust (4):
  notify: export symbols for use by the knfsd file cache
  vfs: Export flush_delayed_fput for use by knfsd.
  nfsd: Fix up some unused variable warnings
  nfsd: Fix the documentation for svcxdr_tmpalloc()

 fs/file_table.c                  |   1 +
 fs/locks.c                       |  61 +++
 fs/nfsd/Kconfig                  |   1 +
 fs/nfsd/Makefile                 |   3 +-
 fs/nfsd/blocklayout.c            |   3 +-
 fs/nfsd/export.c                 |  13 +
 fs/nfsd/filecache.c              | 885 +++++++++++++++++++++++++++++++
 fs/nfsd/filecache.h              |  60 +++
 fs/nfsd/nfs4layouts.c            |  12 +-
 fs/nfsd/nfs4proc.c               |  83 +--
 fs/nfsd/nfs4state.c              | 183 ++++---
 fs/nfsd/nfs4xdr.c                |  31 +-
 fs/nfsd/nfssvc.c                 |  16 +-
 fs/nfsd/state.h                  |  10 +-
 fs/nfsd/trace.h                  | 140 +++++
 fs/nfsd/vfs.c                    | 295 ++++-------
 fs/nfsd/vfs.h                    |   9 +-
 fs/nfsd/xdr4.h                   |  19 +-
 fs/notify/fsnotify.h             |   2 -
 fs/notify/group.c                |   2 +
 fs/notify/mark.c                 |   6 +
 include/linux/fs.h               |   5 +
 include/linux/fsnotify_backend.h |   2 +
 include/linux/sunrpc/cache.h     |   1 +
 net/sunrpc/cache.c               |   3 +
 25 files changed, 1464 insertions(+), 382 deletions(-)
 create mode 100644 fs/nfsd/filecache.c
 create mode 100644 fs/nfsd/filecache.h

-- 
2.21.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-08-19 15:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18 18:18 [PATCH v2 00/16] Cache open file descriptors in knfsd Trond Myklebust
2019-08-18 18:18 ` [PATCH v2 01/16] sunrpc: add a new cache_detail operation for when a cache is flushed Trond Myklebust
2019-08-18 18:18   ` [PATCH v2 02/16] locks: create a new notifier chain for lease attempts Trond Myklebust
2019-08-18 18:18     ` [PATCH v2 03/16] notify: export symbols for use by the knfsd file cache Trond Myklebust
2019-08-18 18:18       ` [PATCH v2 04/16] vfs: Export flush_delayed_fput for use by knfsd Trond Myklebust
2019-08-18 18:18         ` [PATCH v2 05/16] nfsd: add a new struct file caching facility to nfsd Trond Myklebust
2019-08-18 18:18           ` [PATCH v2 06/16] nfsd: hook up nfsd_write to the new nfsd_file cache Trond Myklebust
2019-08-18 18:18             ` [PATCH v2 07/16] nfsd: hook up nfsd_read to the " Trond Myklebust
2019-08-18 18:18               ` [PATCH v2 08/16] nfsd: hook nfsd_commit up " Trond Myklebust
2019-08-18 18:18                 ` [PATCH v2 09/16] nfsd: convert nfs4_file->fi_fds array to use nfsd_files Trond Myklebust
2019-08-18 18:18                   ` [PATCH v2 10/16] nfsd: convert fi_deleg_file and ls_file fields to nfsd_file Trond Myklebust
2019-08-18 18:18                     ` [PATCH v2 11/16] nfsd: hook up nfs4_preprocess_stateid_op to the nfsd_file cache Trond Myklebust
2019-08-18 18:18                       ` [PATCH v2 12/16] nfsd: have nfsd_test_lock use " Trond Myklebust
2019-08-18 18:18                         ` [PATCH v2 13/16] nfsd: rip out the raparms cache Trond Myklebust
2019-08-18 18:18                           ` [PATCH v2 14/16] nfsd: close cached files prior to a REMOVE or RENAME that would replace target Trond Myklebust
2019-08-18 18:18                             ` [PATCH v2 15/16] nfsd: Fix up some unused variable warnings Trond Myklebust
2019-08-18 18:18                               ` [PATCH v2 16/16] nfsd: Fix the documentation for svcxdr_tmpalloc() Trond Myklebust
2019-08-19 15:01 ` [PATCH v2 00/16] Cache open file descriptors in knfsd J. Bruce Fields
2019-08-19 15:11   ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).