diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:54:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:54:33 -0400 |
| commit | a87e84b5cdfacf11af4e8a85c4bca9793658536f (patch) | |
| tree | f8e3cb2d339d8ed0e987d55f725e501730cdc81d | |
| parent | 342ff1a1b558ebbdb8cbd55ab6a63eca8b2473ca (diff) | |
| parent | 3c394ddaa7ea4205f933fd9b481166b2669368a9 (diff) | |
Merge branch 'for-2.6.32' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.32' of git://linux-nfs.org/~bfields/linux: (68 commits)
nfsd4: nfsv4 clients should cross mountpoints
nfsd: revise 4.1 status documentation
sunrpc/cache: avoid variable over-loading in cache_defer_req
sunrpc/cache: use list_del_init for the list_head entries in cache_deferred_req
nfsd: return success for non-NFS4 nfs4_state_start
nfsd41: Refactor create_client()
nfsd41: modify nfsd4.1 backchannel to use new xprt class
nfsd41: Backchannel: Implement cb_recall over NFSv4.1
nfsd41: Backchannel: cb_sequence callback
nfsd41: Backchannel: Setup sequence information
nfsd41: Backchannel: Server backchannel RPC wait queue
nfsd41: Backchannel: Add sequence arguments to callback RPC arguments
nfsd41: Backchannel: callback infrastructure
nfsd4: use common rpc_cred for all callbacks
nfsd4: allow nfs4 state startup to fail
SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronous
nfsd4: fix null dereference creating nfsv4 callback client
nfsd4: fix whitespace in NFSPROC4_CLNT_CB_NULL definition
nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel
sunrpc/cache: simplify cache_fresh_locked and cache_fresh_unlocked.
...
42 files changed, 1640 insertions, 897 deletions
diff --git a/Documentation/filesystems/nfs41-server.txt b/Documentation/filesystems/nfs41-server.txt index 05d81cbcb2e1..5920fe26e6ff 100644 --- a/Documentation/filesystems/nfs41-server.txt +++ b/Documentation/filesystems/nfs41-server.txt | |||
| @@ -11,6 +11,11 @@ the /proc/fs/nfsd/versions control file. Note that to write this | |||
| 11 | control file, the nfsd service must be taken down. Use your user-mode | 11 | control file, the nfsd service must be taken down. Use your user-mode |
| 12 | nfs-utils to set this up; see rpc.nfsd(8) | 12 | nfs-utils to set this up; see rpc.nfsd(8) |
| 13 | 13 | ||
| 14 | (Warning: older servers will interpret "+4.1" and "-4.1" as "+4" and | ||
| 15 | "-4", respectively. Therefore, code meant to work on both new and old | ||
| 16 | kernels must turn 4.1 on or off *before* turning support for version 4 | ||
| 17 | on or off; rpc.nfsd does this correctly.) | ||
| 18 | |||
| 14 | The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based | 19 | The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based |
| 15 | on the latest NFSv4.1 Internet Draft: | 20 | on the latest NFSv4.1 Internet Draft: |
| 16 | http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29 | 21 | http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29 |
| @@ -25,6 +30,49 @@ are still under development out of tree. | |||
| 25 | See http://wiki.linux-nfs.org/wiki/index.php/PNFS_prototype_design | 30 | See http://wiki.linux-nfs.org/wiki/index.php/PNFS_prototype_design |
| 26 | for more information. | 31 | for more information. |
| 27 | 32 | ||
| 33 | The current implementation is intended for developers only: while it | ||
| 34 | does support ordinary file operations on clients we have tested against | ||
| 35 | (including the linux client), it is incomplete in ways which may limit | ||
| 36 | features unexpectedly, cause known bugs in rare cases, or cause | ||
| 37 | interoperability problems with future clients. Known issues: | ||
| 38 | |||
| 39 | - gss support is questionable: currently mounts with kerberos | ||
| 40 | from a linux client are possible, but we aren't really | ||
| 41 | conformant with the spec (for example, we don't use kerberos | ||
| 42 | on the backchannel correctly). | ||
| 43 | - no trunking support: no clients currently take advantage of | ||
| 44 | trunking, but this is a mandatory failure, and its use is | ||
| 45 | recommended to clients in a number of places. (E.g. to ensure | ||
| 46 | timely renewal in case an existing connection's retry timeouts | ||
| 47 | have gotten too long; see section 8.3 of the draft.) | ||
| 48 | Therefore, lack of this feature may cause future clients to | ||
| 49 | fail. | ||
| 50 | - Incomplete backchannel support: incomplete backchannel gss | ||
| 51 | support and no support for BACKCHANNEL_CTL mean that | ||
| 52 | callbacks (hence delegations and layouts) may not be | ||
| 53 | available and clients confused by the incomplete | ||
| 54 | implementation may fail. | ||
| 55 | - Server reboot recovery is unsupported; if the server reboots, | ||
| 56 | clients may fail. | ||
| 57 | - We do not support SSV, which provides security for shared | ||
| 58 | client-server state (thus preventing unauthorized tampering | ||
| 59 | with locks and opens, for example). It is mandatory for | ||
| 60 | servers to support this, though no clients use it yet. | ||
| 61 | - Mandatory operations which we do not support, such as | ||
| 62 | DESTROY_CLIENTID, FREE_STATEID, SECINFO_NO_NAME, and | ||
| 63 | TEST_STATEID, are not currently used by clients, but will be | ||
| 64 | (and the spec recommends their uses in common cases), and | ||
| 65 | clients should not be expected to know how to recover from the | ||
| 66 | case where they are not supported. This will eventually cause | ||
| 67 | interoperability failures. | ||
| 68 | |||
| 69 | In addition, some limitations are inherited from the current NFSv4 | ||
| 70 | implementation: | ||
| 71 | |||
| 72 | - Incomplete delegation enforcement: if a file is renamed or | ||
| 73 | unlinked, a client holding a delegation may continue to | ||
| 74 | indefinitely allow opens of the file under the old name. | ||
| 75 | |||
| 28 | The table below, taken from the NFSv4.1 document, lists | 76 | The table below, taken from the NFSv4.1 document, lists |
| 29 | the operations that are mandatory to implement (REQ), optional | 77 | the operations that are mandatory to implement (REQ), optional |
| 30 | (OPT), and NFSv4.0 operations that are required not to implement (MNI) | 78 | (OPT), and NFSv4.0 operations that are required not to implement (MNI) |
| @@ -142,6 +190,12 @@ NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 | | |||
| 142 | 190 | ||
| 143 | Implementation notes: | 191 | Implementation notes: |
| 144 | 192 | ||
| 193 | DELEGPURGE: | ||
| 194 | * mandatory only for servers that support CLAIM_DELEGATE_PREV and/or | ||
| 195 | CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that | ||
| 196 | persist across client reboots). Thus we need not implement this for | ||
| 197 | now. | ||
| 198 | |||
| 145 | EXCHANGE_ID: | 199 | EXCHANGE_ID: |
| 146 | * only SP4_NONE state protection supported | 200 | * only SP4_NONE state protection supported |
| 147 | * implementation ids are ignored | 201 | * implementation ids are ignored |
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 1f3b0fc0d351..fc9032dc8862 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
| @@ -166,7 +166,7 @@ __be32 nlmclnt_grant(const struct sockaddr *addr, const struct nlm_lock *lock) | |||
| 166 | */ | 166 | */ |
| 167 | if (fl_blocked->fl_u.nfs_fl.owner->pid != lock->svid) | 167 | if (fl_blocked->fl_u.nfs_fl.owner->pid != lock->svid) |
| 168 | continue; | 168 | continue; |
| 169 | if (!nlm_cmp_addr(nlm_addr(block->b_host), addr)) | 169 | if (!rpc_cmp_addr(nlm_addr(block->b_host), addr)) |
| 170 | continue; | 170 | continue; |
| 171 | if (nfs_compare_fh(NFS_FH(fl_blocked->fl_file->f_path.dentry->d_inode) ,fh) != 0) | 171 | if (nfs_compare_fh(NFS_FH(fl_blocked->fl_file->f_path.dentry->d_inode) ,fh) != 0) |
| 172 | continue; | 172 | continue; |
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 7cb076ac6b45..4600c2037b8b 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
| @@ -111,7 +111,7 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni) | |||
| 111 | */ | 111 | */ |
| 112 | chain = &nlm_hosts[nlm_hash_address(ni->sap)]; | 112 | chain = &nlm_hosts[nlm_hash_address(ni->sap)]; |
| 113 | hlist_for_each_entry(host, pos, chain, h_hash) { | 113 | hlist_for_each_entry(host, pos, chain, h_hash) { |
| 114 | if (!nlm_cmp_addr(nlm_addr(host), ni->sap)) | 114 | if (!rpc_cmp_addr(nlm_addr(host), ni->sap)) |
| 115 | continue; | 115 | continue; |
| 116 | 116 | ||
| 117 | /* See if we have an NSM handle for this client */ | 117 | /* See if we have an NSM handle for this client */ |
| @@ -125,7 +125,7 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni) | |||
| 125 | if (host->h_server != ni->server) | 125 | if (host->h_server != ni->server) |
| 126 | continue; | 126 | continue; |
| 127 | if (ni->server && | 127 | if (ni->server && |
