diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 17:42:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 17:42:28 -0400 |
commit | 08843b79fb35d33859e0f8f11a7318341076e4d1 (patch) | |
tree | e56e122146985b359d50787e3d1df640c4582dfa /include | |
parent | cc8362b1f6d724e46f515121d442779924b19fec (diff) | |
parent | 2c142baa7b237584bae7dc28630851701497e1ef (diff) |
Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux
Pull nfsd changes from J. Bruce Fields:
"This has been an unusually quiet cycle--mostly bugfixes and cleanup.
The one large piece is Stanislav's work to containerize the server's
grace period--but that in itself is just one more step in a
not-yet-complete project to allow fully containerized nfs service.
There are a number of outstanding delegation, container, v4 state, and
gss patches that aren't quite ready yet; 3.7 may be wilder."
* 'nfsd-next' of git://linux-nfs.org/~bfields/linux: (35 commits)
NFSd: make boot_time variable per network namespace
NFSd: make grace end flag per network namespace
Lockd: move grace period management from lockd() to per-net functions
LockD: pass actual network namespace to grace period management functions
LockD: manage grace list per network namespace
SUNRPC: service request network namespace helper introduced
NFSd: make nfsd4_manager allocated per network namespace context.
LockD: make lockd manager allocated per network namespace
LockD: manage grace period per network namespace
Lockd: add more debug to host shutdown functions
Lockd: host complaining function introduced
LockD: manage used host count per networks namespace
LockD: manage garbage collection timeout per networks namespace
LockD: make garbage collector network namespace aware.
LockD: mark host per network namespace on garbage collect
nfsd4: fix missing fault_inject.h include
locks: move lease-specific code out of locks_delete_lock
locks: prevent side-effects of locks_release_private before file_lock is initialized
NFSd: set nfsd_serv to NULL after service destruction
NFSd: introduce nfsd_destroy() helper
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 5 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 6 | ||||
-rw-r--r-- | include/linux/sunrpc/cache.h | 34 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 2 |
4 files changed, 34 insertions, 13 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8fabb037a48d..b178f9e91e23 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1163,9 +1163,10 @@ struct lock_manager { | |||
1163 | struct list_head list; | 1163 | struct list_head list; |
1164 | }; | 1164 | }; |
1165 | 1165 | ||
1166 | void locks_start_grace(struct lock_manager *); | 1166 | struct net; |
1167 | void locks_start_grace(struct net *, struct lock_manager *); | ||
1167 | void locks_end_grace(struct lock_manager *); | 1168 | void locks_end_grace(struct lock_manager *); |
1168 | int locks_in_grace(void); | 1169 | int locks_in_grace(struct net *); |
1169 | 1170 | ||
1170 | /* that will die - we need it for nfs_lock_info */ | 1171 | /* that will die - we need it for nfs_lock_info */ |
1171 | #include <linux/nfs_fs_i.h> | 1172 | #include <linux/nfs_fs_i.h> |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index f04ce6ac6d04..f5a051a79273 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -262,11 +262,11 @@ typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); | |||
262 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 262 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
263 | struct nlm_host *, struct nlm_lock *, int, | 263 | struct nlm_host *, struct nlm_lock *, int, |
264 | struct nlm_cookie *, int); | 264 | struct nlm_cookie *, int); |
265 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); | 265 | __be32 nlmsvc_unlock(struct net *net, struct nlm_file *, struct nlm_lock *); |
266 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, | 266 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, |
267 | struct nlm_host *, struct nlm_lock *, | 267 | struct nlm_host *, struct nlm_lock *, |
268 | struct nlm_lock *, struct nlm_cookie *); | 268 | struct nlm_lock *, struct nlm_cookie *); |
269 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); | 269 | __be32 nlmsvc_cancel_blocked(struct net *net, struct nlm_file *, struct nlm_lock *); |
270 | unsigned long nlmsvc_retry_blocked(void); | 270 | unsigned long nlmsvc_retry_blocked(void); |
271 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 271 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
272 | nlm_host_match_fn_t match); | 272 | nlm_host_match_fn_t match); |
@@ -279,7 +279,7 @@ void nlmsvc_release_call(struct nlm_rqst *); | |||
279 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, | 279 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, |
280 | struct nfs_fh *); | 280 | struct nfs_fh *); |
281 | void nlm_release_file(struct nlm_file *); | 281 | void nlm_release_file(struct nlm_file *); |
282 | void nlmsvc_mark_resources(void); | 282 | void nlmsvc_mark_resources(struct net *); |
283 | void nlmsvc_free_host_resources(struct nlm_host *); | 283 | void nlmsvc_free_host_resources(struct nlm_host *); |
284 | void nlmsvc_invalidate_all(void); | 284 | void nlmsvc_invalidate_all(void); |
285 | 285 | ||
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index f5fd6160dbca..f792794f6634 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -217,14 +217,32 @@ extern int qword_get(char **bpp, char *dest, int bufsize); | |||
217 | static inline int get_int(char **bpp, int *anint) | 217 | static inline int get_int(char **bpp, int *anint) |
218 | { | 218 | { |
219 | char buf[50]; | 219 | char buf[50]; |
220 | char *ep; | 220 | int len = qword_get(bpp, buf, sizeof(buf)); |
221 | int rv; | 221 | |
222 | int len = qword_get(bpp, buf, 50); | 222 | if (len < 0) |
223 | if (len < 0) return -EINVAL; | 223 | return -EINVAL; |
224 | if (len ==0) return -ENOENT; | 224 | if (len == 0) |
225 | rv = simple_strtol(buf, &ep, 0); | 225 | return -ENOENT; |
226 | if (*ep) return -EINVAL; | 226 | |
227 | *anint = rv; | 227 | if (kstrtoint(buf, 0, anint)) |
228 | return -EINVAL; | ||
229 | |||
230 | return 0; | ||
231 | } | ||
232 | |||
233 | static inline int get_uint(char **bpp, unsigned int *anint) | ||
234 | { | ||
235 | char buf[50]; | ||
236 | int len = qword_get(bpp, buf, sizeof(buf)); | ||
237 | |||
238 | if (len < 0) | ||
239 | return -EINVAL; | ||
240 | if (len == 0) | ||
241 | return -ENOENT; | ||
242 | |||
243 | if (kstrtouint(buf, 0, anint)) | ||
244 | return -EINVAL; | ||
245 | |||
228 | return 0; | 246 | return 0; |
229 | } | 247 | } |
230 | 248 | ||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 40e0a273faea..d83db800fe02 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -278,6 +278,8 @@ struct svc_rqst { | |||
278 | struct task_struct *rq_task; /* service thread */ | 278 | struct task_struct *rq_task; /* service thread */ |
279 | }; | 279 | }; |
280 | 280 | ||
281 | #define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net) | ||
282 | |||
281 | /* | 283 | /* |
282 | * Rigorous type checking on sockaddr type conversions | 284 | * Rigorous type checking on sockaddr type conversions |
283 | */ | 285 | */ |