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 /include | |
| 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.
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/lockd/lockd.h | 43 | ||||
| -rw-r--r-- | include/linux/nfs4.h | 2 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsd.h | 7 | ||||
| -rw-r--r-- | include/linux/nfsd/state.h | 77 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr4.h | 19 | ||||
| -rw-r--r-- | include/linux/sunrpc/auth.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 114 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 19 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprtrdma.h | 5 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprtsock.h | 11 |
13 files changed, 200 insertions, 105 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index ccf2e0dc077..a34dea46b62 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -338,49 +338,6 @@ static inline int nlm_privileged_requester(const struct svc_rqst *rqstp) | |||
| 338 | } | 338 | } |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | static inline int __nlm_cmp_addr4(const struct sockaddr *sap1, | ||
| 342 | const struct sockaddr *sap2) | ||
| 343 | { | ||
| 344 | const struct sockaddr_in *sin1 = (const struct sockaddr_in *)sap1; | ||
| 345 | const struct sockaddr_in *sin2 = (const struct sockaddr_in *)sap2; | ||
| 346 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | ||
| 347 | } | ||
| 348 | |||
| 349 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
| 350 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | ||
| 351 | const struct sockaddr *sap2) | ||
| 352 | { | ||
| 353 | const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sap1; | ||
| 354 | const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; | ||
| 355 | return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); | ||
| 356 | } | ||
| 357 | #else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
| 358 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | ||
| 359 | const struct sockaddr *sap2) | ||
| 360 | { | ||
| 361 | return 0; | ||
| 362 | } | ||
| 363 | #endif /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
| 364 | |||
| 365 | /* | ||
| 366 | * Compare two host addresses | ||
| 367 | * | ||
| 368 | * Return TRUE if the addresses are the same; otherwise FALSE. | ||
| 369 | */ | ||
| 370 | static inline int nlm_cmp_addr(const struct sockaddr *sap1, | ||
| 371 | const struct sockaddr *sap2) | ||
| 372 | { | ||
| 373 | if (sap1->sa_family == sap2->sa_family) { | ||
| 374 | switch (sap1->sa_family) { | ||
| 375 | case AF_INET: | ||
| 376 | return __nlm_cmp_addr4(sap1, sap2); | ||
| 377 | case AF_INET6: | ||
| 378 | return __nlm_cmp_addr6(sap1, sap2); | ||
| 379 | } | ||
| 380 | } | ||
| 381 | return 0; | ||
| 382 | } | ||
| 383 | |||
| 384 | /* | 341 | /* |
| 385 | * Compare two NLM locks. | 342 | * Compare two NLM locks. |
| 386 | * When the second lock is of type F_UNLCK, this acts like a wildcard. | 343 | * When the second lock is of type F_UNLCK, this acts like a wildcard. |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 33b283601f6..c4c06020810 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -234,7 +234,7 @@ enum nfs_opnum4 { | |||
| 234 | Needs to be updated if more operations are defined in future.*/ | 234 | Needs to be updated if more operations are defined in future.*/ |
| 235 | 235 | ||
| 236 | #define FIRST_NFS4_OP OP_ACCESS | 236 | #define FIRST_NFS4_OP OP_ACCESS |
| 237 | #define LAST_NFS4_OP OP_RELEASE_LOCKOWNER | 237 | #define LAST_NFS4_OP OP_RECLAIM_COMPLETE |
| 238 | 238 | ||
| 239 | enum nfsstat4 { | 239 | enum nfsstat4 { |
| 240 | NFS4_OK = 0, | 240 | NFS4_OK = 0, |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 2b49d676d0c..03bbe903910 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
| @@ -56,6 +56,9 @@ extern struct svc_version nfsd_version2, nfsd_version3, | |||
| 56 | extern u32 nfsd_supported_minorversion; | 56 | extern u32 nfsd_supported_minorversion; |
| 57 | extern struct mutex nfsd_mutex; | 57 | extern struct mutex nfsd_mutex; |
| 58 | extern struct svc_serv *nfsd_serv; | 58 | extern struct svc_serv *nfsd_serv; |
| 59 | extern spinlock_t nfsd_drc_lock; | ||
| 60 | extern unsigned int nfsd_drc_max_mem; | ||
| 61 | extern unsigned int nfsd_drc_mem_used; | ||
| 59 | 62 | ||
| 60 | extern struct seq_operations nfs_exports_op; | 63 | extern struct seq_operations nfs_exports_op; |
| 61 | 64 | ||
| @@ -163,7 +166,7 @@ extern int nfsd_max_blksize; | |||
| 163 | extern unsigned int max_delegations; | 166 | extern unsigned int max_delegations; |
| 164 | int nfs4_state_init(void); | 167 | int nfs4_state_init(void); |
| 165 | void nfsd4_free_slabs(void); | 168 | void nfsd4_free_slabs(void); |
| 166 | void nfs4_state_start(void); | 169 | int nfs4_state_start(void); |
| 167 | void nfs4_state_shutdown(void); | 170 | void nfs4_state_shutdown(void); |
| 168 | time_t nfs4_lease_time(void); | 171 | time_t nfs4_lease_time(void); |
| 169 | void nfs4_reset_lease(time_t leasetime); | 172 | void nfs4_reset_lease(time_t leasetime); |
| @@ -171,7 +174,7 @@ int nfs4_reset_recoverydir(char *recdir); | |||
| 171 | #else | 174 | #else |
| 172 | static inline int nfs4_state_init(void) { return 0; } | 175 | static inline int nfs4_state_init(void) { return 0; } |
| 173 | static inline void nfsd4_free_slabs(void) { } | 176 | static inline void nfsd4_free_slabs(void) { } |
| 174 | static inline void nfs4_state_start(void) { } | 177 | static inline int nfs4_state_start(void) { return 0; } |
| 175 | static inline void nfs4_state_shutdown(void) { } | 178 | static inline void nfs4_state_shutdown(void) { } |
| 176 | static inline time_t nfs4_lease_time(void) { return 0; } | 179 | static inline time_t nfs4_lease_time(void) { return 0; } |
| 177 | static inline void nfs4_reset_lease(time_t leasetime) { } | 180 | static inline void nfs4_reset_lease(time_t leasetime) { } |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 57ab2ed0845..b38d1132418 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
| @@ -60,6 +60,12 @@ typedef struct { | |||
| 60 | #define si_stateownerid si_opaque.so_stateownerid | 60 | #define si_stateownerid si_opaque.so_stateownerid |
| 61 | #define si_fileid si_opaque.so_fileid | 61 | #define si_fileid si_opaque.so_fileid |
| 62 | 62 | ||
| 63 | struct nfsd4_cb_sequence { | ||
| 64 | /* args/res */ | ||
| 65 | u32 cbs_minorversion; | ||
| 66 | struct nfs4_client *cbs_clp; | ||
| 67 | }; | ||
| 68 | |||
| 63 | struct nfs4_delegation { | 69 | struct nfs4_delegation { |
| 64 | struct list_head dl_perfile; | 70 | struct list_head dl_perfile; |
| 65 | struct list_head dl_perclnt; | 71 | struct list_head dl_perclnt; |
| @@ -81,38 +87,35 @@ struct nfs4_delegation { | |||
| 81 | /* client delegation callback info */ | 87 | /* client delegation callback info */ |
| 82 | struct nfs4_cb_conn { | 88 | struct nfs4_cb_conn { |
| 83 | /* SETCLIENTID info */ | 89 | /* SETCLIENTID info */ |
| 84 | u32 cb_addr; | 90 | struct sockaddr_storage cb_addr; |
| 85 | unsigned short cb_port; | 91 | size_t cb_addrlen; |
| 86 | u32 cb_prog; | 92 | u32 cb_prog; |
| 87 | u32 cb_minorversion; | 93 | u32 cb_minorversion; |
| 88 | u32 cb_ident; /* minorversion 0 only */ | 94 | u32 cb_ident; /* minorversion 0 only */ |
| 89 | /* RPC client info */ | 95 | /* RPC client info */ |
| 90 | atomic_t cb_set; /* successful CB_NULL call */ | 96 | atomic_t cb_set; /* successful CB_NULL call */ |
| 91 | struct rpc_clnt * cb_client; | 97 | struct rpc_clnt * cb_client; |
| 92 | struct rpc_cred * cb_cred; | ||
| 93 | }; | 98 | }; |
| 94 | 99 | ||
| 95 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ | 100 | /* Maximum number of slots per session. 160 is useful for long haul TCP */ |
| 96 | #define NFSD_MAX_SLOTS_PER_SESSION 128 | 101 | #define NFSD_MAX_SLOTS_PER_SESSION 160 |
| 97 | /* Maximum number of pages per slot cache entry */ | ||
| 98 | #define NFSD_PAGES_PER_SLOT 1 | ||
| 99 | /* Maximum number of operations per session compound */ | 102 | /* Maximum number of operations per session compound */ |
| 100 | #define NFSD_MAX_OPS_PER_COMPOUND 16 | 103 | #define NFSD_MAX_OPS_PER_COMPOUND 16 |
| 101 | 104 | /* Maximum session per slot cache size */ | |
| 102 | struct nfsd4_cache_entry { | 105 | #define NFSD_SLOT_CACHE_SIZE 1024 |
| 103 | __be32 ce_status; | 106 | /* Maximum number of NFSD_SLOT_CACHE_SIZE slots per session */ |
| 104 | struct kvec ce_datav; /* encoded NFSv4.1 data in rq_res.head[0] */ | 107 | #define NFSD_CACHE_SIZE_SLOTS_PER_SESSION 32 |
| 105 | struct page *ce_respages[NFSD_PAGES_PER_SLOT + 1]; | 108 | #define NFSD_MAX_MEM_PER_SESSION \ |
| 106 | int ce_cachethis; | 109 | (NFSD_CACHE_SIZE_SLOTS_PER_SESSION * NFSD_SLOT_CACHE_SIZE) |
| 107 | short ce_resused; | ||
| 108 | int ce_opcnt; | ||
| 109 | int ce_rpchdrlen; | ||
| 110 | }; | ||
| 111 | 110 | ||
| 112 | struct nfsd4_slot { | 111 | struct nfsd4_slot { |
| 113 | bool sl_inuse; | 112 | bool sl_inuse; |
| 114 | u32 sl_seqid; | 113 | bool sl_cachethis; |
| 115 | struct nfsd4_cache_entry sl_cache_entry; | 114 | u16 sl_opcnt; |
| 115 | u32 sl_seqid; | ||
| 116 | __be32 sl_status; | ||
| 117 | u32 sl_datalen; | ||
| 118 | char sl_data[]; | ||
| 116 | }; | ||
