Search code examples
linux-kernelnfs

What is the difference between nfsd and nfs (in linux source code, I have version 2.6.32)?


In linux source code, we have two branches nfs and nfsd. What is the difference in the two?

I tried looking for the NFS attribute rdattr_error in the two and found different implementations.


Solution

  • NFS is similar to other RPC services in its use of a server-side daemon (nfsd ) to process incoming requests. It differs from the typical client-server model in that processes on NFS clients make some RPC calls themselves, and other RPC calls are made by the clients' async threads. All of the NFS client and server code is contained in the kernel, instead of in the server daemon executable

    NFSD:

    The nfsd is a user-level process, but contains no code to process NFS requests. The nfsd issues a system call that gives the kernel a transport endpoint. Invokes a system call to start in-kernel processing of NFS requests on the transport endpoint.

    NFS:

    On the client side, each process accessing an NFS-mounted filesystem makes its own RPC calls to NFS servers.

    Ref:

    http://docstore.mik.ua/orelly/networking_2ndEd/nfs/ch07_03.htm