]> git.neil.brown.name Git - history.git/commit
[PATCH] kNFSd: Use new cache infrastructure for auth_unix specific lookups.
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 11 Oct 2002 12:39:25 +0000 (05:39 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 11 Oct 2002 12:39:25 +0000 (05:39 -0700)
commit624361e43a7f518101fe4b5277aa1ad7a1fe6028
tree50105dd0d56c496036051408f39f19e33d1d9022
parentf00a9f4d31b5a540d865ee2c779d6fac32e9aafb
[PATCH] kNFSd: Use new cache infrastructure for auth_unix specific lookups.

This patch introduces two caches using the new infrastucture, and the
concept of a 'domain'.

A 'domain' refers to a collection of clients that all have the same
view of the nfs server, and all have the same access rights (modulo
different users on the clients).  For AUTH_UNIX (and AUTH_NULL), the
domain is determined from the IP address.  For other authentication
styles, the domain might be determined directly from the credentials.

Each auth flavour knows how to allocate and free it's domain-specific
infomation.

auth_domain_cache maps a name to a domain which is owned by
an auth flavour.

ip_map_cache is a cache specific to AUTH_UNIX which maps
IP address to domain.

With this patch, svcauth_unix.c is created to store all
auth_unix related code.

The IP address lookup code is removed from nfsd/exports.c

sunrpc module initilisation is moved out of stats.c into sunrpc_syms
which seemed to be the most central .c file.  It now registers these
two caches.

Now that the caches are being used, nfsd needs to call cache_clean
periodically.
14 files changed:
fs/nfsd/export.c
fs/nfsd/lockd.c
fs/nfsd/nfsctl.c
fs/nfsd/nfssvc.c
include/linux/lockd/bind.h
include/linux/nfsd/export.h
include/linux/nfsd/nfsd.h
include/linux/sunrpc/svc.h
include/linux/sunrpc/svcauth.h
net/sunrpc/Makefile
net/sunrpc/stats.c
net/sunrpc/sunrpc_syms.c
net/sunrpc/svcauth.c
net/sunrpc/svcauth_unix.c [new file with mode: 0644]