Kernel NFS Daemon Maintainer's Page

This page describes the state of the kernel NFSD code that is maintained by


  1. NFS over TCP.
  2. AUTH_DES.
  3. NFS Version 3 (See below).


May 1, 1999
updated 2.2.7 version of knfsd v3.
April 19, 1999
2.2.6 release of knfsd v3.
April 12, 1999
Alpha release of knfsd v3.
March 15, 1999
H.J. has released knfsd-1.2.
Feb 26, 1999
A patch is available for lockd)
Feb 23, 1999
A new patch is available for nfsd)

Related links

User software

In order for these changes to work fully, you need a copy of the latest knfsd user programs from H.J. Lu.

Related Links


Olaf Kirch's homepage.

Swapping over nfs (not tested).

Current patches

Version 3 knfsd

linux-2.2.7-knfsdv3-1.diff [ALPHA]
This patch adds nfs version 3 support to the kernel nfs server.

Apply this patch after you apply Trond's nfs v3 patch.
You may also need a new version of mount.



lockd-2.2.2-1.patch [GAMA]
Simple patch to make lockd slightly more efficient and prettier.

BUGS: you must reload both nfsd and lockd, if you are using modules.


nfsd-2.2.2-1.patch [BETA]

  1. The rename cache could hold thousands of entries if thousands of files are renamed in 60 seconds.
  2. The short term cache has been disabled. (But this may be a feature.)
FEATURES: All those listed below, and
  1. Clients should be able to use old file handles.
NOTE: With this patch knfsd should be able to pass all of the cthon/basic tests, on all platforms.

nfsd-2.2.1-2.patch. [ALPHA].

  1. The rename cache has not been well tested.
  2. The rename cache could hold thousnads of entries if thousands of files are renamed in 60 seconds.
  3. The short term cache has been disabled. (But this may be a feature.)
  1. fh_version is now compared on ext2 exports and will return STALE if the filehandle version number does not match the local inode version number.
  2. The struct dentry * is no longer stored in the filehandle. (This is being removed because it does not seem to be needed, and not for any other reason. If it is needed to help performance it will be put back in.)
  3. There is now a rename cache. For the moment the cache holds all entries less than 60 seconds old and the last 500 entries. (It would be nice to have an idea of the number of renames that can be done in 60 seconds).

And every thing that was in nfsd-2.2.1-1.patch. [GAMA]

  1. Expire cache periodicly. Before the cache was only expired on access from a client. (expire_all())
  2. Expire cache for deleted files. Before these would stay in the cache until the next access after 5 seconds. (expire_by_dentry())
  3. Change to fs/nfs/dir.c to allow
      mkdir zappa
      (mv frank zappa; echo This did not work) > frank
    to work. This may break rename for unfsd.
  4. Change of buffering for readdir from RC_REPLSTAT to RC_REPLBUFF. (This is already in Alan's `ac' code.)
  5. The nfsd_create: dentry filename not negative! message should only be seen if there was a race to get lock the parent.
  6. Added fb_version field to nfs_filehandle. This will be used in the near future.
  7. Miscellaneous whitespace changes.

Old patches



  1. SECURITY inode_change_ok() was not being called. This allowed anyone to change attributes.
  2. On root_squashed exports root could not mount subdirectories/files that where in directories where nobody didn't have EXECUTE permission. This was true even if other users would be able to access that directory. Now as long as any EXECUTE bit is set the partition can be mounted.

Dynamic read-ahead cache allocation patch


Procfs export file patch

See knfsd's exports through /proc/fs/nfsd/exports with nfsd_procfs_2.1.127.patch.

Dynamic Readahead buffer allocation patch

This patch nfsd_procfs_2.1.127.patch.

Changes Applied to linux 2.1.127

  1. Root could mount subdirectories/files that where in mode 000 directories.
  2. exp_rootfh could segfault if bad data was passed to it.
  3. setuser did not set groups correctly.
  4. setuser did not reset capability flags. This would allow users access files in directories with mode 000.

Kernel patch nfsd-2.1.126-2.patch. This patch is included in 2.1.127.

Changes Applied to linux 2.1.126

  1. knfsd will allow multiple exports of a single partition. The mounts must be proper subsets of the partition.
  2. knfsd will allow mounts above the export point. That is if you export / and /usr is in the same partition, then you can mount /usr.
  3. You can now export and mount regular files. (It is not clear if they can be used for swap.)
  4. knfsd use to return EACCESS when you try to access a covered directory. Now knfsd acts in one of two ways: either it does not allows any access inside of these directories, or if CONFIG_NFSD_SUN="y" then knfsd displays these directories as if they where not covered, the way that SunOS 4 and Solaris do.
  5. knfsd now checks that the client is not spoofing the server into using different export permissions for a file. This should get rid of any worries about item 1 above creating security problems.