diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 17:33:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 17:33:15 -0400 |
commit | 06cbd26d312edfe4a83ff541c23f8f866265eb24 (patch) | |
tree | 45046d0daca202df6c590390df05fbd07ed84a5d /include | |
parent | abde77eb5c66b2f98539c4644b54f34b7e179e6b (diff) | |
parent | 5940d1cf9f42f67e9cc3f7df9eda39f5888d6e9e (diff) |
Merge tag 'nfs-for-5.2-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client updates from Anna Schumaker:
"Highlights include:
Stable bugfixes:
- Fall back to MDS if no deviceid is found rather than aborting # v4.11+
- NFS4: Fix v4.0 client state corruption when mount
Features:
- Much improved handling of soft mounts with NFS v4.0:
- Reduce risk of false positive timeouts
- Faster failover of reads and writes after a timeout
- Added a "softerr" mount option to return ETIMEDOUT instead of
EIO to the application after a timeout
- Increase number of xprtrdma backchannel requests
- Add additional xprtrdma tracepoints
- Improved send completion batching for xprtrdma
Other bugfixes and cleanups:
- Return -EINVAL when NFS v4.2 is passed an invalid dedup mode
- Reduce usage of GFP_ATOMIC pages in SUNRPC
- Various minor NFS over RDMA cleanups and bugfixes
- Use the correct container namespace for upcalls
- Don't share superblocks between user namespaces
- Various other container fixes
- Make nfs_match_client() killable to prevent soft lockups
- Don't mark all open state for recovery when handling recallable
state revoked flag"
* tag 'nfs-for-5.2-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (69 commits)
SUNRPC: Rebalance a kref in auth_gss.c
NFS: Fix a double unlock from nfs_match,get_client
nfs: pass the correct prototype to read_cache_page
NFSv4: don't mark all open state for recovery when handling recallable state revoked flag
SUNRPC: Fix an error code in gss_alloc_msg()
SUNRPC: task should be exit if encode return EKEYEXPIRED more times
NFS4: Fix v4.0 client state corruption when mount
PNFS fallback to MDS if no deviceid found
NFS: make nfs_match_client killable
lockd: Store the lockd client credential in struct nlm_host
NFS: When mounting, don't share filesystems between different user namespaces
NFS: Convert NFSv2 to use the container user namespace
NFSv4: Convert the NFS client idmapper to use the container user namespace
NFS: Convert NFSv3 to use the container user namespace
SUNRPC: Use namespace of listening daemon in the client AUTH_GSS upcall
SUNRPC: Use the client user namespace when encoding creds
NFS: Store the credential of the mount process in the nfs_server
SUNRPC: Cache cred of process creating the rpc_client
xprtrdma: Remove stale comment
xprtrdma: Update comments that reference ib_drain_qp
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lockd/bind.h | 1 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 4 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 13 | ||||
-rw-r--r-- | include/linux/nfs_page.h | 12 | ||||
-rw-r--r-- | include/linux/sunrpc/clnt.h | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/sched.h | 20 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 6 | ||||
-rw-r--r-- | include/trace/events/rpcrdma.h | 27 | ||||
-rw-r--r-- | include/trace/events/sunrpc.h | 8 | ||||
-rw-r--r-- | include/uapi/linux/nfs_mount.h | 9 |
11 files changed, 79 insertions, 26 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 053a4ef3d431..8c0cf1059443 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -46,6 +46,7 @@ struct nlmclnt_initdata { | |||
46 | int noresvport; | 46 | int noresvport; |
47 | struct net *net; | 47 | struct net *net; |
48 | const struct nlmclnt_operations *nlmclnt_ops; | 48 | const struct nlmclnt_operations *nlmclnt_ops; |
49 | const struct cred *cred; | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | /* | 52 | /* |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index b065ef406770..c9b422dde542 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -70,6 +70,7 @@ struct nlm_host { | |||
70 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ | 70 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ |
71 | char *h_addrbuf; /* address eyecatcher */ | 71 | char *h_addrbuf; /* address eyecatcher */ |
72 | struct net *net; /* host net */ | 72 | struct net *net; /* host net */ |
73 | const struct cred *h_cred; | ||
73 | char nodename[UNX_MAXNODENAME + 1]; | 74 | char nodename[UNX_MAXNODENAME + 1]; |
74 | const struct nlmclnt_operations *h_nlmclnt_ops; /* Callback ops for NLM users */ | 75 | const struct nlmclnt_operations *h_nlmclnt_ops; /* Callback ops for NLM users */ |
75 | }; | 76 | }; |
@@ -229,7 +230,8 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, | |||
229 | const u32 version, | 230 | const u32 version, |
230 | const char *hostname, | 231 | const char *hostname, |
231 | int noresvport, | 232 | int noresvport, |
232 | struct net *net); | 233 | struct net *net, |
234 | const struct cred *cred); | ||
233 | void nlmclnt_release_host(struct nlm_host *); | 235 | void nlmclnt_release_host(struct nlm_host *); |
234 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | 236 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, |
235 | const char *hostname, | 237 | const char *hostname, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 40e30376130b..d363d5765cdf 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -76,7 +76,6 @@ struct nfs_open_context { | |||
76 | fmode_t mode; | 76 | fmode_t mode; |
77 | 77 | ||
78 | unsigned long flags; | 78 | unsigned long flags; |
79 | #define NFS_CONTEXT_ERROR_WRITE (0) | ||
80 | #define NFS_CONTEXT_RESEND_WRITES (1) | 79 | #define NFS_CONTEXT_RESEND_WRITES (1) |
81 | #define NFS_CONTEXT_BAD (2) | 80 | #define NFS_CONTEXT_BAD (2) |
82 | #define NFS_CONTEXT_UNLOCK (3) | 81 | #define NFS_CONTEXT_UNLOCK (3) |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index c827d31298cc..1e78032a174b 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -139,6 +139,16 @@ struct nfs_server { | |||
139 | struct nfs_iostats __percpu *io_stats; /* I/O statistics */ | 139 | struct nfs_iostats __percpu *io_stats; /* I/O statistics */ |
140 | atomic_long_t writeback; /* number of writeback pages */ | 140 | atomic_long_t writeback; /* number of writeback pages */ |
141 | int flags; /* various flags */ | 141 | int flags; /* various flags */ |
142 | |||
143 | /* The following are for internal use only. Also see uapi/linux/nfs_mount.h */ | ||
144 | #define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000 | ||
145 | #define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000 | ||
146 | #define NFS_MOUNT_NORESVPORT 0x40000 | ||
147 | #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 | ||
148 | #define NFS_MOUNT_LOCAL_FLOCK 0x100000 | ||
149 | #define NFS_MOUNT_LOCAL_FCNTL 0x200000 | ||
150 | #define NFS_MOUNT_SOFTERR 0x400000 | ||
151 | |||
142 | unsigned int caps; /* server capabilities */ | 152 | unsigned int caps; /* server capabilities */ |
143 | unsigned int rsize; /* read size */ | 153 | unsigned int rsize; /* read size */ |
144 | unsigned int rpages; /* read size (in pages) */ | 154 | unsigned int rpages; /* read size (in pages) */ |
@@ -231,6 +241,9 @@ struct nfs_server { | |||
231 | 241 | ||
232 | /* XDR related information */ | 242 | /* XDR related information */ |
233 | unsigned int read_hdrsize; | 243 | unsigned int read_hdrsize; |
244 | |||
245 | /* User namespace info */ | ||
246 | const struct cred *cred; | ||
234 | }; | 247 | }; |
235 | 248 | ||
236 | /* Server capabilities */ | 249 | /* Server capabilities */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index ad69430fd0eb..0bbd587fac6a 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -42,7 +42,6 @@ struct nfs_inode; | |||
42 | struct nfs_page { | 42 | struct nfs_page { |
43 | struct list_head wb_list; /* Defines state of page: */ | 43 | struct list_head wb_list; /* Defines state of page: */ |
44 | struct page *wb_page; /* page to read in/write out */ | 44 | struct page *wb_page; /* page to read in/write out */ |
45 | struct nfs_open_context *wb_context; /* File state context info */ | ||
46 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 45 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
47 | pgoff_t wb_index; /* Offset >> PAGE_SHIFT */ | 46 | pgoff_t wb_index; /* Offset >> PAGE_SHIFT */ |
48 | unsigned int wb_offset, /* Offset & ~PAGE_MASK */ | 47 | unsigned int wb_offset, /* Offset & ~PAGE_MASK */ |
@@ -53,6 +52,7 @@ struct nfs_page { | |||
53 | struct nfs_write_verifier wb_verf; /* Commit cookie */ | 52 | struct nfs_write_verifier wb_verf; /* Commit cookie */ |
54 | struct nfs_page *wb_this_page; /* list of reqs for this page */ | 53 | struct nfs_page *wb_this_page; /* list of reqs for this page */ |
55 | struct nfs_page *wb_head; /* head pointer for req list */ | 54 | struct nfs_page *wb_head; /* head pointer for req list */ |
55 | unsigned short wb_nio; /* Number of I/O attempts */ | ||
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct nfs_pageio_descriptor; | 58 | struct nfs_pageio_descriptor; |
@@ -87,7 +87,6 @@ struct nfs_pgio_mirror { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct nfs_pageio_descriptor { | 89 | struct nfs_pageio_descriptor { |
90 | unsigned char pg_moreio : 1; | ||
91 | struct inode *pg_inode; | 90 | struct inode *pg_inode; |
92 | const struct nfs_pageio_ops *pg_ops; | 91 | const struct nfs_pageio_ops *pg_ops; |
93 | const struct nfs_rw_ops *pg_rw_ops; | 92 | const struct nfs_rw_ops *pg_rw_ops; |
@@ -105,6 +104,8 @@ struct nfs_pageio_descriptor { | |||
105 | struct nfs_pgio_mirror pg_mirrors_static[1]; | 104 | struct nfs_pgio_mirror pg_mirrors_static[1]; |
106 | struct nfs_pgio_mirror *pg_mirrors_dynamic; | 105 | struct nfs_pgio_mirror *pg_mirrors_dynamic; |
107 | u32 pg_mirror_idx; /* current mirror */ | 106 | u32 pg_mirror_idx; /* current mirror */ |
107 | unsigned short pg_maxretrans; | ||
108 | unsigned char pg_moreio : 1; | ||
108 | }; | 109 | }; |
109 | 110 | ||
110 | /* arbitrarily selected limit to number of mirrors */ | 111 | /* arbitrarily selected limit to number of mirrors */ |
@@ -114,7 +115,6 @@ struct nfs_pageio_descriptor { | |||
114 | 115 | ||
115 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | 116 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, |
116 | struct page *page, | 117 | struct page *page, |
117 | struct nfs_page *last, | ||
118 | unsigned int offset, | 118 | unsigned int offset, |
119 | unsigned int count); | 119 | unsigned int count); |
120 | extern void nfs_release_request(struct nfs_page *); | 120 | extern void nfs_release_request(struct nfs_page *); |
@@ -199,4 +199,10 @@ loff_t req_offset(struct nfs_page *req) | |||
199 | return (((loff_t)req->wb_index) << PAGE_SHIFT) + req->wb_offset; | 199 | return (((loff_t)req->wb_index) << PAGE_SHIFT) + req->wb_offset; |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline struct nfs_open_context * | ||
203 | nfs_req_openctx(struct nfs_page *req) | ||
204 | { | ||
205 | return req->wb_lock_context->open_context; | ||
206 | } | ||
207 | |||
202 | #endif /* _LINUX_NFS_PAGE_H */ | 208 | #endif /* _LINUX_NFS_PAGE_H */ |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 98bc9883b230..6e8073140a5d 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -50,6 +50,7 @@ struct rpc_clnt { | |||
50 | struct rpc_iostats * cl_metrics; /* per-client statistics */ | 50 | struct rpc_iostats * cl_metrics; /* per-client statistics */ |
51 | 51 | ||
52 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 52 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
53 | cl_softerr : 1,/* Timeouts return errors */ | ||
53 | cl_discrtry : 1,/* disconnect before retry */ | 54 | cl_discrtry : 1,/* disconnect before retry */ |
54 | cl_noretranstimeo: 1,/* No retransmit timeouts */ | 55 | cl_noretranstimeo: 1,/* No retransmit timeouts */ |
55 | cl_autobind : 1,/* use getport() */ | 56 | cl_autobind : 1,/* use getport() */ |
@@ -71,6 +72,7 @@ struct rpc_clnt { | |||
71 | struct dentry *cl_debugfs; /* debugfs directory */ | 72 | struct dentry *cl_debugfs; /* debugfs directory */ |
72 | #endif | 73 | #endif |
73 | struct rpc_xprt_iter cl_xpi; | 74 | struct rpc_xprt_iter cl_xpi; |
75 | const struct cred *cl_cred; | ||
74 | }; | 76 | }; |
75 | 77 | ||
76 | /* | 78 | /* |
@@ -125,6 +127,7 @@ struct rpc_create_args { | |||
125 | unsigned long flags; | 127 | unsigned long flags; |
126 | char *client_name; | 128 | char *client_name; |
127 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 129 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
130 | const struct cred *cred; | ||
128 | }; | 131 | }; |
129 | 132 | ||
130 | struct rpc_add_xprt_test { | 133 | struct rpc_add_xprt_test { |
@@ -144,6 +147,7 @@ struct rpc_add_xprt_test { | |||
144 | #define RPC_CLNT_CREATE_INFINITE_SLOTS (1UL << 7) | 147 | #define RPC_CLNT_CREATE_INFINITE_SLOTS (1UL << 7) |
145 | #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) | 148 | #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) |
146 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 149 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
150 | #define RPC_CLNT_CREATE_SOFTERR (1UL << 10) | ||
147 | 151 | ||
148 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 152 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
149 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 153 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 52d41d0c1ae1..d0e451868f02 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -35,7 +35,6 @@ struct rpc_wait { | |||
35 | struct list_head list; /* wait queue links */ | 35 | struct list_head list; /* wait queue links */ |
36 | struct list_head links; /* Links to related tasks */ | 36 | struct list_head links; /* Links to related tasks */ |
37 | struct list_head timer_list; /* Timer list */ | 37 | struct list_head timer_list; /* Timer list */ |
38 | unsigned long expires; | ||
39 | }; | 38 | }; |
40 | 39 | ||
41 | /* | 40 | /* |
@@ -62,6 +61,8 @@ struct rpc_task { | |||
62 | struct rpc_wait tk_wait; /* RPC wait */ | 61 | struct rpc_wait tk_wait; /* RPC wait */ |
63 | } u; | 62 | } u; |
64 | 63 | ||
64 | int tk_rpc_status; /* Result of last RPC operation */ | ||
65 | |||
65 | /* | 66 | /* |
66 | * RPC call state | 67 | * RPC call state |
67 | */ | 68 | */ |
@@ -125,7 +126,6 @@ struct rpc_task_setup { | |||
125 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ | 126 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ |
126 | #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ | 127 | #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ |
127 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ | 128 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ |
128 | #define RPC_TASK_KILLED 0x0100 /* task was killed */ | ||
129 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ | 129 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ |
130 | #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */ | 130 | #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */ |
131 | #define RPC_TASK_SENT 0x0800 /* message was sent */ | 131 | #define RPC_TASK_SENT 0x0800 /* message was sent */ |
@@ -135,7 +135,6 @@ struct rpc_task_setup { | |||
135 | 135 | ||
136 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) | 136 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) |
137 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) | 137 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) |
138 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) | ||
139 | #define RPC_IS_SOFT(t) ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT)) | 138 | #define RPC_IS_SOFT(t) ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT)) |
140 | #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN) | 139 | #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN) |
141 | #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT) | 140 | #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT) |
@@ -146,6 +145,7 @@ struct rpc_task_setup { | |||
146 | #define RPC_TASK_NEED_XMIT 3 | 145 | #define RPC_TASK_NEED_XMIT 3 |
147 | #define RPC_TASK_NEED_RECV 4 | 146 | #define RPC_TASK_NEED_RECV 4 |
148 | #define RPC_TASK_MSG_PIN_WAIT 5 | 147 | #define RPC_TASK_MSG_PIN_WAIT 5 |
148 | #define RPC_TASK_SIGNALLED 6 | ||
149 | 149 | ||
150 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 150 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
151 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 151 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
@@ -169,6 +169,8 @@ struct rpc_task_setup { | |||
169 | 169 | ||
170 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) | 170 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
171 | 171 | ||
172 | #define RPC_SIGNALLED(t) test_bit(RPC_TASK_SIGNALLED, &(t)->tk_runstate) | ||
173 | |||
172 | /* | 174 | /* |
173 | * Task priorities. | 175 | * Task priorities. |
174 | * Note: if you change these, you must also change | 176 | * Note: if you change these, you must also change |
@@ -183,7 +185,6 @@ struct rpc_task_setup { | |||
183 | struct rpc_timer { | 185 | struct rpc_timer { |
184 | struct timer_list timer; | 186 | struct timer_list timer; |
185 | struct list_head list; | 187 | struct list_head list; |
186 | unsigned long expires; | ||
187 | }; | 188 | }; |
188 | 189 | ||
189 | /* | 190 | /* |
@@ -217,6 +218,7 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *); | |||
217 | struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req); | 218 | struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req); |
218 | void rpc_put_task(struct rpc_task *); | 219 | void rpc_put_task(struct rpc_task *); |
219 | void rpc_put_task_async(struct rpc_task *); | 220 | void rpc_put_task_async(struct rpc_task *); |
221 | void rpc_signal_task(struct rpc_task *); | ||
220 | void rpc_exit_task(struct rpc_task *); | 222 | void rpc_exit_task(struct rpc_task *); |
221 | void rpc_exit(struct rpc_task *, int); | 223 | void rpc_exit(struct rpc_task *, int); |
222 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 224 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
@@ -225,11 +227,19 @@ void rpc_execute(struct rpc_task *); | |||
225 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 227 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |
226 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 228 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
227 | void rpc_destroy_wait_queue(struct rpc_wait_queue *); | 229 | void rpc_destroy_wait_queue(struct rpc_wait_queue *); |
230 | unsigned long rpc_task_timeout(const struct rpc_task *task); | ||
231 | void rpc_sleep_on_timeout(struct rpc_wait_queue *queue, | ||
232 | struct rpc_task *task, | ||
233 | rpc_action action, | ||
234 | unsigned long timeout); | ||
228 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 235 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
229 | rpc_action action); | 236 | rpc_action action); |
237 | void rpc_sleep_on_priority_timeout(struct rpc_wait_queue *queue, | ||
238 | struct rpc_task *task, | ||
239 | unsigned long timeout, | ||
240 | int priority); | ||
230 | void rpc_sleep_on_priority(struct rpc_wait_queue *, | 241 | void rpc_sleep_on_priority(struct rpc_wait_queue *, |
231 | struct rpc_task *, | 242 | struct rpc_task *, |
232 | rpc_action action, | ||
233 | int priority); | 243 | int priority); |
234 | void rpc_wake_up_queued_task_on_wq(struct workqueue_struct *wq, | 244 | void rpc_wake_up_queued_task_on_wq(struct workqueue_struct *wq, |
235 | struct rpc_wait_queue *queue, | 245 | struct rpc_wait_queue *queue, |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3a391544299e..a6d9fce7f20e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -143,7 +143,7 @@ struct rpc_xprt_ops { | |||
143 | void (*buf_free)(struct rpc_task *task); | 143 | void (*buf_free)(struct rpc_task *task); |
144 | void (*prepare_request)(struct rpc_rqst *req); | 144 | void (*prepare_request)(struct rpc_rqst *req); |
145 | int (*send_request)(struct rpc_rqst *req); | 145 | int (*send_request)(struct rpc_rqst *req); |
146 | void (*set_retrans_timeout)(struct rpc_task *task); | 146 | void (*wait_for_reply_request)(struct rpc_task *task); |
147 | void (*timer)(struct rpc_xprt *xprt, struct rpc_task *task); | 147 | void (*timer)(struct rpc_xprt *xprt, struct rpc_task *task); |
148 | void (*release_request)(struct rpc_task *task); | 148 | void (*release_request)(struct rpc_task *task); |
149 | void (*close)(struct rpc_xprt *xprt); | 149 | void (*close)(struct rpc_xprt *xprt); |
@@ -378,8 +378,8 @@ xprt_disable_swap(struct rpc_xprt *xprt) | |||
378 | int xprt_register_transport(struct xprt_class *type); | 378 | int xprt_register_transport(struct xprt_class *type); |
379 | int xprt_unregister_transport(struct xprt_class *type); | 379 | int xprt_unregister_transport(struct xprt_class *type); |
380 | int xprt_load_transport(const char *); | 380 | int xprt_load_transport(const char *); |
381 | void xprt_set_retrans_timeout_def(struct rpc_task *task); | 381 | void xprt_wait_for_reply_request_def(struct rpc_task *task); |
382 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | 382 | void xprt_wait_for_reply_request_rtt(struct rpc_task *task); |
383 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 383 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |
384 | void xprt_wait_for_buffer_space(struct rpc_xprt *xprt); | 384 | void xprt_wait_for_buffer_space(struct rpc_xprt *xprt); |
385 | bool xprt_write_space(struct rpc_xprt *xprt); | 385 | bool xprt_write_space(struct rpc_xprt *xprt); |
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h index 962975b4313f..df9851cb82b2 100644 --- a/include/trace/events/rpcrdma.h +++ b/include/trace/events/rpcrdma.h | |||
@@ -511,6 +511,33 @@ TRACE_EVENT(xprtrdma_marshal, | |||
511 | ) | 511 | ) |
512 | ); | 512 | ); |
513 | 513 | ||
514 | TRACE_EVENT(xprtrdma_marshal_failed, | ||
515 | TP_PROTO(const struct rpc_rqst *rqst, | ||
516 | int ret | ||
517 | ), | ||
518 | |||
519 | TP_ARGS(rqst, ret), | ||
520 | |||
521 | TP_STRUCT__entry( | ||
522 | __field(unsigned int, task_id) | ||
523 | __field(unsigned int, client_id) | ||
524 | __field(u32, xid) | ||
525 | __field(int, ret) | ||
526 | ), | ||
527 | |||
528 | TP_fast_assign( | ||
529 | __entry->task_id = rqst->rq_task->tk_pid; | ||
530 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; | ||
531 | __entry->xid = be32_to_cpu(rqst->rq_xid); | ||
532 | __entry->ret = ret; | ||
533 | ), | ||
534 | |||
535 | TP_printk("task:%u@%u xid=0x%08x: ret=%d", | ||
536 | __entry->task_id, __entry->client_id, __entry->xid, | ||
537 | __entry->ret | ||
538 | ) | ||
539 | ); | ||
540 | |||
514 | TRACE_EVENT(xprtrdma_post_send, | 541 | TRACE_EVENT(xprtrdma_post_send, |
515 | TP_PROTO( | 542 | TP_PROTO( |
516 | const struct rpcrdma_req *req, | 543 | const struct rpcrdma_req *req, |
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index f0a6f0c5549c..ffa3c51dbb1a 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -82,7 +82,6 @@ TRACE_DEFINE_ENUM(RPC_TASK_SWAPPER); | |||
82 | TRACE_DEFINE_ENUM(RPC_CALL_MAJORSEEN); | 82 | TRACE_DEFINE_ENUM(RPC_CALL_MAJORSEEN); |
83 | TRACE_DEFINE_ENUM(RPC_TASK_ROOTCREDS); | 83 | TRACE_DEFINE_ENUM(RPC_TASK_ROOTCREDS); |
84 | TRACE_DEFINE_ENUM(RPC_TASK_DYNAMIC); | 84 | TRACE_DEFINE_ENUM(RPC_TASK_DYNAMIC); |
85 | TRACE_DEFINE_ENUM(RPC_TASK_KILLED); | ||
86 | TRACE_DEFINE_ENUM(RPC_TASK_SOFT); | 85 | TRACE_DEFINE_ENUM(RPC_TASK_SOFT); |
87 | TRACE_DEFINE_ENUM(RPC_TASK_SOFTCONN); | 86 | TRACE_DEFINE_ENUM(RPC_TASK_SOFTCONN); |
88 | TRACE_DEFINE_ENUM(RPC_TASK_SENT); | 87 | TRACE_DEFINE_ENUM(RPC_TASK_SENT); |
@@ -97,7 +96,6 @@ TRACE_DEFINE_ENUM(RPC_TASK_NO_RETRANS_TIMEOUT); | |||
97 | { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \ | 96 | { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \ |
98 | { RPC_TASK_ROOTCREDS, "ROOTCREDS" }, \ | 97 | { RPC_TASK_ROOTCREDS, "ROOTCREDS" }, \ |
99 | { RPC_TASK_DYNAMIC, "DYNAMIC" }, \ | 98 | { RPC_TASK_DYNAMIC, "DYNAMIC" }, \ |
100 | { RPC_TASK_KILLED, "KILLED" }, \ | ||
101 | { RPC_TASK_SOFT, "SOFT" }, \ | 99 | { RPC_TASK_SOFT, "SOFT" }, \ |
102 | { RPC_TASK_SOFTCONN, "SOFTCONN" }, \ | 100 | { RPC_TASK_SOFTCONN, "SOFTCONN" }, \ |
103 | { RPC_TASK_SENT, "SENT" }, \ | 101 | { RPC_TASK_SENT, "SENT" }, \ |
@@ -111,6 +109,7 @@ TRACE_DEFINE_ENUM(RPC_TASK_ACTIVE); | |||
111 | TRACE_DEFINE_ENUM(RPC_TASK_NEED_XMIT); | 109 | TRACE_DEFINE_ENUM(RPC_TASK_NEED_XMIT); |
112 | TRACE_DEFINE_ENUM(RPC_TASK_NEED_RECV); | 110 | TRACE_DEFINE_ENUM(RPC_TASK_NEED_RECV); |
113 | TRACE_DEFINE_ENUM(RPC_TASK_MSG_PIN_WAIT); | 111 | TRACE_DEFINE_ENUM(RPC_TASK_MSG_PIN_WAIT); |
112 | TRACE_DEFINE_ENUM(RPC_TASK_SIGNALLED); | ||
114 | 113 | ||
115 | #define rpc_show_runstate(flags) \ | 114 | #define rpc_show_runstate(flags) \ |
116 | __print_flags(flags, "|", \ | 115 | __print_flags(flags, "|", \ |
@@ -119,7 +118,8 @@ TRACE_DEFINE_ENUM(RPC_TASK_MSG_PIN_WAIT); | |||
119 | { (1UL << RPC_TASK_ACTIVE), "ACTIVE" }, \ | 118 | { (1UL << RPC_TASK_ACTIVE), "ACTIVE" }, \ |
120 | { (1UL << RPC_TASK_NEED_XMIT), "NEED_XMIT" }, \ | 119 | { (1UL << RPC_TASK_NEED_XMIT), "NEED_XMIT" }, \ |
121 | { (1UL << RPC_TASK_NEED_RECV), "NEED_RECV" }, \ | 120 | { (1UL << RPC_TASK_NEED_RECV), "NEED_RECV" }, \ |
122 | { (1UL << RPC_TASK_MSG_PIN_WAIT), "MSG_PIN_WAIT" }) | 121 | { (1UL << RPC_TASK_MSG_PIN_WAIT), "MSG_PIN_WAIT" }, \ |
122 | { (1UL << RPC_TASK_SIGNALLED), "SIGNALLED" }) | ||
123 | 123 | ||
124 | DECLARE_EVENT_CLASS(rpc_task_running, | 124 | DECLARE_EVENT_CLASS(rpc_task_running, |
125 | 125 | ||
@@ -186,7 +186,7 @@ DECLARE_EVENT_CLASS(rpc_task_queued, | |||
186 | __entry->client_id = task->tk_client ? | 186 | __entry->client_id = task->tk_client ? |
187 | task->tk_client->cl_clid : -1; | 187 | task->tk_client->cl_clid : -1; |
188 | __entry->task_id = task->tk_pid; | 188 | __entry->task_id = task->tk_pid; |
189 | __entry->timeout = task->tk_timeout; | 189 | __entry->timeout = rpc_task_timeout(task); |
190 | __entry->runstate = task->tk_runstate; | 190 | __entry->runstate = task->tk_runstate; |
191 | __entry->status = task->tk_status; | 191 | __entry->status = task->tk_status; |
192 | __entry->flags = task->tk_flags; | 192 | __entry->flags = task->tk_flags; |
diff --git a/include/uapi/linux/nfs_mount.h b/include/uapi/linux/nfs_mount.h index e44e00616ab5..e3bcfc6aa3b0 100644 --- a/include/uapi/linux/nfs_mount.h +++ b/include/uapi/linux/nfs_mount.h | |||
@@ -66,13 +66,4 @@ struct nfs_mount_data { | |||
66 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ | 66 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ |
67 | #define NFS_MOUNT_FLAGMASK 0xFFFF | 67 | #define NFS_MOUNT_FLAGMASK 0xFFFF |
68 | 68 | ||
69 | /* The following are for internal use only */ | ||
70 | #define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000 | ||
71 | #define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000 | ||
72 | #define NFS_MOUNT_NORESVPORT 0x40000 | ||
73 | #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 | ||
74 | |||
75 | #define NFS_MOUNT_LOCAL_FLOCK 0x100000 | ||
76 | #define NFS_MOUNT_LOCAL_FCNTL 0x200000 | ||
77 | |||
78 | #endif | 69 | #endif |