diff options
| author | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-11-03 10:11:27 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-11-03 10:11:27 -0400 |
| commit | 8f987768eb99631374f4ab0bb19cd062baf1397d (patch) | |
| tree | b89aa5c207f7ba6a688f45657424b937f17ceb8a /include/linux/sunrpc | |
| parent | 63f7526f26f0a9291ac3f7a986aa18ebfb61ec19 (diff) | |
| parent | c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff) | |
Merge commit 'v2.6.37-rc1' into for-2.6.37
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/auth.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/auth_gss.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/cache.h | 37 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/gss_spkm3.h | 55 | ||||
| -rw-r--r-- | include/linux/sunrpc/stats.h | 23 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 32 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcauth.h | 17 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 9 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 4 |
10 files changed, 110 insertions, 79 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 5bbc447175dc..b2024757edd5 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -122,8 +122,8 @@ extern const struct rpc_authops authnull_ops; | |||
| 122 | int __init rpc_init_authunix(void); | 122 | int __init rpc_init_authunix(void); |
| 123 | int __init rpc_init_generic_auth(void); | 123 | int __init rpc_init_generic_auth(void); |
| 124 | int __init rpcauth_init_module(void); | 124 | int __init rpcauth_init_module(void); |
| 125 | void __exit rpcauth_remove_module(void); | 125 | void rpcauth_remove_module(void); |
| 126 | void __exit rpc_destroy_generic_auth(void); | 126 | void rpc_destroy_generic_auth(void); |
| 127 | void rpc_destroy_authunix(void); | 127 | void rpc_destroy_authunix(void); |
| 128 | 128 | ||
| 129 | struct rpc_cred * rpc_lookup_cred(void); | 129 | struct rpc_cred * rpc_lookup_cred(void); |
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index 671538d25bc1..8eee9dbbfe7a 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
| @@ -69,7 +69,7 @@ struct gss_cl_ctx { | |||
| 69 | enum rpc_gss_proc gc_proc; | 69 | enum rpc_gss_proc gc_proc; |
| 70 | u32 gc_seq; | 70 | u32 gc_seq; |
| 71 | spinlock_t gc_seq_lock; | 71 | spinlock_t gc_seq_lock; |
| 72 | struct gss_ctx *gc_gss_ctx; | 72 | struct gss_ctx __rcu *gc_gss_ctx; |
| 73 | struct xdr_netobj gc_wire_ctx; | 73 | struct xdr_netobj gc_wire_ctx; |
| 74 | u32 gc_win; | 74 | u32 gc_win; |
| 75 | unsigned long gc_expiry; | 75 | unsigned long gc_expiry; |
| @@ -80,7 +80,7 @@ struct gss_upcall_msg; | |||
| 80 | struct gss_cred { | 80 | struct gss_cred { |
| 81 | struct rpc_cred gc_base; | 81 | struct rpc_cred gc_base; |
| 82 | enum rpc_gss_svc gc_service; | 82 | enum rpc_gss_svc gc_service; |
| 83 | struct gss_cl_ctx *gc_ctx; | 83 | struct gss_cl_ctx __rcu *gc_ctx; |
| 84 | struct gss_upcall_msg *gc_upcall; | 84 | struct gss_upcall_msg *gc_upcall; |
| 85 | unsigned long gc_upcall_timestamp; | 85 | unsigned long gc_upcall_timestamp; |
| 86 | unsigned char gc_machine_cred : 1; | 86 | unsigned char gc_machine_cred : 1; |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 7bf3e84b92f4..6950c981882d 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -125,12 +125,15 @@ struct cache_detail { | |||
| 125 | */ | 125 | */ |
| 126 | struct cache_req { | 126 | struct cache_req { |
| 127 | struct cache_deferred_req *(*defer)(struct cache_req *req); | 127 | struct cache_deferred_req *(*defer)(struct cache_req *req); |
| 128 | int thread_wait; /* How long (jiffies) we can block the | ||
| 129 | * current thread to wait for updates. | ||
| 130 | */ | ||
| 128 | }; | 131 | }; |
| 129 | /* this must be embedded in a deferred_request that is being | 132 | /* this must be embedded in a deferred_request that is being |
| 130 | * delayed awaiting cache-fill | 133 | * delayed awaiting cache-fill |
| 131 | */ | 134 | */ |
| 132 | struct cache_deferred_req { | 135 | struct cache_deferred_req { |
| 133 | struct list_head hash; /* on hash chain */ | 136 | struct hlist_node hash; /* on hash chain */ |
| 134 | struct list_head recent; /* on fifo */ | 137 | struct list_head recent; /* on fifo */ |
| 135 | struct cache_head *item; /* cache item we wait on */ | 138 | struct cache_head *item; /* cache item we wait on */ |
| 136 | void *owner; /* we might need to discard all defered requests | 139 | void *owner; /* we might need to discard all defered requests |
| @@ -194,7 +197,9 @@ extern void cache_purge(struct cache_detail *detail); | |||
| 194 | #define NEVER (0x7FFFFFFF) | 197 | #define NEVER (0x7FFFFFFF) |
| 195 | extern void __init cache_initialize(void); | 198 | extern void __init cache_initialize(void); |
| 196 | extern int cache_register(struct cache_detail *cd); | 199 | extern int cache_register(struct cache_detail *cd); |
| 200 | extern int cache_register_net(struct cache_detail *cd, struct net *net); | ||
| 197 | extern void cache_unregister(struct cache_detail *cd); | 201 | extern void cache_unregister(struct cache_detail *cd); |
| 202 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); | ||
| 198 | 203 | ||
| 199 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, | 204 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, |
| 200 | mode_t, struct cache_detail *); | 205 | mode_t, struct cache_detail *); |
| @@ -218,14 +223,42 @@ static inline int get_int(char **bpp, int *anint) | |||
| 218 | return 0; | 223 | return 0; |
| 219 | } | 224 | } |
| 220 | 225 | ||
| 226 | /* | ||
| 227 | * timestamps kept in the cache are expressed in seconds | ||
| 228 | * since boot. This is the best for measuring differences in | ||
| 229 | * real time. | ||
| 230 | */ | ||
| 231 | static inline time_t seconds_since_boot(void) | ||
| 232 | { | ||
| 233 | struct timespec boot; | ||
| 234 | getboottime(&boot); | ||
| 235 | return get_seconds() - boot.tv_sec; | ||
| 236 | } | ||
| 237 | |||
| 238 | static inline time_t convert_to_wallclock(time_t sinceboot) | ||
| 239 | { | ||
| 240 | struct timespec boot; | ||
| 241 | getboottime(&boot); | ||
| 242 | return boot.tv_sec + sinceboot; | ||
| 243 | } | ||
| 244 | |||
| 221 | static inline time_t get_expiry(char **bpp) | 245 | static inline time_t get_expiry(char **bpp) |
| 222 | { | 246 | { |
| 223 | int rv; | 247 | int rv; |
| 248 | struct timespec boot; | ||
| 249 | |||
| 224 | if (get_int(bpp, &rv)) | 250 | if (get_int(bpp, &rv)) |
| 225 | return 0; | 251 | return 0; |
| 226 | if (rv < 0) | 252 | if (rv < 0) |
| 227 | return 0; | 253 | return 0; |
| 228 | return rv; | 254 | getboottime(&boot); |
| 255 | return rv - boot.tv_sec; | ||
| 229 | } | 256 | } |
| 230 | 257 | ||
| 258 | static inline void sunrpc_invalidate(struct cache_head *h, | ||
| 259 | struct cache_detail *detail) | ||
| 260 | { | ||
| 261 | h->expiry_time = seconds_since_boot() - 1; | ||
| 262 | detail->nextcheck = seconds_since_boot(); | ||
| 263 | } | ||
| 231 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ | 264 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 569dc722a600..a5a55f284b7d 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -30,7 +30,7 @@ struct rpc_inode; | |||
| 30 | * The high-level client handle | 30 | * The high-level client handle |
| 31 | */ | 31 | */ |
| 32 | struct rpc_clnt { | 32 | struct rpc_clnt { |
| 33 | struct kref cl_kref; /* Number of references */ | 33 | atomic_t cl_count; /* Number of references */ |
| 34 | struct list_head cl_clients; /* Global list of clients */ | 34 | struct list_head cl_clients; /* Global list of clients */ |
| 35 | struct list_head cl_tasks; /* List of tasks */ | 35 | struct list_head cl_tasks; /* List of tasks */ |
| 36 | spinlock_t cl_lock; /* spinlock */ | 36 | spinlock_t cl_lock; /* spinlock */ |
| @@ -102,6 +102,7 @@ struct rpc_procinfo { | |||
| 102 | #ifdef __KERNEL__ | 102 | #ifdef __KERNEL__ |
| 103 | 103 | ||
| 104 | struct rpc_create_args { | 104 | struct rpc_create_args { |
| 105 | struct net *net; | ||
| 105 | int protocol; | 106 | int protocol; |
| 106 | struct sockaddr *address; | 107 | struct sockaddr *address; |
| 107 | size_t addrsize; | 108 | size_t addrsize; |
| @@ -137,7 +138,6 @@ int rpcb_register(u32, u32, int, unsigned short); | |||
| 137 | int rpcb_v4_register(const u32 program, const u32 version, | 138 | int rpcb_v4_register(const u32 program, const u32 version, |
| 138 | const struct sockaddr *address, | 139 | const struct sockaddr *address, |
| 139 | const char *netid); | 140 | const char *netid); |
| 140 | int rpcb_getport_sync(struct sockaddr_in *, u32, u32, int); | ||
| 141 | void rpcb_getport_async(struct rpc_task *); | 141 | void rpcb_getport_async(struct rpc_task *); |
| 142 | 142 | ||
| 143 | void rpc_call_start(struct rpc_task *); | 143 | void rpc_call_start(struct rpc_task *); |
diff --git a/include/linux/sunrpc/gss_spkm3.h b/include/linux/sunrpc/gss_spkm3.h deleted file mode 100644 index e3e6a3437f8b..000000000000 --- a/include/linux/sunrpc/gss_spkm3.h +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/linux/sunrpc/gss_spkm3.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2000 The Regents of the University of Michigan. | ||
| 5 | * All rights reserved. | ||
| 6 | * | ||
| 7 | * Andy Adamson <andros@umich.edu> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/sunrpc/auth_gss.h> | ||
| 11 | #include <linux/sunrpc/gss_err.h> | ||
| 12 | #include <linux/sunrpc/gss_asn1.h> | ||
| 13 | |||
| 14 | struct spkm3_ctx { | ||
| 15 | struct xdr_netobj ctx_id; /* per message context id */ | ||
| 16 | int endtime; /* endtime of the context */ | ||
| 17 | struct xdr_netobj mech_used; | ||
| 18 | unsigned int ret_flags ; | ||
| 19 | struct xdr_netobj conf_alg; | ||
| 20 | struct xdr_netobj derived_conf_key; | ||
| 21 | struct xdr_netobj intg_alg; | ||
| 22 | struct xdr_netobj derived_integ_key; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* OIDs declarations for K-ALG, I-ALG, C-ALG, and OWF-ALG */ | ||
| 26 | extern const struct xdr_netobj hmac_md5_oid; | ||
| 27 | extern const struct xdr_netobj cast5_cbc_oid; | ||
| 28 | |||
| 29 | /* SPKM InnerContext Token types */ | ||
| 30 | |||
| 31 | #define SPKM_ERROR_TOK 3 | ||
| 32 | #define SPKM_MIC_TOK 4 | ||
| 33 | #define SPKM_WRAP_TOK 5 | ||
| 34 | #define SPKM_DEL_TOK 6 | ||
| 35 | |||
| 36 | u32 spkm3_make_token(struct spkm3_ctx *ctx, struct xdr_buf * text, struct xdr_netobj * token, int toktype); | ||
| 37 | |||
| 38 | u32 spkm3_read_token(struct spkm3_ctx *ctx, struct xdr_netobj *read_token, struct xdr_buf *message_buffer, int toktype); | ||
| 39 | |||
| 40 | #define CKSUMTYPE_RSA_MD5 0x0007 | ||
| 41 | #define CKSUMTYPE_HMAC_MD5 0x0008 | ||
| 42 | |||
| 43 | s32 make_spkm3_checksum(s32 cksumtype, struct xdr_netobj *key, char *header, | ||
| 44 | unsigned int hdrlen, struct xdr_buf *body, | ||
| 45 | unsigned int body_offset, struct xdr_netobj *cksum); | ||
| 46 | void asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits); | ||
| 47 | int decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, | ||
| 48 | int explen); | ||
| 49 | void spkm3_mic_header(unsigned char **hdrbuf, unsigned int *hdrlen, | ||
| 50 | unsigned char *ctxhdr, int elen, int zbit); | ||
| 51 | void spkm3_make_mic_token(unsigned char **tokp, int toklen, | ||
| 52 | struct xdr_netobj *mic_hdr, | ||
| 53 | struct xdr_netobj *md5cksum, int md5elen, int md5zbit); | ||
| 54 | u32 spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, | ||
| 55 | unsigned char **cksum); | ||
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 5fa0f2084307..680471d1f28a 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h | |||
| @@ -38,8 +38,21 @@ struct svc_stat { | |||
| 38 | rpcbadclnt; | 38 | rpcbadclnt; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | void rpc_proc_init(void); | 41 | struct net; |
| 42 | void rpc_proc_exit(void); | 42 | #ifdef CONFIG_PROC_FS |
| 43 | int rpc_proc_init(struct net *); | ||
| 44 | void rpc_proc_exit(struct net *); | ||
| 45 | #else | ||
| 46 | static inline int rpc_proc_init(struct net *net) | ||
| 47 | { | ||
| 48 | return 0; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline void rpc_proc_exit(struct net *net) | ||
| 52 | { | ||
| 53 | } | ||
| 54 | #endif | ||
| 55 | |||
| 43 | #ifdef MODULE | 56 | #ifdef MODULE |
| 44 | void rpc_modcount(struct inode *, int); | 57 | void rpc_modcount(struct inode *, int); |
| 45 | #endif | 58 | #endif |
| @@ -54,9 +67,6 @@ void svc_proc_unregister(const char *); | |||
| 54 | 67 | ||
| 55 | void svc_seq_show(struct seq_file *, | 68 | void svc_seq_show(struct seq_file *, |
| 56 | const struct svc_stat *); | 69 | const struct svc_stat *); |
| 57 | |||
| 58 | extern struct proc_dir_entry *proc_net_rpc; | ||
| 59 | |||
| 60 | #else | 70 | #else |
| 61 | 71 | ||
| 62 | static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; } | 72 | static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; } |
| @@ -69,9 +79,6 @@ static inline void svc_proc_unregister(const char *p) {} | |||
| 69 | 79 | ||
| 70 | static inline void svc_seq_show(struct seq_file *seq, | 80 | static inline void svc_seq_show(struct seq_file *seq, |
| 71 | const struct svc_stat *st) {} | 81 | const struct svc_stat *st) {} |
| 72 | |||
| 73 | #define proc_net_rpc NULL | ||
| 74 | |||
| 75 | #endif | 82 | #endif |
| 76 | 83 | ||
| 77 | #endif /* _LINUX_SUNRPC_STATS_H */ | 84 | #endif /* _LINUX_SUNRPC_STATS_H */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 5f4e18b3ce73..bbdb680ffbe9 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | struct svc_xprt_ops { | 13 | struct svc_xprt_ops { |
| 14 | struct svc_xprt *(*xpo_create)(struct svc_serv *, | 14 | struct svc_xprt *(*xpo_create)(struct svc_serv *, |
| 15 | struct net *net, | ||
| 15 | struct sockaddr *, int, | 16 | struct sockaddr *, int, |
| 16 | int); | 17 | int); |
| 17 | struct svc_xprt *(*xpo_accept)(struct svc_xprt *); | 18 | struct svc_xprt *(*xpo_accept)(struct svc_xprt *); |
| @@ -32,6 +33,16 @@ struct svc_xprt_class { | |||
| 32 | u32 xcl_max_payload; | 33 | u32 xcl_max_payload; |
| 33 | }; | 34 | }; |
| 34 | 35 | ||
| 36 | /* | ||
| 37 | * This is embedded in an object that wants a callback before deleting | ||
| 38 | * an xprt; intended for use by NFSv4.1, which needs to know when a | ||
| 39 | * client's tcp connection (and hence possibly a backchannel) goes away. | ||
| 40 | */ | ||
| 41 | struct svc_xpt_user { | ||
| 42 | struct list_head list; | ||
| 43 | void (*callback)(struct svc_xpt_user *); | ||
| 44 | }; | ||
| 45 | |||
| 35 | struct svc_xprt { | 46 | struct svc_xprt { |
| 36 | struct svc_xprt_class *xpt_class; | 47 | struct svc_xprt_class *xpt_class; |
| 37 | struct svc_xprt_ops *xpt_ops; | 48 | struct svc_xprt_ops *xpt_ops; |
| @@ -66,14 +77,31 @@ struct svc_xprt { | |||
| 66 | struct sockaddr_storage xpt_remote; /* remote peer's address */ | 77 | struct sockaddr_storage xpt_remote; /* remote peer's address */ |
| 67 | size_t xpt_remotelen; /* length of address */ | 78 | size_t xpt_remotelen; /* length of address */ |
| 68 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
| 80 | struct list_head xpt_users; /* callbacks on free */ | ||
| 81 | |||
| 82 | struct net *xpt_net; | ||
| 69 | }; | 83 | }; |
| 70 | 84 | ||
| 85 | static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | ||
| 86 | { | ||
| 87 | spin_lock(&xpt->xpt_lock); | ||
| 88 | list_add(&u->list, &xpt->xpt_users); | ||
| 89 | spin_unlock(&xpt->xpt_lock); | ||
| 90 | } | ||
| 91 | |||
| 92 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | ||
| 93 | { | ||
| 94 | spin_lock(&xpt->xpt_lock); | ||
| 95 | list_del_init(&u->list); | ||
| 96 | spin_unlock(&xpt->xpt_lock); | ||
| 97 | } | ||
| 98 | |||
| 71 | int svc_reg_xprt_class(struct svc_xprt_class *); | 99 | int svc_reg_xprt_class(struct svc_xprt_class *); |
| 72 | void svc_unreg_xprt_class(struct svc_xprt_class *); | 100 | void svc_unreg_xprt_class(struct svc_xprt_class *); |
| 73 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, | 101 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, |
| 74 | struct svc_serv *); | 102 | struct svc_serv *); |
| 75 | int svc_create_xprt(struct svc_serv *, const char *, const int, | 103 | int svc_create_xprt(struct svc_serv *, const char *, struct net *, |
| 76 | const unsigned short, int); | 104 | const int, const unsigned short, int); |
| 77 | void svc_xprt_enqueue(struct svc_xprt *xprt); | 105 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
| 78 | void svc_xprt_received(struct svc_xprt *); | 106 | void svc_xprt_received(struct svc_xprt *); |
| 79 | void svc_xprt_put(struct svc_xprt *xprt); | 107 | void svc_xprt_put(struct svc_xprt *xprt); |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index d39dbdc7b10f..25d333c1b571 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -108,10 +108,15 @@ struct auth_ops { | |||
| 108 | #define SVC_NEGATIVE 4 | 108 | #define SVC_NEGATIVE 4 |
| 109 | #define SVC_OK 5 | 109 | #define SVC_OK 5 |
| 110 | #define SVC_DROP 6 | 110 | #define SVC_DROP 6 |
| 111 | #define SVC_DENIED 7 | 111 | #define SVC_CLOSE 7 /* Like SVC_DROP, but request is definitely |
| 112 | #define SVC_PENDING 8 | 112 | * lost so if there is a tcp connection, it |
| 113 | #define SVC_COMPLETE 9 | 113 | * should be closed |
| 114 | */ | ||
| 115 | #define SVC_DENIED 8 | ||
| 116 | #define SVC_PENDING 9 | ||
| 117 | #define SVC_COMPLETE 10 | ||
| 114 | 118 | ||
| 119 | struct svc_xprt; | ||
| 115 | 120 | ||
| 116 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); | 121 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); |
| 117 | extern int svc_authorise(struct svc_rqst *rqstp); | 122 | extern int svc_authorise(struct svc_rqst *rqstp); |
| @@ -121,13 +126,13 @@ extern void svc_auth_unregister(rpc_authflavor_t flavor); | |||
| 121 | 126 | ||
| 122 | extern struct auth_domain *unix_domain_find(char *name); | 127 | extern struct auth_domain *unix_domain_find(char *name); |
| 123 | extern void auth_domain_put(struct auth_domain *item); | 128 | extern void auth_domain_put(struct auth_domain *item); |
| 124 | extern int auth_unix_add_addr(struct in6_addr *addr, struct auth_domain *dom); | 129 | extern int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom); |
| 125 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); | 130 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); |
| 126 | extern struct auth_domain *auth_domain_find(char *name); | 131 | extern struct auth_domain *auth_domain_find(char *name); |
| 127 | extern struct auth_domain *auth_unix_lookup(struct in6_addr *addr); | 132 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); |
| 128 | extern int auth_unix_forget_old(struct auth_domain *dom); | 133 | extern int auth_unix_forget_old(struct auth_domain *dom); |
| 129 | extern void svcauth_unix_purge(void); | 134 | extern void svcauth_unix_purge(void); |
| 130 | extern void svcauth_unix_info_release(void *); | 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
| 131 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
| 132 | 137 | ||
| 133 | static inline unsigned long hash_str(char *name, int bits) | 138 | static inline unsigned long hash_str(char *name, int bits) |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 35cf2e8cd7c6..498ab93a81e4 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -108,6 +108,7 @@ void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, | |||
| 108 | unsigned int); | 108 | unsigned int); |
| 109 | void xdr_inline_pages(struct xdr_buf *, unsigned int, | 109 | void xdr_inline_pages(struct xdr_buf *, unsigned int, |
| 110 | struct page **, unsigned int, unsigned int); | 110 | struct page **, unsigned int, unsigned int); |
| 111 | void xdr_terminate_string(struct xdr_buf *, const u32); | ||
| 111 | 112 | ||
| 112 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) | 113 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) |
| 113 | { | 114 | { |
| @@ -131,6 +132,13 @@ xdr_decode_hyper(__be32 *p, __u64 *valp) | |||
| 131 | return p + 2; | 132 | return p + 2; |
| 132 | } | 133 | } |
| 133 | 134 | ||
| 135 | static inline __be32 * | ||
| 136 | xdr_decode_opaque_fixed(__be32 *p, void *ptr, unsigned int len) | ||
| 137 | { | ||
| 138 | memcpy(ptr, p, len); | ||
| 139 | return p + XDR_QUADLEN(len); | ||
| 140 | } | ||
| 141 | |||
| 134 | /* | 142 | /* |
| 135 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) | 143 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) |
| 136 | */ | 144 | */ |
| @@ -200,6 +208,7 @@ extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | |||
| 200 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
| 201 | unsigned int base, unsigned int len); | 209 | unsigned int base, unsigned int len); |
| 202 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
| 211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | ||
| 203 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
| 204 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
| 205 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index ff5a77b28c50..89d10d279a20 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -224,6 +224,7 @@ struct rpc_xprt { | |||
| 224 | bklog_u; /* backlog queue utilization */ | 224 | bklog_u; /* backlog queue utilization */ |
| 225 | } stat; | 225 | } stat; |
| 226 | 226 | ||
| 227 | struct net *xprt_net; | ||
| 227 | const char *address_strings[RPC_DISPLAY_MAX]; | 228 | const char *address_strings[RPC_DISPLAY_MAX]; |
| 228 | }; | 229 | }; |
| 229 | 230 | ||
| @@ -249,6 +250,7 @@ static inline int bc_prealloc(struct rpc_rqst *req) | |||
| 249 | 250 | ||
| 250 | struct xprt_create { | 251 | struct xprt_create { |
| 251 | int ident; /* XPRT_TRANSPORT identifier */ | 252 | int ident; /* XPRT_TRANSPORT identifier */ |
| 253 | struct net * net; | ||
| 252 | struct sockaddr * srcaddr; /* optional local address */ | 254 | struct sockaddr * srcaddr; /* optional local address */ |
| 253 | struct sockaddr * dstaddr; /* remote peer address */ | 255 | struct sockaddr * dstaddr; /* remote peer address */ |
| 254 | size_t addrlen; | 256 | size_t addrlen; |
| @@ -280,6 +282,8 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | |||
| 280 | void xprt_release(struct rpc_task *task); | 282 | void xprt_release(struct rpc_task *task); |
| 281 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | 283 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
| 282 | void xprt_put(struct rpc_xprt *xprt); | 284 | void xprt_put(struct rpc_xprt *xprt); |
| 285 | struct rpc_xprt * xprt_alloc(struct net *net, int size, int max_req); | ||
| 286 | void xprt_free(struct rpc_xprt *); | ||
| 283 | 287 | ||
| 284 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 288 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
| 285 | { | 289 | { |
