.. | .. |
---|
10 | 10 | #define NFSCACHE_H |
---|
11 | 11 | |
---|
12 | 12 | #include <linux/sunrpc/svc.h> |
---|
| 13 | +#include "netns.h" |
---|
13 | 14 | |
---|
14 | 15 | /* |
---|
15 | 16 | * Representation of a reply cache entry. |
---|
.. | .. |
---|
19 | 20 | * is much larger than a sockaddr_in6. |
---|
20 | 21 | */ |
---|
21 | 22 | struct svc_cacherep { |
---|
22 | | - struct list_head c_lru; |
---|
| 23 | + struct { |
---|
| 24 | + /* Keep often-read xid, csum in the same cache line: */ |
---|
| 25 | + __be32 k_xid; |
---|
| 26 | + __wsum k_csum; |
---|
| 27 | + u32 k_proc; |
---|
| 28 | + u32 k_prot; |
---|
| 29 | + u32 k_vers; |
---|
| 30 | + unsigned int k_len; |
---|
| 31 | + struct sockaddr_in6 k_addr; |
---|
| 32 | + } c_key; |
---|
23 | 33 | |
---|
| 34 | + struct rb_node c_node; |
---|
| 35 | + struct list_head c_lru; |
---|
24 | 36 | unsigned char c_state, /* unused, inprog, done */ |
---|
25 | 37 | c_type, /* status, buffer */ |
---|
26 | 38 | c_secure : 1; /* req came from port < 1024 */ |
---|
27 | | - struct sockaddr_in6 c_addr; |
---|
28 | | - __be32 c_xid; |
---|
29 | | - u32 c_prot; |
---|
30 | | - u32 c_proc; |
---|
31 | | - u32 c_vers; |
---|
32 | | - unsigned int c_len; |
---|
33 | | - __wsum c_csum; |
---|
34 | 39 | unsigned long c_timestamp; |
---|
35 | 40 | union { |
---|
36 | 41 | struct kvec u_vec; |
---|
.. | .. |
---|
73 | 78 | /* Checksum this amount of the request */ |
---|
74 | 79 | #define RC_CSUMLEN (256U) |
---|
75 | 80 | |
---|
76 | | -int nfsd_reply_cache_init(void); |
---|
77 | | -void nfsd_reply_cache_shutdown(void); |
---|
| 81 | +int nfsd_drc_slab_create(void); |
---|
| 82 | +void nfsd_drc_slab_free(void); |
---|
| 83 | +int nfsd_reply_cache_init(struct nfsd_net *); |
---|
| 84 | +void nfsd_reply_cache_shutdown(struct nfsd_net *); |
---|
78 | 85 | int nfsd_cache_lookup(struct svc_rqst *); |
---|
79 | 86 | void nfsd_cache_update(struct svc_rqst *, int, __be32 *); |
---|
80 | 87 | int nfsd_reply_cache_stats_open(struct inode *, struct file *); |
---|