diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 11:53:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 11:53:47 -0400 |
commit | f63d395d47f37a4fe771e6d4b1db9d2cdae5ffc5 (patch) | |
tree | 3448a14ae965802adb963762cadeb9989ce4caa2 /fs/nfs/callback.c | |
parent | 643ac9fc5429e85b8b7f534544b80bcc4f34c367 (diff) | |
parent | 5a7c9eec9fde1da0e3adf0a4ddb64ff2a324a492 (diff) |
Merge tag 'nfs-for-3.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates for Linux 3.4 from Trond Myklebust:
"New features include:
- Add NFS client support for containers.
This should enable most of the necessary functionality, including
lockd support, and support for rpc.statd, NFSv4 idmapper and
RPCSEC_GSS upcalls into the correct network namespace from which
the mount system call was issued.
- NFSv4 idmapper scalability improvements
Base the idmapper cache on the keyring interface to allow
concurrent access to idmapper entries. Start the process of
migrating users from the single-threaded daemon-based approach to
the multi-threaded request-key based approach.
- NFSv4.1 implementation id.
Allows the NFSv4.1 client and server to mutually identify each
other for logging and debugging purposes.
- Support the 'vers=4.1' mount option for mounting NFSv4.1 instead of
having to use the more counterintuitive 'vers=4,minorversion=1'.
- SUNRPC tracepoints.
Start the process of adding tracepoints in order to improve
debugging of the RPC layer.
- pNFS object layout support for autologin.
Important bugfixes include:
- Fix a bug in rpc_wake_up/rpc_wake_up_status that caused them to
fail to wake up all tasks when applied to priority waitqueues.
- Ensure that we handle read delegations correctly, when we try to
truncate a file.
- A number of fixes for NFSv4 state manager loops (mostly to do with
delegation recovery)."
* tag 'nfs-for-3.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (224 commits)
NFS: fix sb->s_id in nfs debug prints
xprtrdma: Remove assumption that each segment is <= PAGE_SIZE
xprtrdma: The transport should not bug-check when a dup reply is received
pnfs-obj: autologin: Add support for protocol autologin
NFS: Remove nfs4_setup_sequence from generic rename code
NFS: Remove nfs4_setup_sequence from generic unlink code
NFS: Remove nfs4_setup_sequence from generic read code
NFS: Remove nfs4_setup_sequence from generic write code
NFS: Fix more NFS debug related build warnings
SUNRPC/LOCKD: Fix build warnings when CONFIG_SUNRPC_DEBUG is undefined
nfs: non void functions must return a value
SUNRPC: Kill compiler warning when RPC_DEBUG is unset
SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG
NFS: Use cond_resched_lock() to reduce latencies in the commit scans
NFSv4: It is not safe to dereference lsp->ls_state in release_lockowner
NFS: ncommit count is being double decremented
SUNRPC: We must not use list_for_each_entry_safe() in rpc_wake_up()
Try using machine credentials for RENEW calls
NFSv4.1: Fix a few issues in filelayout_commit_pagelist
NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code
...
Diffstat (limited to 'fs/nfs/callback.c')
-rw-r--r-- | fs/nfs/callback.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 516f3375e06..eb95f5091c1 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -85,7 +85,7 @@ nfs4_callback_svc(void *vrqstp) | |||
85 | } | 85 | } |
86 | if (err < 0) { | 86 | if (err < 0) { |
87 | if (err != preverr) { | 87 | if (err != preverr) { |
88 | printk(KERN_WARNING "%s: unexpected error " | 88 | printk(KERN_WARNING "NFS: %s: unexpected error " |
89 | "from svc_recv (%d)\n", __func__, err); | 89 | "from svc_recv (%d)\n", __func__, err); |
90 | preverr = err; | 90 | preverr = err; |
91 | } | 91 | } |
@@ -101,12 +101,12 @@ nfs4_callback_svc(void *vrqstp) | |||
101 | /* | 101 | /* |
102 | * Prepare to bring up the NFSv4 callback service | 102 | * Prepare to bring up the NFSv4 callback service |
103 | */ | 103 | */ |
104 | struct svc_rqst * | 104 | static struct svc_rqst * |
105 | nfs4_callback_up(struct svc_serv *serv) | 105 | nfs4_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) |
106 | { | 106 | { |
107 | int ret; | 107 | int ret; |
108 | 108 | ||
109 | ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET, | 109 | ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET, |
110 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); | 110 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); |
111 | if (ret <= 0) | 111 | if (ret <= 0) |
112 | goto out_err; | 112 | goto out_err; |
@@ -114,7 +114,7 @@ nfs4_callback_up(struct svc_serv *serv) | |||
114 | dprintk("NFS: Callback listener port = %u (af %u)\n", | 114 | dprintk("NFS: Callback listener port = %u (af %u)\n", |
115 | nfs_callback_tcpport, PF_INET); | 115 | nfs_callback_tcpport, PF_INET); |
116 | 116 | ||
117 | ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6, | 117 | ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET6, |
118 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); | 118 | nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); |
119 | if (ret > 0) { | 119 | if (ret > 0) { |
120 | nfs_callback_tcpport6 = ret; | 120 | nfs_callback_tcpport6 = ret; |
@@ -172,7 +172,7 @@ nfs41_callback_svc(void *vrqstp) | |||
172 | /* | 172 | /* |
173 | * Bring up the NFSv4.1 callback service | 173 | * Bring up the NFSv4.1 callback service |
174 | */ | 174 | */ |
175 | struct svc_rqst * | 175 | static struct svc_rqst * |
176 | nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) | 176 | nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) |
177 | { | 177 | { |
178 | struct svc_rqst *rqstp; | 178 | struct svc_rqst *rqstp; |
@@ -183,7 +183,7 @@ nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt) | |||
183 | * fore channel connection. | 183 | * fore channel connection. |
184 | * Returns the input port (0) and sets the svc_serv bc_xprt on success | 184 | * Returns the input port (0) and sets the svc_serv bc_xprt on success |
185 | */ | 185 | */ |
186 | ret = svc_create_xprt(serv, "tcp-bc", &init_net, PF_INET, 0, | 186 | ret = svc_create_xprt(serv, "tcp-bc", xprt->xprt_net, PF_INET, 0, |
187 | SVC_SOCK_ANONYMOUS); | 187 | SVC_SOCK_ANONYMOUS); |
188 | if (ret < 0) { | 188 | if (ret < 0) { |
189 | rqstp = ERR_PTR(ret); | 189 | rqstp = ERR_PTR(ret); |
@@ -269,7 +269,7 @@ int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt) | |||
269 | serv, xprt, &rqstp, &callback_svc); | 269 | serv, xprt, &rqstp, &callback_svc); |
270 | if (!minorversion_setup) { | 270 | if (!minorversion_setup) { |
271 | /* v4.0 callback setup */ | 271 | /* v4.0 callback setup */ |
272 | rqstp = nfs4_callback_up(serv); | 272 | rqstp = nfs4_callback_up(serv, xprt); |
273 | callback_svc = nfs4_callback_svc; | 273 | callback_svc = nfs4_callback_svc; |
274 | } | 274 | } |
275 | 275 | ||
@@ -332,7 +332,6 @@ void nfs_callback_down(int minorversion) | |||
332 | int | 332 | int |
333 | check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) | 333 | check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) |
334 | { | 334 | { |
335 | struct rpc_clnt *r = clp->cl_rpcclient; | ||
336 | char *p = svc_gss_principal(rqstp); | 335 | char *p = svc_gss_principal(rqstp); |
337 | 336 | ||
338 | if (rqstp->rq_authop->flavour != RPC_AUTH_GSS) | 337 | if (rqstp->rq_authop->flavour != RPC_AUTH_GSS) |
@@ -353,7 +352,7 @@ check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp) | |||
353 | if (memcmp(p, "nfs@", 4) != 0) | 352 | if (memcmp(p, "nfs@", 4) != 0) |
354 | return 0; | 353 | return 0; |
355 | p += 4; | 354 | p += 4; |
356 | if (strcmp(p, r->cl_server) != 0) | 355 | if (strcmp(p, clp->cl_hostname) != 0) |
357 | return 0; | 356 | return 0; |
358 | return 1; | 357 | return 1; |
359 | } | 358 | } |