diff options
author | NeilBrown <neilb@suse.de> | 2006-10-17 03:10:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 11:18:46 -0400 |
commit | d343fce148a4eee24a907a05c4101d3268045aae (patch) | |
tree | b8a110f85050b2425ce85434c01c0eac0076472b /include/linux/lockd | |
parent | 4481d1038f4116f3f5c307d919e6dc815a3acbb9 (diff) |
[PATCH] knfsd: Allow lockd to drop replies as appropriate
It is possible for the ->fopen callback from lockd into nfsd to find that an
answer cannot be given straight away (an upcall is needed) and so the request
has to be 'dropped', to be retried later. That error status is not currently
propagated back.
So:
Change nlm_fopen to return nlm error codes (rather than a private
protocol) and define a new nlm_drop_reply code.
Cause nlm_drop_reply to cause the rpc request to get rpc_drop_reply
when this error comes back.
Cause svc_process to drop a request which returns a status of
rpc_drop_reply.
[akpm@osdl.org: fix warning storm]
Cc: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/lockd')
-rw-r--r-- | include/linux/lockd/bind.h | 5 | ||||
-rw-r--r-- | include/linux/lockd/xdr.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 81e3a185f951..aa50d89eacd7 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -10,6 +10,11 @@ | |||
10 | #define LINUX_LOCKD_BIND_H | 10 | #define LINUX_LOCKD_BIND_H |
11 | 11 | ||
12 | #include <linux/lockd/nlm.h> | 12 | #include <linux/lockd/nlm.h> |
13 | /* need xdr-encoded error codes too, so... */ | ||
14 | #include <linux/lockd/xdr.h> | ||
15 | #ifdef CONFIG_LOCKD_V4 | ||
16 | #include <linux/lockd/xdr4.h> | ||
17 | #endif | ||
13 | 18 | ||
14 | /* Dummy declarations */ | 19 | /* Dummy declarations */ |
15 | struct svc_rqst; | 20 | struct svc_rqst; |
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index bb0a0f1caa91..66fdae3b490c 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/nfs.h> | 13 | #include <linux/nfs.h> |
14 | #include <linux/sunrpc/xdr.h> | 14 | #include <linux/sunrpc/xdr.h> |
15 | 15 | ||
16 | struct svc_rqst; | ||
17 | |||
16 | #define NLM_MAXCOOKIELEN 32 | 18 | #define NLM_MAXCOOKIELEN 32 |
17 | #define NLM_MAXSTRLEN 1024 | 19 | #define NLM_MAXSTRLEN 1024 |
18 | 20 | ||
@@ -22,6 +24,8 @@ | |||
22 | #define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED) | 24 | #define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED) |
23 | #define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD) | 25 | #define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD) |
24 | 26 | ||
27 | #define nlm_drop_reply __constant_htonl(30000) | ||
28 | |||
25 | /* Lock info passed via NLM */ | 29 | /* Lock info passed via NLM */ |
26 | struct nlm_lock { | 30 | struct nlm_lock { |
27 | char * caller; | 31 | char * caller; |