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 /fs/lockd/svcproc.c | |
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 'fs/lockd/svcproc.c')
-rw-r--r-- | fs/lockd/svcproc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index d27aab11f324..de8f2caa2235 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/lockd/lockd.h> | 12 | #include <linux/lockd/lockd.h> |
13 | #include <linux/lockd/share.h> | 13 | #include <linux/lockd/share.h> |
14 | #include <linux/sunrpc/svc_xprt.h> | ||
14 | 15 | ||
15 | #define NLMDBG_FACILITY NLMDBG_CLIENT | 16 | #define NLMDBG_FACILITY NLMDBG_CLIENT |
16 | 17 | ||
@@ -175,13 +176,14 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
175 | { | 176 | { |
176 | struct nlm_host *host; | 177 | struct nlm_host *host; |
177 | struct nlm_file *file; | 178 | struct nlm_file *file; |
179 | struct net *net = SVC_NET(rqstp); | ||
178 | 180 | ||
179 | dprintk("lockd: CANCEL called\n"); | 181 | dprintk("lockd: CANCEL called\n"); |
180 | 182 | ||
181 | resp->cookie = argp->cookie; | 183 | resp->cookie = argp->cookie; |
182 | 184 | ||
183 | /* Don't accept requests during grace period */ | 185 | /* Don't accept requests during grace period */ |
184 | if (locks_in_grace()) { | 186 | if (locks_in_grace(net)) { |
185 | resp->status = nlm_lck_denied_grace_period; | 187 | resp->status = nlm_lck_denied_grace_period; |
186 | return rpc_success; | 188 | return rpc_success; |
187 | } | 189 | } |
@@ -191,7 +193,7 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
191 | return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; | 193 | return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; |
192 | 194 | ||
193 | /* Try to cancel request. */ | 195 | /* Try to cancel request. */ |
194 | resp->status = cast_status(nlmsvc_cancel_blocked(file, &argp->lock)); | 196 | resp->status = cast_status(nlmsvc_cancel_blocked(net, file, &argp->lock)); |
195 | 197 | ||
196 | dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); | 198 | dprintk("lockd: CANCEL status %d\n", ntohl(resp->status)); |
197 | nlmsvc_release_host(host); | 199 | nlmsvc_release_host(host); |
@@ -208,13 +210,14 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
208 | { | 210 | { |
209 | struct nlm_host *host; | 211 | struct nlm_host *host; |
210 | struct nlm_file *file; | 212 | struct nlm_file *file; |
213 | struct net *net = SVC_NET(rqstp); | ||
211 | 214 | ||
212 | dprintk("lockd: UNLOCK called\n"); | 215 | dprintk("lockd: UNLOCK called\n"); |
213 | 216 | ||
214 | resp->cookie = argp->cookie; | 217 | resp->cookie = argp->cookie; |
215 | 218 | ||
216 | /* Don't accept new lock requests during grace period */ | 219 | /* Don't accept new lock requests during grace period */ |
217 | if (locks_in_grace()) { | 220 | if (locks_in_grace(net)) { |
218 | resp->status = nlm_lck_denied_grace_period; | 221 | resp->status = nlm_lck_denied_grace_period; |
219 | return rpc_success; | 222 | return rpc_success; |
220 | } | 223 | } |
@@ -224,7 +227,7 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
224 | return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; | 227 | return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success; |
225 | 228 | ||
226 | /* Now try to remove the lock */ | 229 | /* Now try to remove the lock */ |
227 | resp->status = cast_status(nlmsvc_unlock(file, &argp->lock)); | 230 | resp->status = cast_status(nlmsvc_unlock(net, file, &argp->lock)); |
228 | 231 | ||
229 | dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); | 232 | dprintk("lockd: UNLOCK status %d\n", ntohl(resp->status)); |
230 | nlmsvc_release_host(host); | 233 | nlmsvc_release_host(host); |
@@ -361,7 +364,7 @@ nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
361 | resp->cookie = argp->cookie; | 364 | resp->cookie = argp->cookie; |
362 | 365 | ||
363 | /* Don't accept new lock requests during grace period */ | 366 | /* Don't accept new lock requests during grace period */ |
364 | if (locks_in_grace() && !argp->reclaim) { | 367 | if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) { |
365 | resp->status = nlm_lck_denied_grace_period; | 368 | resp->status = nlm_lck_denied_grace_period; |
366 | return rpc_success; | 369 | return rpc_success; |
367 | } | 370 | } |
@@ -394,7 +397,7 @@ nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp, | |||
394 | resp->cookie = argp->cookie; | 397 | resp->cookie = argp->cookie; |
395 | 398 | ||
396 | /* Don't accept requests during grace period */ | 399 | /* Don't accept requests during grace period */ |
397 | if (locks_in_grace()) { | 400 | if (locks_in_grace(SVC_NET(rqstp))) { |
398 | resp->status = nlm_lck_denied_grace_period; | 401 | resp->status = nlm_lck_denied_grace_period; |
399 | return rpc_success; | 402 | return rpc_success; |
400 | } | 403 | } |