diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-09-12 01:39:57 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-12 01:39:57 -0700 |
| commit | 151ddf2e384fa2d19d72ecf2f18c74d9ceb07fa2 (patch) | |
| tree | 95593a6b4b013bcca847f685247570d13e50ae62 /include/linux/lockd/xdr.h | |
| parent | f96e7cb1d1e2b1e40dc38d71cfcdf1a7ac606944 (diff) | |
[PATCH] kNFSd 3: Increase separation between lockd and nfsd.
lockd currently asks nfsd for a 'client handle' for each
request.
This is used as a key for finding (or creating) a 'nlm_host'
structure, so that there is only one of these per client...almost.
There can currently be up to 4 nlm_hosts for a given client,
depending on protocol (udp/tcp) or version (v1 or v4).
But this isn't handled very well.
So the question is: is there any advantage in having only on
nlm_host per real host, or have we simply have one for each IP
address that makes requests, whether they are separate hosts or not.
The nlm_host structure is used:
1/ to hold a lockd rpc client for talking to the
remote lockd. Having multiple lockd clients cannot hurt
except possibly to waste a little space.
2/ to identify resources to free when we receive notification
from statd that a client has restarted.
As statd gets a hostname and looks up all IP addresses,
and then sends a notification for each IP for which it has
a registration, there is no need to minimise the number
of nlm_host structures (each of which register for monitoring).
3/ to identify resources to free when a client sends a
"free_all" request. If a client uses multiple IP addresses to
create locks, and then sends free_all from just one IP address
we will loose here.
However it is not clear that a client would ever want to send
a free_all request, and the linux client doesn't seem to, so
there is unlikely to be any loss here.
This patch does not ask nfsd for a client identifier, but rather
finds an nlm_host based on IP, version, protocol (udp/tcp) and
whether we are acting as NFS server or client.
All of this information is then placed in the cookie that is
passed to statd and returned by statd when the client restarts.
Previously only the IP address was passing the cookie, so possibly
not all nlm_host structures would have been found.
Because of these changes, lockd does not need to know
anything about the nfsd export table, so the interface to
nfsd is much more narrow.
Another consequence is that when nfsd is told to delete a client,
it cannot tell lockd to forget all the locks for that client.
However it is not clear that lockd should ever forget any locks
unless it is told to shutdown (or simulate a shutdown), and in
anycase, the current nfsd admin tools never tell nfsd to delete
a client anyway.
Diffstat (limited to 'include/linux/lockd/xdr.h')
| -rw-r--r-- | include/linux/lockd/xdr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index 51657ceffa2d..ef14dbd2a67c 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h @@ -76,6 +76,8 @@ struct nlm_reboot { int len; u32 state; u32 addr; + u32 vers; + u32 proto; }; /* |
