Skip to content

RFC restore nfsdcld

Scott Mayhew linux-nfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest8 patches 3 repliesIn review
  2. v27 patches 0 repliesSuperseded
  3. v1 RFC7 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- removed PathExists restriction from the nfsdcld.service file
- added the ability to do a one-time upgrade from older client tracking methods (i.e. nfsdcltrack and/or the legacy v4recovery dir)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Revert "nfsdcltrack: remove the nfsdcld daemon".gitignore utils/nfsdcltrack/Makefile.am utils/nfsdcltrack/nfsdcld.c +1 more+802 -20 replies
2/8nfsdcld: move nfsdcld to its own directory.gitignore configure.ac utils/Makefile.am +6 more+682 -60 replies
3/8nfsdcld: a few enhancementssupport/include/cld.h utils/nfsdcld/Makefile.am utils/nfsdcld/cld-internal.h +3 more+579 -1080 replies
4/8nfsdcld: remove some unused functionsutils/nfsdcld/sqlite.c utils/nfsdcld/sqlite.h+0 -690 replies
5/8nfsdcld: the -p option should specify the rpc_pipefs mountpointutils/nfsdcld/nfsdcld.c utils/nfsdcld/nfsdcld.man+14 -120 replies
6/8nfsdcld: add /etc/nfs.conf supportnfs.conf utils/nfsdcld/nfsdcld.c utils/nfsdcld/nfsdcld.man+32 -01 reply
7/8systemd: add a unit file for nfsdcldsystemd/nfs-server.service systemd/nfsdcld.service+12 -00 replies
8/8nfsdcld: add a facility for migrating from older client tracking methodsutils/nfsdcld/Makefile.am utils/nfsdcld/cld-internal.h utils/nfsdcld/legacy.c +4 more+496 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [nfs-utils PATCH RFC v3 0/8] restore nfsdcld

When nfsdcld was released, it was quickly deprecated in favor of the nfsdcltrack usermodehelper, so as to not require another running daemon. The nfsdcld code was removed from nfs-utils in 2012. That prevents NFSv4 clients from reclaiming locks from nfsd's running in containers, since neither nfsdcltrack nor the legacy client tracking code work in containers. These patches restore the nfsdcld code.

These patches are intended to go alongside some kernel patches that introduce an enhancement that allows nfsd to "slurp" up the client records during client tracking initialization and store them internally in hash table. This enables nfsd to check whether an NFSv4 client is allowed to reclaim without having to do an upcall to nfsdcld. It also allows nfsd to decide to end the v4 grace period early if the number of RECLAIM_COMPLETE operations it has received from "known" clients is equal to the number of entries in the hash table. It also allows nfsd to skip the v4 grace period altogether if it knows there are no clients allowed to reclaim.

The new nfsdcld code will work with older kernels, however in that case there is no ability for nfsd to exit the grace period early or skip the grace period altogether.

v3:
- removed PathExists restriction from the nfsdcld.service file
- added the ability to do a one-time upgrade from older client tracking methods (i.e. nfsdcltrack and/or the legacy v4recovery dir)
v2:
- Use sqlite3_column_int64() instead of sqlite3_column_int() to query the current & recovery values from the grace table
- Uncommented the nfsdcld section header in nfs.conf

Scott Mayhew (8):
Revert "nfsdcltrack: remove the nfsdcld daemon"
nfsdcld: move nfsdcld to its own directory
nfsdcld: a few enhancements
nfsdcld: remove some unused functions
nfsdcld: the -p option should specify the rpc_pipefs mountpoint
nfsdcld: add /etc/nfs.conf support
systemd: add a unit file for nfsdcld
nfsdcld: add a facility for migrating from older client tracking
methods

 .gitignore                   |    1 +
 configure.ac                 |   23 +
 nfs.conf                     |    4 +
 support/include/cld.h        |    1 +
 systemd/nfs-server.service   |    2 +
 systemd/nfsdcld.service      |   10 +
 utils/Makefile.am            |    4 +
 utils/nfsdcld/Makefile.am    |   19 +
 utils/nfsdcld/cld-internal.h |   33 +
 utils/nfsdcld/legacy.c       |  180 ++++++
 utils/nfsdcld/legacy.h       |   24 +
 utils/nfsdcld/nfsdcld.c      |  774 ++++++++++++++++++++++++
 utils/nfsdcld/nfsdcld.man    |  199 ++++++
 utils/nfsdcld/sqlite.c       | 1109 ++++++++++++++++++++++++++++++++++
 utils/nfsdcld/sqlite.h       |   35 ++
 15 files changed, 2418 insertions(+)
 create mode 100644 systemd/nfsdcld.service
 create mode 100644 utils/nfsdcld/Makefile.am
 create mode 100644 utils/nfsdcld/cld-internal.h
 create mode 100644 utils/nfsdcld/legacy.c
 create mode 100644 utils/nfsdcld/legacy.h
 create mode 100644 utils/nfsdcld/nfsdcld.c
 create mode 100644 utils/nfsdcld/nfsdcld.man
 create mode 100644 utils/nfsdcld/sqlite.c
 create mode 100644 utils/nfsdcld/sqlite.h
Signature · 1 line
2.17.2