diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2014-12-09 11:12:26 -0500 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2014-12-09 11:12:26 -0500 |
| commit | 2941b0e91ba68b1f77140e556307e00616a5bb46 (patch) | |
| tree | 01950b6ed12d06ebe4c39d1a2122050a9a570e93 /include/linux | |
| parent | 818f2f57f20d0e9a9294180f304f34cd4e8f6066 (diff) | |
| parent | 388f0c776781fe64ce951701bfe712b2182a31f2 (diff) | |
Merge tag 'nfs-for-3.19-1' into nfsd for-3.19 branch
Mainly what I need is 860a0d9e511f "sunrpc: add some tracepoints in
svc_rqst handling functions", which subsequent server rpc patches from
jlayton depend on. I'm merging this later tag on the assumption that's
more likely to be a tested and stable point.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bitops.h | 7 | ||||
| -rw-r--r-- | include/linux/can/dev.h | 6 | ||||
| -rw-r--r-- | include/linux/inetdevice.h | 2 | ||||
| -rw-r--r-- | include/linux/kernel_stat.h | 5 | ||||
| -rw-r--r-- | include/linux/lockd/debug.h | 6 | ||||
| -rw-r--r-- | include/linux/nfs4.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 4 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 14 | ||||
| -rw-r--r-- | include/linux/percpu-refcount.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/auth.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/debug.h | 64 | ||||
| -rw-r--r-- | include/linux/sunrpc/metrics.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprtsock.h | 59 |
17 files changed, 163 insertions, 36 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index be5fd38bd5a0..5d858e02997f 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -18,8 +18,11 @@ | |||
| 18 | * position @h. For example | 18 | * position @h. For example |
| 19 | * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. | 19 | * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. |
| 20 | */ | 20 | */ |
| 21 | #define GENMASK(h, l) (((U32_C(1) << ((h) - (l) + 1)) - 1) << (l)) | 21 | #define GENMASK(h, l) \ |
| 22 | #define GENMASK_ULL(h, l) (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l)) | 22 | (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) |
| 23 | |||
| 24 | #define GENMASK_ULL(h, l) \ | ||
| 25 | (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) | ||
| 23 | 26 | ||
| 24 | extern unsigned int __sw_hweight8(unsigned int w); | 27 | extern unsigned int __sw_hweight8(unsigned int w); |
| 25 | extern unsigned int __sw_hweight16(unsigned int w); | 28 | extern unsigned int __sw_hweight16(unsigned int w); |
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 6992afc6ba7f..b37ea95bc348 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -99,6 +99,12 @@ inval_skb: | |||
| 99 | return 1; | 99 | return 1; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline bool can_is_canfd_skb(const struct sk_buff *skb) | ||
| 103 | { | ||
| 104 | /* the CAN specific type of skb is identified by its data length */ | ||
| 105 | return skb->len == CANFD_MTU; | ||
| 106 | } | ||
| 107 | |||
| 102 | /* get data length from can_dlc with sanitized can_dlc */ | 108 | /* get data length from can_dlc with sanitized can_dlc */ |
| 103 | u8 can_dlc2len(u8 can_dlc); | 109 | u8 can_dlc2len(u8 can_dlc); |
| 104 | 110 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 0068708161ff..0a21fbefdfbe 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -242,7 +242,7 @@ static inline void in_dev_put(struct in_device *idev) | |||
| 242 | static __inline__ __be32 inet_make_mask(int logmask) | 242 | static __inline__ __be32 inet_make_mask(int logmask) |
| 243 | { | 243 | { |
| 244 | if (logmask) | 244 | if (logmask) |
| 245 | return htonl(~((1<<(32-logmask))-1)); | 245 | return htonl(~((1U<<(32-logmask))-1)); |
| 246 | return 0; | 246 | return 0; |
| 247 | } | 247 | } |
| 248 | 248 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 8422b4ed6882..b9376cd5a187 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -77,11 +77,6 @@ static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu) | |||
| 77 | return kstat_cpu(cpu).irqs_sum; | 77 | return kstat_cpu(cpu).irqs_sum; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /* | ||
| 81 | * Lock/unlock the current runqueue - to extract task statistics: | ||
| 82 | */ | ||
| 83 | extern unsigned long long task_delta_exec(struct task_struct *); | ||
| 84 | |||
| 85 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); | 80 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); |
| 86 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); | 81 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); |
| 87 | extern void account_steal_time(cputime_t); | 82 | extern void account_steal_time(cputime_t); |
diff --git a/include/linux/lockd/debug.h b/include/linux/lockd/debug.h index 257d3779f2ab..0ca8109934e4 100644 --- a/include/linux/lockd/debug.h +++ b/include/linux/lockd/debug.h | |||
| @@ -17,12 +17,8 @@ | |||
| 17 | * Enable lockd debugging. | 17 | * Enable lockd debugging. |
| 18 | * Requires RPC_DEBUG. | 18 | * Requires RPC_DEBUG. |
| 19 | */ | 19 | */ |
| 20 | #ifdef RPC_DEBUG | ||
| 21 | # define LOCKD_DEBUG 1 | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #undef ifdebug | 20 | #undef ifdebug |
| 25 | #if defined(RPC_DEBUG) && defined(LOCKD_DEBUG) | 21 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 26 | # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag)) | 22 | # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag)) |
| 27 | #else | 23 | #else |
| 28 | # define ifdebug(flag) if (0) | 24 | # define ifdebug(flag) if (0) |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 356acc2846fd..022b761dbf0a 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -490,6 +490,8 @@ enum { | |||
| 490 | 490 | ||
| 491 | /* nfs42 */ | 491 | /* nfs42 */ |
| 492 | NFSPROC4_CLNT_SEEK, | 492 | NFSPROC4_CLNT_SEEK, |
| 493 | NFSPROC4_CLNT_ALLOCATE, | ||
| 494 | NFSPROC4_CLNT_DEALLOCATE, | ||
| 493 | }; | 495 | }; |
| 494 | 496 | ||
| 495 | /* nfs41 types */ | 497 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c72d1ad41ad4..6d627b92df53 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -163,7 +163,7 @@ struct nfs_inode { | |||
| 163 | */ | 163 | */ |
| 164 | __be32 cookieverf[2]; | 164 | __be32 cookieverf[2]; |
| 165 | 165 | ||
| 166 | unsigned long npages; | 166 | unsigned long nrequests; |
| 167 | struct nfs_mds_commit_info commit_info; | 167 | struct nfs_mds_commit_info commit_info; |
| 168 | 168 | ||
| 169 | /* Open contexts for shared mmap writes */ | 169 | /* Open contexts for shared mmap writes */ |
| @@ -520,7 +520,7 @@ extern void nfs_commit_free(struct nfs_commit_data *data); | |||
| 520 | static inline int | 520 | static inline int |
| 521 | nfs_have_writebacks(struct inode *inode) | 521 | nfs_have_writebacks(struct inode *inode) |
| 522 | { | 522 | { |
| 523 | return NFS_I(inode)->npages != 0; | 523 | return NFS_I(inode)->nrequests != 0; |
| 524 | } | 524 | } |
| 525 | 525 | ||
| 526 | /* | 526 | /* |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index a32ba0d7a98f..1e37fbb78f7a 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -231,5 +231,7 @@ struct nfs_server { | |||
| 231 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) | 231 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) |
| 232 | #define NFS_CAP_SECURITY_LABEL (1U << 18) | 232 | #define NFS_CAP_SECURITY_LABEL (1U << 18) |
| 233 | #define NFS_CAP_SEEK (1U << 19) | 233 | #define NFS_CAP_SEEK (1U << 19) |
| 234 | #define NFS_CAP_ALLOCATE (1U << 20) | ||
| 235 | #define NFS_CAP_DEALLOCATE (1U << 21) | ||
| 234 | 236 | ||
| 235 | #endif | 237 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 47ebb4fafd87..467c84efb596 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1243,6 +1243,20 @@ nfs_free_pnfs_ds_cinfo(struct pnfs_ds_commit_info *cinfo) | |||
| 1243 | #endif /* CONFIG_NFS_V4_1 */ | 1243 | #endif /* CONFIG_NFS_V4_1 */ |
| 1244 | 1244 | ||
| 1245 | #ifdef CONFIG_NFS_V4_2 | 1245 | #ifdef CONFIG_NFS_V4_2 |
| 1246 | struct nfs42_falloc_args { | ||
| 1247 | struct nfs4_sequence_args seq_args; | ||
| 1248 | |||
| 1249 | struct nfs_fh *falloc_fh; | ||
| 1250 | nfs4_stateid falloc_stateid; | ||
| 1251 | u64 falloc_offset; | ||
| 1252 | u64 falloc_length; | ||
| 1253 | }; | ||
| 1254 | |||
| 1255 | struct nfs42_falloc_res { | ||
| 1256 | struct nfs4_sequence_res seq_res; | ||
| 1257 | unsigned int status; | ||
| 1258 | }; | ||
| 1259 | |||
| 1246 | struct nfs42_seek_args { | 1260 | struct nfs42_seek_args { |
| 1247 | struct nfs4_sequence_args seq_args; | 1261 | struct nfs4_sequence_args seq_args; |
| 1248 | 1262 | ||
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index d5c89e0dd0e6..51ce60c35f4c 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
| @@ -133,7 +133,13 @@ static inline bool __ref_is_percpu(struct percpu_ref *ref, | |||
| 133 | /* paired with smp_store_release() in percpu_ref_reinit() */ | 133 | /* paired with smp_store_release() in percpu_ref_reinit() */ |
| 134 | smp_read_barrier_depends(); | 134 | smp_read_barrier_depends(); |
| 135 | 135 | ||
| 136 | if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC)) | 136 | /* |
| 137 | * Theoretically, the following could test just ATOMIC; however, | ||
| 138 | * then we'd have to mask off DEAD separately as DEAD may be | ||
| 139 | * visible without ATOMIC if we race with percpu_ref_kill(). DEAD | ||
| 140 | * implies ATOMIC anyway. Test them together. | ||
| 141 | */ | ||
| 142 | if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC_DEAD)) | ||
| 137 | return false; | 143 | return false; |
| 138 | 144 | ||
| 139 | *percpu_countp = (unsigned long __percpu *)percpu_ptr; | 145 | *percpu_countp = (unsigned long __percpu *)percpu_ptr; |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 8e030075fe79..a7cbb570cc5c 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -53,7 +53,7 @@ struct rpc_cred { | |||
| 53 | struct rcu_head cr_rcu; | 53 | struct rcu_head cr_rcu; |
| 54 | struct rpc_auth * cr_auth; | 54 | struct rpc_auth * cr_auth; |
| 55 | const struct rpc_credops *cr_ops; | 55 | const struct rpc_credops *cr_ops; |
| 56 | #ifdef RPC_DEBUG | 56 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 57 | unsigned long cr_magic; /* 0x0f4aa4f0 */ | 57 | unsigned long cr_magic; /* 0x0f4aa4f0 */ |
| 58 | #endif | 58 | #endif |
| 59 | unsigned long cr_expire; /* when to gc */ | 59 | unsigned long cr_expire; /* when to gc */ |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 70736b98c721..d86acc63b25f 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -63,6 +63,9 @@ struct rpc_clnt { | |||
| 63 | struct rpc_rtt cl_rtt_default; | 63 | struct rpc_rtt cl_rtt_default; |
| 64 | struct rpc_timeout cl_timeout_default; | 64 | struct rpc_timeout cl_timeout_default; |
| 65 | const struct rpc_program *cl_program; | 65 | const struct rpc_program *cl_program; |
| 66 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
| 67 | struct dentry *cl_debugfs; /* debugfs directory */ | ||
| 68 | #endif | ||
| 66 | }; | 69 | }; |
| 67 | 70 | ||
| 68 | /* | 71 | /* |
| @@ -176,5 +179,6 @@ size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | |||
| 176 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 179 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
| 177 | int rpc_localaddr(struct rpc_clnt *, struct sockaddr *, size_t); | 180 | int rpc_localaddr(struct rpc_clnt *, struct sockaddr *, size_t); |
| 178 | 181 | ||
| 182 | const char *rpc_proc_name(const struct rpc_task *task); | ||
| 179 | #endif /* __KERNEL__ */ | 183 | #endif /* __KERNEL__ */ |
| 180 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 184 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 9385bd74c860..c57d8ea0716c 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
| @@ -10,22 +10,10 @@ | |||
| 10 | 10 | ||
| 11 | #include <uapi/linux/sunrpc/debug.h> | 11 | #include <uapi/linux/sunrpc/debug.h> |
| 12 | 12 | ||
| 13 | |||
| 14 | /* | ||
| 15 | * Enable RPC debugging/profiling. | ||
| 16 | */ | ||
| 17 | #ifdef CONFIG_SUNRPC_DEBUG | ||
| 18 | #define RPC_DEBUG | ||
| 19 | #endif | ||
| 20 | #ifdef CONFIG_TRACEPOINTS | ||
| 21 | #define RPC_TRACEPOINTS | ||
| 22 | #endif | ||
| 23 | /* #define RPC_PROFILE */ | ||
| 24 | |||
| 25 | /* | 13 | /* |
| 26 | * Debugging macros etc | 14 | * Debugging macros etc |
| 27 | */ | 15 | */ |
| 28 | #ifdef RPC_DEBUG | 16 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 29 | extern unsigned int rpc_debug; | 17 | extern unsigned int rpc_debug; |
| 30 | extern unsigned int nfs_debug; | 18 | extern unsigned int nfs_debug; |
| 31 | extern unsigned int nfsd_debug; | 19 | extern unsigned int nfsd_debug; |
| @@ -36,7 +24,7 @@ extern unsigned int nlm_debug; | |||
| 36 | #define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args) | 24 | #define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args) |
| 37 | 25 | ||
| 38 | #undef ifdebug | 26 | #undef ifdebug |
| 39 | #ifdef RPC_DEBUG | 27 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 40 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) | 28 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) |
| 41 | 29 | ||
| 42 | # define dfprintk(fac, args...) \ | 30 | # define dfprintk(fac, args...) \ |
| @@ -65,9 +53,55 @@ extern unsigned int nlm_debug; | |||
| 65 | /* | 53 | /* |
| 66 | * Sysctl interface for RPC debugging | 54 | * Sysctl interface for RPC debugging |
| 67 | */ | 55 | */ |
| 68 | #ifdef RPC_DEBUG | 56 | |
| 57 | struct rpc_clnt; | ||
| 58 | struct rpc_xprt; | ||
| 59 | |||
| 60 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
| 69 | void rpc_register_sysctl(void); | 61 | void rpc_register_sysctl(void); |
| 70 | void rpc_unregister_sysctl(void); | 62 | void rpc_unregister_sysctl(void); |
| 63 | int sunrpc_debugfs_init(void); | ||
| 64 | void sunrpc_debugfs_exit(void); | ||
| 65 | int rpc_clnt_debugfs_register(struct rpc_clnt *); | ||
| 66 | void rpc_clnt_debugfs_unregister(struct rpc_clnt *); | ||
| 67 | int rpc_xprt_debugfs_register(struct rpc_xprt *); | ||
| 68 | void rpc_xprt_debugfs_unregister(struct rpc_xprt *); | ||
| 69 | #else | ||
| 70 | static inline int | ||
| 71 | sunrpc_debugfs_init(void) | ||
| 72 | { | ||
| 73 | return 0; | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline void | ||
| 77 | sunrpc_debugfs_exit(void) | ||
| 78 | { | ||
| 79 | return; | ||
| 80 | } | ||
| 81 | |||
| 82 | static inline int | ||
| 83 | rpc_clnt_debugfs_register(struct rpc_clnt *clnt) | ||
| 84 | { | ||
| 85 | return 0; | ||
| 86 | } | ||
| 87 | |||
| 88 | static inline void | ||
| 89 | rpc_clnt_debugfs_unregister(struct rpc_clnt *clnt) | ||
| 90 | { | ||
| 91 | return; | ||
| 92 | } | ||
| 93 | |||
| 94 | static inline int | ||
| 95 | rpc_xprt_debugfs_register(struct rpc_xprt *xprt) | ||
| 96 | { | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | |||
| 100 | static inline void | ||
| 101 | rpc_xprt_debugfs_unregister(struct rpc_xprt *xprt) | ||
| 102 | { | ||
| 103 | return; | ||
| 104 | } | ||
| 71 | #endif | 105 | #endif |
| 72 | 106 | ||
| 73 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ | 107 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ |
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index 1565bbe86d51..eecb5a71e6c0 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
| @@ -27,10 +27,13 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
| 29 | #include <linux/ktime.h> | 29 | #include <linux/ktime.h> |
| 30 | #include <linux/spinlock.h> | ||
| 30 | 31 | ||
| 31 | #define RPC_IOSTATS_VERS "1.0" | 32 | #define RPC_IOSTATS_VERS "1.0" |
| 32 | 33 | ||
| 33 | struct rpc_iostats { | 34 | struct rpc_iostats { |
| 35 | spinlock_t om_lock; | ||
| 36 | |||
| 34 | /* | 37 | /* |
| 35 | * These counters give an idea about how many request | 38 | * These counters give an idea about how many request |
| 36 | * transmissions are required, on average, to complete that | 39 | * transmissions are required, on average, to complete that |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 1a8959944c5f..5f1e6bd4c316 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -79,7 +79,7 @@ struct rpc_task { | |||
| 79 | unsigned short tk_flags; /* misc flags */ | 79 | unsigned short tk_flags; /* misc flags */ |
| 80 | unsigned short tk_timeouts; /* maj timeouts */ | 80 | unsigned short tk_timeouts; /* maj timeouts */ |
| 81 | 81 | ||
| 82 | #if defined(RPC_DEBUG) || defined(RPC_TRACEPOINTS) | 82 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS) |
| 83 | unsigned short tk_pid; /* debugging aid */ | 83 | unsigned short tk_pid; /* debugging aid */ |
| 84 | #endif | 84 | #endif |
| 85 | unsigned char tk_priority : 2,/* Task priority */ | 85 | unsigned char tk_priority : 2,/* Task priority */ |
| @@ -187,7 +187,7 @@ struct rpc_wait_queue { | |||
| 187 | unsigned char nr; /* # tasks remaining for cookie */ | 187 | unsigned char nr; /* # tasks remaining for cookie */ |
| 188 | unsigned short qlen; /* total # tasks waiting in queue */ | 188 | unsigned short qlen; /* total # tasks waiting in queue */ |
| 189 | struct rpc_timer timer_list; | 189 | struct rpc_timer timer_list; |
| 190 | #if defined(RPC_DEBUG) || defined(RPC_TRACEPOINTS) | 190 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS) |
| 191 | const char * name; | 191 | const char * name; |
| 192 | #endif | 192 | #endif |
| 193 | }; | 193 | }; |
| @@ -237,7 +237,7 @@ void rpc_free(void *); | |||
| 237 | int rpciod_up(void); | 237 | int rpciod_up(void); |
| 238 | void rpciod_down(void); | 238 | void rpciod_down(void); |
| 239 | int __rpc_wait_for_completion_task(struct rpc_task *task, wait_bit_action_f *); | 239 | int __rpc_wait_for_completion_task(struct rpc_task *task, wait_bit_action_f *); |
| 240 | #ifdef RPC_DEBUG | 240 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
| 241 | struct net; | 241 | struct net; |
| 242 | void rpc_show_tasks(struct net *); | 242 | void rpc_show_tasks(struct net *); |
| 243 | #endif | 243 | #endif |
| @@ -251,7 +251,7 @@ static inline int rpc_wait_for_completion_task(struct rpc_task *task) | |||
| 251 | return __rpc_wait_for_completion_task(task, NULL); | 251 | return __rpc_wait_for_completion_task(task, NULL); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | #if defined(RPC_DEBUG) || defined (RPC_TRACEPOINTS) | 254 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS) |
| 255 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) | 255 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) |
| 256 | { | 256 | { |
| 257 | return ((q && q->name) ? q->name : "unknown"); | 257 | return ((q && q->name) ? q->name : "unknown"); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index cf391eef2e6d..9d27ac45b909 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -239,6 +239,9 @@ struct rpc_xprt { | |||
| 239 | struct net *xprt_net; | 239 | struct net *xprt_net; |
| 240 | const char *servername; | 240 | const char *servername; |
| 241 | const char *address_strings[RPC_DISPLAY_MAX]; | 241 | const char *address_strings[RPC_DISPLAY_MAX]; |
| 242 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
| 243 | struct dentry *debugfs; /* debugfs directory */ | ||
| 244 | #endif | ||
| 242 | }; | 245 | }; |
| 243 | 246 | ||
| 244 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) | 247 | #if defined(CONFIG_SUNRPC_BACKCHANNEL) |
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 1ad36cc25b2e..7591788e9fbf 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
| @@ -17,6 +17,65 @@ void cleanup_socket_xprt(void); | |||
| 17 | #define RPC_DEF_MIN_RESVPORT (665U) | 17 | #define RPC_DEF_MIN_RESVPORT (665U) |
| 18 | #define RPC_DEF_MAX_RESVPORT (1023U) | 18 | #define RPC_DEF_MAX_RESVPORT (1023U) |
| 19 | 19 | ||
| 20 | struct sock_xprt { | ||
| 21 | struct rpc_xprt xprt; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Network layer | ||
| 25 | */ | ||
| 26 | struct socket * sock; | ||
| 27 | struct sock * inet; | ||
| 28 | |||
| 29 | /* | ||
| 30 | * State of TCP reply receive | ||
| 31 | */ | ||
| 32 | __be32 tcp_fraghdr, | ||
| 33 | tcp_xid, | ||
| 34 | tcp_calldir; | ||
| 35 | |||
| 36 | u32 tcp_offset, | ||
| 37 | tcp_reclen; | ||
| 38 | |||
| 39 | unsigned long tcp_copied, | ||
| 40 | tcp_flags; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Connection of transports | ||
| 44 | */ | ||
| 45 | struct delayed_work connect_worker; | ||
| 46 | struct sockaddr_storage srcaddr; | ||
| 47 | unsigned short srcport; | ||
| 48 | |||
| 49 | /* | ||
| 50 | * UDP socket buffer size parameters | ||
| 51 | */ | ||
| 52 | size_t rcvsize, | ||
| 53 | sndsize; | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Saved socket callback addresses | ||
| 57 | */ | ||
| 58 | void (*old_data_ready)(struct sock *); | ||
| 59 | void (*old_state_change)(struct sock *); | ||
| 60 | void (*old_write_space)(struct sock *); | ||
| 61 | void (*old_error_report)(struct sock *); | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* | ||
| 65 | * TCP receive state flags | ||
| 66 | */ | ||
| 67 | #define TCP_RCV_LAST_FRAG (1UL << 0) | ||
| 68 | #define TCP_RCV_COPY_FRAGHDR (1UL << 1) | ||
| 69 | #define TCP_RCV_COPY_XID (1UL << 2) | ||
| 70 | #define TCP_RCV_COPY_DATA (1UL << 3) | ||
| 71 | #define TCP_RCV_READ_CALLDIR (1UL << 4) | ||
| 72 | #define TCP_RCV_COPY_CALLDIR (1UL << 5) | ||
| 73 | |||
| 74 | /* | ||
| 75 | * TCP RPC flags | ||
| 76 | */ | ||
| 77 | #define TCP_RPC_REPLY (1UL << 6) | ||
| 78 | |||
| 20 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
| 21 | 80 | ||
| 22 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ | 81 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ |
