Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - NFSv4.2 now supports cross device offloaded copy (i.e. offloaded copy of a file from one source server to a different target server). - New RDMA tracepoints for debugging congestion control and Local Invalidate WRs. Bugfixes and cleanups - Drop the NFSv4.1 session slot if nfs4_delegreturn_prepare waits for layoutreturn - Handle bad/dead sessions correctly in nfs41_sequence_process() - Various bugfixes to the delegation return operation. - Various bugfixes pertaining to delegations that have been revoked. - Cleanups to the NFS timespec code to avoid unnecessary conversions between timespec and timespec64. - Fix unstable RDMA connections after a reconnect - Close race between waking an RDMA sender and posting a receive - Wake pending RDMA tasks if connection fails - Fix MR list corruption, and clean up MR usage - Fix another RPCSEC_GSS issue with MIC buffer space" * tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits) SUNRPC: Capture completion of all RPC tasks SUNRPC: Fix another issue with MIC buffer space NFS4: Trace lock reclaims NFS4: Trace state recovery operation NFSv4.2 fix memory leak in nfs42_ssc_open NFSv4.2 fix kfree in __nfs42_copy_file_range NFS: remove duplicated include from nfs4file.c NFSv4: Make _nfs42_proc_copy_notify() static NFS: Fallocate should use the nfs4_fattr_bitmap NFS: Return -ETXTBSY when attempting to write to a swapfile fs: nfs: sysfs: Remove NULL check before kfree NFS: remove unneeded semicolon NFSv4: add declaration of current_stateid NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process() nfsv4: Move NFSPROC4_CLNT_COPY_NOTIFY to end of list SUNRPC: Avoid RPC delays when exiting suspend NFS: Add a tracepoint in nfs_fh_to_dentry() NFSv4: Don't retry the GETATTR on old stateid in nfs4_delegreturn_done() NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn ...
Showing the changes to include (8 of 49 files). Show all
Unified · Split
| @@ -16,6 +16,7 @@ · 15 unmodified lines | |||
| 16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
| 17 | #include <linux/uidgid.h> | 17 | #include <linux/uidgid.h> |
| 18 | #include <uapi/linux/nfs4.h> | 18 | #include <uapi/linux/nfs4.h> |
| 19 | #include <linux/sunrpc/msg_prot.h> | ||
| 19 | 20 | ||
| 20 | enum nfs4_acl_whotype { | 21 | enum nfs4_acl_whotype { |
| 21 | NFS4_ACL_WHO_NAMED = 0, | 22 | NFS4_ACL_WHO_NAMED = 0, |
| @@ -539,6 +540,8 @@ enum { · 517 unmodified lines | |||
| 539 | 540 | ||
| 540 | NFSPROC4_CLNT_LOOKUPP, | 541 | NFSPROC4_CLNT_LOOKUPP, |
| 541 | NFSPROC4_CLNT_LAYOUTERROR, | 542 | NFSPROC4_CLNT_LAYOUTERROR, |
| 543 | |||
| 544 | NFSPROC4_CLNT_COPY_NOTIFY, | ||
| 542 | }; | 545 | }; |
| 543 | 546 | ||
| 544 | /* nfs41 types */ | 547 | /* nfs41 types */ |
| @@ -674,4 +677,27 @@ struct nfs4_op_map { · 129 unmodified lines | |||
| 674 | } u; | 677 | } u; |
| 675 | }; | 678 | }; |
| 676 | 679 | ||
| 680 | struct nfs42_netaddr { | ||
| 681 | char netid[RPCBIND_MAXNETIDLEN]; | ||
| 682 | char addr[RPCBIND_MAXUADDRLEN + 1]; | ||
| 683 | u32 netid_len; | ||
| 684 | u32 addr_len; | ||
| 685 | }; | ||
| 686 | |||
| 687 | enum netloc_type4 { | ||
| 688 | NL4_NAME = 1, | ||
| 689 | NL4_URL = 2, | ||
| 690 | NL4_NETADDR = 3, | ||
| 691 | }; | ||
| 692 | |||
| 693 | struct nl4_server { | ||
| 694 | enum netloc_type4 nl4_type; | ||
| 695 | union { | ||
| 696 | struct { /* NL4_NAME, NL4_URL */ | ||
| 697 | int nl4_str_sz; | ||
| 698 | char nl4_str[NFS4_OPAQUE_LIMIT + 1]; | ||
| 699 | }; | ||
| 700 | struct nfs42_netaddr nl4_addr; /* NL4_NETADDR */ | ||
| 701 | } u; | ||
| 702 | }; | ||
| 677 | #endif | 703 | #endif |
| @@ -189,13 +189,15 @@ struct nfs_inode { · 188 unmodified lines | |||
| 189 | 189 | ||
| 190 | struct nfs4_copy_state { | 190 | struct nfs4_copy_state { |
| 191 | struct list_head copies; | 191 | struct list_head copies; |
| 192 | struct list_head src_copies; | ||
| 192 | nfs4_stateid stateid; | 193 | nfs4_stateid stateid; |
| 193 | struct completion completion; | 194 | struct completion completion; |
| 194 | uint64_t count; | 195 | uint64_t count; |
| 195 | struct nfs_writeverf verf; | 196 | struct nfs_writeverf verf; |
| 196 | int error; | 197 | int error; |
| 197 | int flags; | 198 | int flags; |
| 198 | struct nfs4_state *parent_state; | 199 | struct nfs4_state *parent_src_state; |
| 200 | struct nfs4_state *parent_dst_state; | ||
| 199 | }; | 201 | }; |
| 200 | 202 | ||
| 201 | /* | 203 | /* |
| @@ -45,6 +45,9 @@ struct nfs_client { · 44 unmodified lines | |||
| 45 | #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */ | 45 | #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */ |
| 46 | #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */ | 46 | #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */ |
| 47 | #define NFS_CS_TSM_POSSIBLE 5 /* - Maybe state migration */ | 47 | #define NFS_CS_TSM_POSSIBLE 5 /* - Maybe state migration */ |
| 48 | #define NFS_CS_NOPING 6 /* - don't ping on connect */ | ||
| 49 | #define NFS_CS_DS 7 /* - Server is a DS */ | ||
| 50 | #define NFS_CS_REUSEPORT 8 /* - reuse src port on reconnect */ | ||
| 48 | struct sockaddr_storage cl_addr; /* server identifier */ | 51 | struct sockaddr_storage cl_addr; /* server identifier */ |
| 49 | size_t cl_addrlen; | 52 | size_t cl_addrlen; |
| 50 | char * cl_hostname; /* hostname of server */ | 53 | char * cl_hostname; /* hostname of server */ |
| @@ -171,7 +174,7 @@ struct nfs_server { · 120 unmodified lines | |||
| 171 | 174 | ||
| 172 | struct nfs_fsid fsid; | 175 | struct nfs_fsid fsid; |
| 173 | __u64 maxfilesize; /* maximum file size */ | 176 | __u64 maxfilesize; /* maximum file size */ |
| 174 | struct timespec time_delta; /* smallest time granularity */ | 177 | struct timespec64 time_delta; /* smallest time granularity */ |
| 175 | unsigned long mount_time; /* when this fs was mounted */ | 178 | unsigned long mount_time; /* when this fs was mounted */ |
| 176 | struct super_block *super; /* VFS super block */ | 179 | struct super_block *super; /* VFS super block */ |
| 177 | dev_t s_dev; /* superblock dev numbers */ | 180 | dev_t s_dev; /* superblock dev numbers */ |
| @@ -276,5 +279,6 @@ struct nfs_server { · 98 unmodified lines | |||
| 276 | #define NFS_CAP_COPY (1U << 24) | 279 | #define NFS_CAP_COPY (1U << 24) |
| 277 | #define NFS_CAP_OFFLOAD_CANCEL (1U << 25) | 280 | #define NFS_CAP_OFFLOAD_CANCEL (1U << 25) |
| 278 | #define NFS_CAP_LAYOUTERROR (1U << 26) | 281 | #define NFS_CAP_LAYOUTERROR (1U << 26) |
| 282 | #define NFS_CAP_COPY_NOTIFY (1U << 27) | ||
| 279 | 283 | ||
| 280 | #endif | 284 | #endif |
| @@ -62,14 +62,14 @@ struct nfs_fattr { · 61 unmodified lines | |||
| 62 | struct nfs_fsid fsid; | 62 | struct nfs_fsid fsid; |
| 63 | __u64 fileid; | 63 | __u64 fileid; |
| 64 | __u64 mounted_on_fileid; | 64 | __u64 mounted_on_fileid; |
| 65 | struct timespec atime; | 65 | struct timespec64 atime; |
| 66 | struct timespec mtime; | 66 | struct timespec64 mtime; |
| 67 | struct timespec ctime; | 67 | struct timespec64 ctime; |
| 68 | __u64 change_attr; /* NFSv4 change attribute */ | 68 | __u64 change_attr; /* NFSv4 change attribute */ |
| 69 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ | 69 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ |
| 70 | __u64 pre_size; /* pre_op_attr.size */ | 70 | __u64 pre_size; /* pre_op_attr.size */ |
| 71 | struct timespec pre_mtime; /* pre_op_attr.mtime */ | 71 | struct timespec64 pre_mtime; /* pre_op_attr.mtime */ |
| 72 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | 72 | struct timespec64 pre_ctime; /* pre_op_attr.ctime */ |
| 73 | unsigned long time_start; | 73 | unsigned long time_start; |
| 74 | unsigned long gencount; | 74 | unsigned long gencount; |
| 75 | struct nfs4_string *owner_name; | 75 | struct nfs4_string *owner_name; |
| @@ -143,7 +143,7 @@ struct nfs_fsinfo { · 67 unmodified lines | |||
| 143 | __u32 wtmult; /* writes should be multiple of this */ | 143 | __u32 wtmult; /* writes should be multiple of this */ |
| 144 | __u32 dtpref; /* pref. readdir transfer size */ | 144 | __u32 dtpref; /* pref. readdir transfer size */ |
| 145 | __u64 maxfilesize; | 145 | __u64 maxfilesize; |
| 146 | struct timespec time_delta; /* server time granularity */ | 146 | struct timespec64 time_delta; /* server time granularity */ |
| 147 | __u32 lease_time; /* in seconds */ | 147 | __u32 lease_time; /* in seconds */ |
| 148 | __u32 nlayouttypes; /* number of layouttypes */ | 148 | __u32 nlayouttypes; /* number of layouttypes */ |
| 149 | __u32 layouttype[NFS_MAX_LAYOUT_TYPES]; /* supported pnfs layout driver */ | 149 | __u32 layouttype[NFS_MAX_LAYOUT_TYPES]; /* supported pnfs layout driver */ |
| @@ -869,7 +869,7 @@ struct nfs3_sattrargs { · 719 unmodified lines | |||
| 869 | struct nfs_fh * fh; | 869 | struct nfs_fh * fh; |
| 870 | struct iattr * sattr; | 870 | struct iattr * sattr; |
| 871 | unsigned int guard; | 871 | unsigned int guard; |
| 872 | struct timespec guardtime; | 872 | struct timespec64 guardtime; |
| 873 | }; | 873 | }; |
| 874 | 874 | ||
| 875 | struct nfs3_diropargs { | 875 | struct nfs3_diropargs { |
| @@ -1435,6 +1435,7 @@ struct nfs42_copy_args { · 559 unmodified lines | |||
| 1435 | 1435 | ||
| 1436 | u64 count; | 1436 | u64 count; |
| 1437 | bool sync; | 1437 | bool sync; |
| 1438 | struct nl4_server *cp_src; | ||
| 1438 | }; | 1439 | }; |
| 1439 | 1440 | ||
| 1440 | struct nfs42_write_res { | 1441 | struct nfs42_write_res { |
| @@ -1463,6 +1464,22 @@ struct nfs42_offload_status_res { · 22 unmodified lines | |||
| 1463 | int osr_status; | 1464 | int osr_status; |
| 1464 | }; | 1465 | }; |
| 1465 | 1466 | ||
| 1467 | struct nfs42_copy_notify_args { | ||
| 1468 | struct nfs4_sequence_args cna_seq_args; | ||
| 1469 | |||
| 1470 | struct nfs_fh *cna_src_fh; | ||
| 1471 | nfs4_stateid cna_src_stateid; | ||
| 1472 | struct nl4_server cna_dst; | ||
| 1473 | }; | ||
| 1474 | |||
| 1475 | struct nfs42_copy_notify_res { | ||
| 1476 | struct nfs4_sequence_res cnr_seq_res; | ||
| 1477 | |||
| 1478 | struct nfstime4 cnr_lease_time; | ||
| 1479 | nfs4_stateid cnr_stateid; | ||
| 1480 | struct nl4_server cnr_src; | ||
| 1481 | }; | ||
| 1482 | |||
| 1466 | struct nfs42_seek_args { | 1483 | struct nfs42_seek_args { |
| 1467 | struct nfs4_sequence_args seq_args; | 1484 | struct nfs4_sequence_args seq_args; |
| 1468 | 1485 | ||
| @@ -149,6 +149,7 @@ struct rpc_add_xprt_test { · 148 unmodified lines | |||
| 149 | #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) | 149 | #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) |
| 150 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 150 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
| 151 | #define RPC_CLNT_CREATE_SOFTERR (1UL << 10) | 151 | #define RPC_CLNT_CREATE_SOFTERR (1UL << 10) |
| 152 | #define RPC_CLNT_CREATE_REUSEPORT (1UL << 11) | ||
| 152 | 153 | ||
| 153 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 154 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 154 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 155 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| @@ -207,7 +207,8 @@ struct rpc_xprt { · 206 unmodified lines | |||
| 207 | unsigned int min_reqs; /* min number of slots */ | 207 | unsigned int min_reqs; /* min number of slots */ |
| 208 | unsigned int num_reqs; /* total slots */ | 208 | unsigned int num_reqs; /* total slots */ |
| 209 | unsigned long state; /* transport state */ | 209 | unsigned long state; /* transport state */ |
| 210 | unsigned char resvport : 1; /* use a reserved port */ | 210 | unsigned char resvport : 1, /* use a reserved port */ |
| 211 | reuseport : 1; /* reuse port on reconnect */ | ||
| 211 | atomic_t swapper; /* we're swapping over this | 212 | atomic_t swapper; /* we're swapping over this |
| 212 | transport */ | 213 | transport */ |
| 213 | unsigned int bind_index; /* bind function index */ | 214 | unsigned int bind_index; /* bind function index */ |
| @@ -85,6 +85,44 @@ DECLARE_EVENT_CLASS(xprtrdma_rxprt, · 84 unmodified lines | |||
| 85 | ), \ | 85 | ), \ |
| 86 | TP_ARGS(r_xprt)) | 86 | TP_ARGS(r_xprt)) |
| 87 | 87 | ||
| 88 | DECLARE_EVENT_CLASS(xprtrdma_connect_class, | ||
| 89 | TP_PROTO( | ||
| 90 | const struct rpcrdma_xprt *r_xprt, | ||
| 91 | int rc | ||
| 92 | ), | ||
| 93 | |||
| 94 | TP_ARGS(r_xprt, rc), | ||
| 95 | |||
| 96 | TP_STRUCT__entry( | ||
| 97 | __field(const void *, r_xprt) | ||
| 98 | __field(int, rc) | ||
| 99 | __field(int, connect_status) | ||
| 100 | __string(addr, rpcrdma_addrstr(r_xprt)) | ||
| 101 | __string(port, rpcrdma_portstr(r_xprt)) | ||
| 102 | ), | ||
| 103 | |||
| 104 | TP_fast_assign( | ||
| 105 | __entry->r_xprt = r_xprt; | ||
| 106 | __entry->rc = rc; | ||
| 107 | __entry->connect_status = r_xprt->rx_ep.rep_connected; | ||
| 108 | __assign_str(addr, rpcrdma_addrstr(r_xprt)); | ||
| 109 | __assign_str(port, rpcrdma_portstr(r_xprt)); | ||
| 110 | ), | ||
| 111 | |||
| 112 | TP_printk("peer=[%s]:%s r_xprt=%p: rc=%d connect status=%d", | ||
| 113 | __get_str(addr), __get_str(port), __entry->r_xprt, | ||
| 114 | __entry->rc, __entry->connect_status | ||
| 115 | ) | ||
| 116 | ); | ||
| 117 | |||
| 118 | #define DEFINE_CONN_EVENT(name) \ | ||
| 119 | DEFINE_EVENT(xprtrdma_connect_class, xprtrdma_##name, \ | ||
| 120 | TP_PROTO( \ | ||
| 121 | const struct rpcrdma_xprt *r_xprt, \ | ||
| 122 | int rc \ | ||
| 123 | ), \ | ||
| 124 | TP_ARGS(r_xprt, rc)) | ||
| 125 | |||
| 88 | DECLARE_EVENT_CLASS(xprtrdma_rdch_event, | 126 | DECLARE_EVENT_CLASS(xprtrdma_rdch_event, |
| 89 | TP_PROTO( | 127 | TP_PROTO( |
| 90 | const struct rpc_task *task, | 128 | const struct rpc_task *task, |
| @@ -333,47 +371,81 @@ TRACE_EVENT(xprtrdma_cm_event, · 242 unmodified lines | |||
| 333 | ) | 371 | ) |
| 334 | ); | 372 | ); |
| 335 | 373 | ||
| 336 | TRACE_EVENT(xprtrdma_disconnect, | 374 | TRACE_EVENT(xprtrdma_inline_thresh, |
| 337 | TP_PROTO( | 375 | TP_PROTO( |
| 338 | const struct rpcrdma_xprt *r_xprt, | 376 | const struct rpcrdma_xprt *r_xprt |
| 339 | int status | ||
| 340 | ), | 377 | ), |
| 341 | 378 | ||
| 342 | TP_ARGS(r_xprt, status), | 379 | TP_ARGS(r_xprt), |
| 343 | 380 | ||
| 344 | TP_STRUCT__entry( | 381 | TP_STRUCT__entry( |
| 345 | __field(const void *, r_xprt) | 382 | __field(const void *, r_xprt) |
| 346 | __field(int, status) | 383 | __field(unsigned int, inline_send) |
| 347 | __field(int, connected) | 384 | __field(unsigned int, inline_recv) |
| 385 | __field(unsigned int, max_send) | ||
| 386 | __field(unsigned int, max_recv) | ||
| 348 | __string(addr, rpcrdma_addrstr(r_xprt)) | 387 | __string(addr, rpcrdma_addrstr(r_xprt)) |
| 349 | __string(port, rpcrdma_portstr(r_xprt)) | 388 | __string(port, rpcrdma_portstr(r_xprt)) |
| 350 | ), | 389 | ), |
| 351 | 390 | ||
| 352 | TP_fast_assign( | 391 | TP_fast_assign( |
| 392 | const struct rpcrdma_ep *ep = &r_xprt->rx_ep; | ||
| 393 | |||
| 353 | __entry->r_xprt = r_xprt; | 394 | __entry->r_xprt = r_xprt; |
| 354 | __entry->status = status; | 395 | __entry->inline_send = ep->rep_inline_send; |
| 355 | __entry->connected = r_xprt->rx_ep.rep_connected; | 396 | __entry->inline_recv = ep->rep_inline_recv; |
| 397 | __entry->max_send = ep->rep_max_inline_send; | ||
| 398 | __entry->max_recv = ep->rep_max_inline_recv; | ||
| 356 | __assign_str(addr, rpcrdma_addrstr(r_xprt)); | 399 | __assign_str(addr, rpcrdma_addrstr(r_xprt)); |
| 357 | __assign_str(port, rpcrdma_portstr(r_xprt)); | 400 | __assign_str(port, rpcrdma_portstr(r_xprt)); |
| 358 | ), | 401 | ), |
| 359 | 402 | ||
| 360 | TP_printk("peer=[%s]:%s r_xprt=%p: status=%d %sconnected", | 403 | TP_printk("peer=[%s]:%s r_xprt=%p neg send/recv=%u/%u, calc send/recv=%u/%u", |
| 361 | __get_str(addr), __get_str(port), | 404 | __get_str(addr), __get_str(port), __entry->r_xprt, |
| 362 | __entry->r_xprt, __entry->status, | 405 | __entry->inline_send, __entry->inline_recv, |
| 363 | __entry->connected == 1 ? "still " : "dis" | 406 | __entry->max_send, __entry->max_recv |
| 364 | ) | 407 | ) |
| 365 | ); | 408 | ); |
| 366 | 409 | ||
| 367 | DEFINE_RXPRT_EVENT(xprtrdma_conn_start); | 410 | DEFINE_CONN_EVENT(connect); |
| 368 | DEFINE_RXPRT_EVENT(xprtrdma_conn_tout); | 411 | DEFINE_CONN_EVENT(disconnect); |
| 412 | |||
| 369 | DEFINE_RXPRT_EVENT(xprtrdma_create); | 413 | DEFINE_RXPRT_EVENT(xprtrdma_create); |
| 370 | DEFINE_RXPRT_EVENT(xprtrdma_op_destroy); | 414 | DEFINE_RXPRT_EVENT(xprtrdma_op_destroy); |
| 371 | DEFINE_RXPRT_EVENT(xprtrdma_remove); | 415 | DEFINE_RXPRT_EVENT(xprtrdma_remove); |
| 372 | DEFINE_RXPRT_EVENT(xprtrdma_reinsert); | 416 | DEFINE_RXPRT_EVENT(xprtrdma_reinsert); |
| 373 | DEFINE_RXPRT_EVENT(xprtrdma_reconnect); | ||
| 374 | DEFINE_RXPRT_EVENT(xprtrdma_op_inject_dsc); | 417 | DEFINE_RXPRT_EVENT(xprtrdma_op_inject_dsc); |
| 375 | DEFINE_RXPRT_EVENT(xprtrdma_op_close); | 418 | DEFINE_RXPRT_EVENT(xprtrdma_op_close); |
| 376 | DEFINE_RXPRT_EVENT(xprtrdma_op_connect); | 419 | DEFINE_RXPRT_EVENT(xprtrdma_op_setport); |
| 420 | |||
| 421 | TRACE_EVENT(xprtrdma_op_connect, | ||
| 422 | TP_PROTO( | ||
| 423 | const struct rpcrdma_xprt *r_xprt, | ||
| 424 | unsigned long delay | ||
| 425 | ), | ||
| 426 | |||
| 427 | TP_ARGS(r_xprt, delay), | ||
| 428 | |||
| 429 | TP_STRUCT__entry( | ||
| 430 | __field(const void *, r_xprt) | ||
| 431 | __field(unsigned long, delay) | ||
| 432 | __string(addr, rpcrdma_addrstr(r_xprt)) | ||
| 433 | __string(port, rpcrdma_portstr(r_xprt)) | ||
| 434 | ), | ||
| 435 | |||
| 436 | TP_fast_assign( | ||
| 437 | __entry->r_xprt = r_xprt; | ||
| 438 | __entry->delay = delay; | ||
| 439 | __assign_str(addr, rpcrdma_addrstr(r_xprt)); | ||
| 440 | __assign_str(port, rpcrdma_portstr(r_xprt)); | ||
| 441 | ), | ||
| 442 | |||
| 443 | TP_printk("peer=[%s]:%s r_xprt=%p delay=%lu", | ||
| 444 | __get_str(addr), __get_str(port), __entry->r_xprt, | ||
| 445 | __entry->delay | ||
| 446 | ) | ||
| 447 | ); | ||
| 448 | |||
| 377 | 449 | ||
| 378 | TRACE_EVENT(xprtrdma_op_set_cto, | 450 | TRACE_EVENT(xprtrdma_op_set_cto, |
| 379 | TP_PROTO( | 451 | TP_PROTO( |
| @@ -532,6 +604,8 @@ DEFINE_WRCH_EVENT(write); · 152 unmodified lines | |||
| 532 | DEFINE_WRCH_EVENT(reply); | 604 | DEFINE_WRCH_EVENT(reply); |
| 533 | 605 | ||
| 534 | TRACE_DEFINE_ENUM(rpcrdma_noch); | 606 | TRACE_DEFINE_ENUM(rpcrdma_noch); |
| 607 | TRACE_DEFINE_ENUM(rpcrdma_noch_pullup); | ||
| 608 | TRACE_DEFINE_ENUM(rpcrdma_noch_mapped); | ||
| 535 | TRACE_DEFINE_ENUM(rpcrdma_readch); | 609 | TRACE_DEFINE_ENUM(rpcrdma_readch); |
| 536 | TRACE_DEFINE_ENUM(rpcrdma_areadch); | 610 | TRACE_DEFINE_ENUM(rpcrdma_areadch); |
| 537 | TRACE_DEFINE_ENUM(rpcrdma_writech); | 611 | TRACE_DEFINE_ENUM(rpcrdma_writech); |
| @@ -540,6 +614,8 @@ TRACE_DEFINE_ENUM(rpcrdma_replych); · 2 unmodified lines | |||
| 540 | #define xprtrdma_show_chunktype(x) \ | 614 | #define xprtrdma_show_chunktype(x) \ |
| 541 | __print_symbolic(x, \ | 615 | __print_symbolic(x, \ |
| 542 | { rpcrdma_noch, "inline" }, \ | 616 | { rpcrdma_noch, "inline" }, \ |
| 617 | { rpcrdma_noch_pullup, "pullup" }, \ | ||
| 618 | { rpcrdma_noch_mapped, "mapped" }, \ | ||
| 543 | { rpcrdma_readch, "read list" }, \ | 619 | { rpcrdma_readch, "read list" }, \ |
| 544 | { rpcrdma_areadch, "*read list" }, \ | 620 | { rpcrdma_areadch, "*read list" }, \ |
| 545 | { rpcrdma_writech, "write list" }, \ | 621 | { rpcrdma_writech, "write list" }, \ |
| @@ -667,9 +743,8 @@ TRACE_EVENT(xprtrdma_post_send, · 121 unmodified lines | |||
| 667 | __entry->client_id = rqst->rq_task->tk_client ? | 743 | __entry->client_id = rqst->rq_task->tk_client ? |
| 668 | rqst->rq_task->tk_client->cl_clid : -1; | 744 | rqst->rq_task->tk_client->cl_clid : -1; |
| 669 | __entry->req = req; | 745 | __entry->req = req; |
| 670 | __entry->num_sge = req->rl_sendctx->sc_wr.num_sge; | 746 | __entry->num_sge = req->rl_wr.num_sge; |
| 671 | __entry->signaled = req->rl_sendctx->sc_wr.send_flags & | 747 | __entry->signaled = req->rl_wr.send_flags & IB_SEND_SIGNALED; |
| 672 | IB_SEND_SIGNALED; | ||
| 673 | __entry->status = status; | 748 | __entry->status = status; |
| 674 | ), | 749 | ), |
| 675 | 750 | ||
| @@ -735,6 +810,31 @@ TRACE_EVENT(xprtrdma_post_recvs, · 59 unmodified lines | |||
| 735 | ) | 810 | ) |
| 736 | ); | 811 | ); |
| 737 | 812 | ||
| 813 | TRACE_EVENT(xprtrdma_post_linv, | ||
| 814 | TP_PROTO( | ||
| 815 | const struct rpcrdma_req *req, | ||
| 816 | int status | ||
| 817 | ), | ||
| 818 | |||
| 819 | TP_ARGS(req, status), | ||
| 820 | |||
| 821 | TP_STRUCT__entry( | ||
| 822 | __field(const void *, req) | ||
| 823 | __field(int, status) | ||
| 824 | __field(u32, xid) | ||
| 825 | ), | ||
| 826 | |||
| 827 | TP_fast_assign( | ||
| 828 | __entry->req = req; | ||
| 829 | __entry->status = status; | ||
| 830 | __entry->xid = be32_to_cpu(req->rl_slot.rq_xid); | ||
| 831 | ), | ||
| 832 | |||
| 833 | TP_printk("req=%p xid=0x%08x status=%d", | ||
| 834 | __entry->req, __entry->xid, __entry->status | ||
| 835 | ) | ||
| 836 | ); | ||
| 837 | |||
| 738 | /** | 838 | /** |
| 739 | ** Completion events | 839 | ** Completion events |
| 740 | **/ | 840 | **/ |
| @@ -1021,66 +1121,32 @@ DEFINE_REPLY_EVENT(xprtrdma_reply_hdr); · 280 unmodified lines | |||
| 1021 | TRACE_EVENT(xprtrdma_fixup, | 1121 | TRACE_EVENT(xprtrdma_fixup, |
| 1022 | TP_PROTO( | 1122 | TP_PROTO( |
| 1023 | const struct rpc_rqst *rqst, | 1123 | const struct rpc_rqst *rqst, |
| 1024 | int len, | 1124 | unsigned long fixup |
| 1025 | int hdrlen | ||
| 1026 | ), | 1125 | ), |
| 1027 | 1126 | ||
| 1028 | TP_ARGS(rqst, len, hdrlen), | 1127 | TP_ARGS(rqst, fixup), |
| 1029 | 1128 | ||
| 1030 | TP_STRUCT__entry( | 1129 | TP_STRUCT__entry( |
| 1031 | __field(unsigned int, task_id) | 1130 | __field(unsigned int, task_id) |
| 1032 | __field(unsigned int, client_id) | 1131 | __field(unsigned int, client_id) |
| 1033 | __field(const void *, base) | 1132 | __field(unsigned long, fixup) |
| 1034 | __field(int, len) | 1133 | __field(size_t, headlen) |
| 1035 | __field(int, hdrlen) | 1134 | __field(unsigned int, pagelen) |
| 1036 | ), | 1135 | __field(size_t, taillen) |
| 1037 | |||
| 1038 | TP_fast_assign( | ||
| 1039 | __entry->task_id = rqst->rq_task->tk_pid; | ||
| 1040 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; | ||
| 1041 | __entry->base = rqst->rq_rcv_buf.head[0].iov_base; | ||
| 1042 | __entry->len = len; | ||
| 1043 | __entry->hdrlen = hdrlen; | ||
| 1044 | ), | ||
| 1045 | |||
| 1046 | TP_printk("task:%u@%u base=%p len=%d hdrlen=%d", | ||
| 1047 | __entry->task_id, __entry->client_id, | ||
| 1048 | __entry->base, __entry->len, __entry->hdrlen | ||
| 1049 | ) | ||
| 1050 | ); | ||
| 1051 | |||
| 1052 | TRACE_EVENT(xprtrdma_fixup_pg, | ||
| 1053 | TP_PROTO( | ||
| 1054 | const struct rpc_rqst *rqst, | ||
| 1055 | int pageno, | ||
| 1056 | const void *pos, | ||
| 1057 | int len, | ||
| 1058 | int curlen | ||
| 1059 | ), | ||
| 1060 | |||
| 1061 | TP_ARGS(rqst, pageno, pos, len, curlen), | ||
| 1062 | |||
| 1063 | TP_STRUCT__entry( | ||
| 1064 | __field(unsigned int, task_id) | ||
| 1065 | __field(unsigned int, client_id) | ||
| 1066 | __field(const void *, pos) | ||
| 1067 | __field(int, pageno) | ||
| 1068 | __field(int, len) | ||
| 1069 | __field(int, curlen) | ||
| 1070 | ), | 1136 | ), |
| 1071 | 1137 | ||
| 1072 | TP_fast_assign( | 1138 | TP_fast_assign( |
| 1073 | __entry->task_id = rqst->rq_task->tk_pid; | 1139 | __entry->task_id = rqst->rq_task->tk_pid; |
| 1074 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; | 1140 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; |
| 1075 | __entry->pos = pos; | 1141 | __entry->fixup = fixup; |
| 1076 | __entry->pageno = pageno; | 1142 | __entry->headlen = rqst->rq_rcv_buf.head[0].iov_len; |
| 1077 | __entry->len = len; | 1143 | __entry->pagelen = rqst->rq_rcv_buf.page_len; |
| 1078 | __entry->curlen = curlen; | 1144 | __entry->taillen = rqst->rq_rcv_buf.tail[0].iov_len; |
| 1079 | ), | 1145 | ), |
| 1080 | 1146 | ||
| 1081 | TP_printk("task:%u@%u pageno=%d pos=%p len=%d curlen=%d", | 1147 | TP_printk("task:%u@%u fixup=%lu xdr=%zu/%u/%zu", |
| 1082 | __entry->task_id, __entry->client_id, | 1148 | __entry->task_id, __entry->client_id, __entry->fixup, |
| 1083 | __entry->pageno, __entry->pos, __entry->len, __entry->curlen | 1149 | __entry->headlen, __entry->pagelen, __entry->taillen |
| 1084 | ) | 1150 | ) |
| 1085 | ); | 1151 | ); |
| 1086 | 1152 | ||
| @@ -165,6 +165,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, · 164 unmodified lines | |||
| 165 | DEFINE_RPC_RUNNING_EVENT(begin); | 165 | DEFINE_RPC_RUNNING_EVENT(begin); |
| 166 | DEFINE_RPC_RUNNING_EVENT(run_action); | 166 | DEFINE_RPC_RUNNING_EVENT(run_action); |
| 167 | DEFINE_RPC_RUNNING_EVENT(complete); | 167 | DEFINE_RPC_RUNNING_EVENT(complete); |
| 168 | DEFINE_RPC_RUNNING_EVENT(end); | ||
| 168 | 169 | ||
| 169 | DECLARE_EVENT_CLASS(rpc_task_queued, | 170 | DECLARE_EVENT_CLASS(rpc_task_queued, |
| 170 | 171 | ||
| @@ -777,6 +778,99 @@ TRACE_EVENT(xprt_ping, · 606 unmodified lines | |||
| 777 | __get_str(addr), __get_str(port), __entry->status) | 778 | __get_str(addr), __get_str(port), __entry->status) |
| 778 | ); | 779 | ); |
| 779 | 780 | ||
| 781 | DECLARE_EVENT_CLASS(xprt_writelock_event, | ||
| 782 | TP_PROTO( | ||
| 783 | const struct rpc_xprt *xprt, const struct rpc_task *task | ||
| 784 | ), | ||
| 785 | |||
| 786 | TP_ARGS(xprt, task), | ||
| 787 | |||
| 788 | TP_STRUCT__entry( | ||
| 789 | __field(unsigned int, task_id) | ||
| 790 | __field(unsigned int, client_id) | ||
| 791 | __field(unsigned int, snd_task_id) | ||
| 792 | ), | ||
| 793 | |||
| 794 | TP_fast_assign( | ||
| 795 | if (task) { | ||
| 796 | __entry->task_id = task->tk_pid; | ||
| 797 | __entry->client_id = task->tk_client ? | ||
| 798 | task->tk_client->cl_clid : -1; | ||
| 799 | } else { | ||
| 800 | __entry->task_id = -1; | ||
| 801 | __entry->client_id = -1; | ||
| 802 | } | ||
| 803 | __entry->snd_task_id = xprt->snd_task ? | ||
| 804 | xprt->snd_task->tk_pid : -1; | ||
| 805 | ), | ||
| 806 | |||
| 807 | TP_printk("task:%u@%u snd_task:%u", | ||
| 808 | __entry->task_id, __entry->client_id, | ||
| 809 | __entry->snd_task_id) | ||
| 810 | ); | ||
| 811 | |||
| 812 | #define DEFINE_WRITELOCK_EVENT(name) \ | ||
| 813 | DEFINE_EVENT(xprt_writelock_event, xprt_##name, \ | ||
| 814 | TP_PROTO( \ | ||
| 815 | const struct rpc_xprt *xprt, \ | ||
| 816 | const struct rpc_task *task \ | ||
| 817 | ), \ | ||
| 818 | TP_ARGS(xprt, task)) | ||
| 819 | |||
| 820 | DEFINE_WRITELOCK_EVENT(reserve_xprt); | ||
| 821 | DEFINE_WRITELOCK_EVENT(release_xprt); | ||
| 822 | |||
| 823 | DECLARE_EVENT_CLASS(xprt_cong_event, | ||
| 824 | TP_PROTO( | ||
| 825 | const struct rpc_xprt *xprt, const struct rpc_task *task | ||
| 826 | ), | ||
| 827 | |||
| 828 | TP_ARGS(xprt, task), | ||
| 829 | |||
| 830 | TP_STRUCT__entry( | ||
| 831 | __field(unsigned int, task_id) | ||
| 832 | __field(unsigned int, client_id) | ||
| 833 | __field(unsigned int, snd_task_id) | ||
| 834 | __field(unsigned long, cong) | ||
| 835 | __field(unsigned long, cwnd) | ||
| 836 | __field(bool, wait) | ||
| 837 | ), | ||
| 838 | |||
| 839 | TP_fast_assign( | ||
| 840 | if (task) { | ||
| 841 | __entry->task_id = task->tk_pid; | ||
| 842 | __entry->client_id = task->tk_client ? | ||
| 843 | task->tk_client->cl_clid : -1; | ||
| 844 | } else { | ||
| 845 | __entry->task_id = -1; | ||
| 846 | __entry->client_id = -1; | ||
| 847 | } | ||
| 848 | __entry->snd_task_id = xprt->snd_task ? | ||
| 849 | xprt->snd_task->tk_pid : -1; | ||
| 850 | __entry->cong = xprt->cong; | ||
| 851 | __entry->cwnd = xprt->cwnd; | ||
| 852 | __entry->wait = test_bit(XPRT_CWND_WAIT, &xprt->state); | ||
| 853 | ), | ||
| 854 | |||
| 855 | TP_printk("task:%u@%u snd_task:%u cong=%lu cwnd=%lu%s", | ||
| 856 | __entry->task_id, __entry->client_id, | ||
| 857 | __entry->snd_task_id, __entry->cong, __entry->cwnd, | ||
| 858 | __entry->wait ? " (wait)" : "") | ||
| 859 | ); | ||
| 860 | |||
| 861 | #define DEFINE_CONG_EVENT(name) \ | ||
| 862 | DEFINE_EVENT(xprt_cong_event, xprt_##name, \ | ||
| 863 | TP_PROTO( \ | ||
| 864 | const struct rpc_xprt *xprt, \ | ||
| 865 | const struct rpc_task *task \ | ||
| 866 | ), \ | ||
| 867 | TP_ARGS(xprt, task)) | ||
| 868 | |||
| 869 | DEFINE_CONG_EVENT(reserve_cong); | ||
| 870 | DEFINE_CONG_EVENT(release_cong); | ||
| 871 | DEFINE_CONG_EVENT(get_cong); | ||
| 872 | DEFINE_CONG_EVENT(put_cong); | ||
| 873 | |||
| 780 | TRACE_EVENT(xs_stream_read_data, | 874 | TRACE_EVENT(xs_stream_read_data, |
| 781 | TP_PROTO(struct rpc_xprt *xprt, ssize_t err, size_t total), | 875 | TP_PROTO(struct rpc_xprt *xprt, ssize_t err, size_t total), |
| 782 | 876 | ||