History

Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

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 ...

Linus Torvalds committed 6 years ago

Commit fb9bf402 parents 94e89b4 a264aba49 files · +1756 −622Browse files

Showing the changes to include (8 of 49 files). Show all

Unified · Split

8 files
  1. include/linux/nfs4.h +26 −0
  2. include/linux/nfs_fs.h +3 −1
  3. include/linux/nfs_fs_sb.h +5 −1
  4. include/linux/nfs_xdr.h +24 −7
  5. include/linux/sunrpc/clnt.h +1 −0
  6. include/linux/sunrpc/xprt.h +2 −1
  7. include/trace/events/rpcrdma.h +132 −66
  8. include/trace/events/sunrpc.h +94 −0
include/linux/nfs4.h+26−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <linux/list.h>
1717 #include <linux/uidgid.h>
1818 #include <uapi/linux/nfs4.h>
19+#include <linux/sunrpc/msg_prot.h>
1920
2021 enum nfs4_acl_whotype {
2122 NFS4_ACL_WHO_NAMED = 0,
@@ -539,6 +540,8 @@ enum { · 517 unmodified lines
539540
540541 NFSPROC4_CLNT_LOOKUPP,
541542 NFSPROC4_CLNT_LAYOUTERROR,
543+
544+ NFSPROC4_CLNT_COPY_NOTIFY,
542545 };
543546
544547 /* nfs41 types */
@@ -674,4 +677,27 @@ struct nfs4_op_map { · 129 unmodified lines
674677 } u;
675678 };
676679
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+};
677703 #endif
include/linux/nfs_fs.h+3−1
@@ -189,13 +189,15 @@ struct nfs_inode { · 188 unmodified lines
189189
190190 struct nfs4_copy_state {
191191 struct list_head copies;
192+ struct list_head src_copies;
192193 nfs4_stateid stateid;
193194 struct completion completion;
194195 uint64_t count;
195196 struct nfs_writeverf verf;
196197 int error;
197198 int flags;
198− struct nfs4_state *parent_state;
199+ struct nfs4_state *parent_src_state;
200+ struct nfs4_state *parent_dst_state;
199201 };
200202
201203 /*
include/linux/nfs_fs_sb.h+5−1
@@ -45,6 +45,9 @@ struct nfs_client { · 44 unmodified lines
4545 #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */
4646 #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */
4747 #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 */
4851 struct sockaddr_storage cl_addr; /* server identifier */
4952 size_t cl_addrlen;
5053 char * cl_hostname; /* hostname of server */
@@ -171,7 +174,7 @@ struct nfs_server { · 120 unmodified lines
171174
172175 struct nfs_fsid fsid;
173176 __u64 maxfilesize; /* maximum file size */
174− struct timespec time_delta; /* smallest time granularity */
177+ struct timespec64 time_delta; /* smallest time granularity */
175178 unsigned long mount_time; /* when this fs was mounted */
176179 struct super_block *super; /* VFS super block */
177180 dev_t s_dev; /* superblock dev numbers */
@@ -276,5 +279,6 @@ struct nfs_server { · 98 unmodified lines
276279 #define NFS_CAP_COPY (1U << 24)
277280 #define NFS_CAP_OFFLOAD_CANCEL (1U << 25)
278281 #define NFS_CAP_LAYOUTERROR (1U << 26)
282+#define NFS_CAP_COPY_NOTIFY (1U << 27)
279283
280284 #endif
include/linux/nfs_xdr.h+24−7
@@ -62,14 +62,14 @@ struct nfs_fattr { · 61 unmodified lines
6262 struct nfs_fsid fsid;
6363 __u64 fileid;
6464 __u64 mounted_on_fileid;
65− struct timespec atime;
66− struct timespec mtime;
67− struct timespec ctime;
65+ struct timespec64 atime;
66+ struct timespec64 mtime;
67+ struct timespec64 ctime;
6868 __u64 change_attr; /* NFSv4 change attribute */
6969 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
7070 __u64 pre_size; /* pre_op_attr.size */
71− struct timespec pre_mtime; /* pre_op_attr.mtime */
72− struct timespec pre_ctime; /* pre_op_attr.ctime */
71+ struct timespec64 pre_mtime; /* pre_op_attr.mtime */
72+ struct timespec64 pre_ctime; /* pre_op_attr.ctime */
7373 unsigned long time_start;
7474 unsigned long gencount;
7575 struct nfs4_string *owner_name;
@@ -143,7 +143,7 @@ struct nfs_fsinfo { · 67 unmodified lines
143143 __u32 wtmult; /* writes should be multiple of this */
144144 __u32 dtpref; /* pref. readdir transfer size */
145145 __u64 maxfilesize;
146− struct timespec time_delta; /* server time granularity */
146+ struct timespec64 time_delta; /* server time granularity */
147147 __u32 lease_time; /* in seconds */
148148 __u32 nlayouttypes; /* number of layouttypes */
149149 __u32 layouttype[NFS_MAX_LAYOUT_TYPES]; /* supported pnfs layout driver */
@@ -869,7 +869,7 @@ struct nfs3_sattrargs { · 719 unmodified lines
869869 struct nfs_fh * fh;
870870 struct iattr * sattr;
871871 unsigned int guard;
872− struct timespec guardtime;
872+ struct timespec64 guardtime;
873873 };
874874
875875 struct nfs3_diropargs {
@@ -1435,6 +1435,7 @@ struct nfs42_copy_args { · 559 unmodified lines
14351435
14361436 u64 count;
14371437 bool sync;
1438+ struct nl4_server *cp_src;
14381439 };
14391440
14401441 struct nfs42_write_res {
@@ -1463,6 +1464,22 @@ struct nfs42_offload_status_res { · 22 unmodified lines
14631464 int osr_status;
14641465 };
14651466
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+
14661483 struct nfs42_seek_args {
14671484 struct nfs4_sequence_args seq_args;
14681485
include/linux/sunrpc/clnt.h+1−0
@@ -149,6 +149,7 @@ struct rpc_add_xprt_test { · 148 unmodified lines
149149 #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8)
150150 #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9)
151151 #define RPC_CLNT_CREATE_SOFTERR (1UL << 10)
152+#define RPC_CLNT_CREATE_REUSEPORT (1UL << 11)
152153
153154 struct rpc_clnt *rpc_create(struct rpc_create_args *args);
154155 struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
include/linux/sunrpc/xprt.h+2−1
@@ -207,7 +207,8 @@ struct rpc_xprt { · 206 unmodified lines
207207 unsigned int min_reqs; /* min number of slots */
208208 unsigned int num_reqs; /* total slots */
209209 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 */
211212 atomic_t swapper; /* we're swapping over this
212213 transport */
213214 unsigned int bind_index; /* bind function index */
include/trace/events/rpcrdma.h+132−66
@@ -85,6 +85,44 @@ DECLARE_EVENT_CLASS(xprtrdma_rxprt, · 84 unmodified lines
8585 ), \
8686 TP_ARGS(r_xprt))
8787
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+
88126 DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
89127 TP_PROTO(
90128 const struct rpc_task *task,
@@ -333,47 +371,81 @@ TRACE_EVENT(xprtrdma_cm_event, · 242 unmodified lines
333371 )
334372 );
335373
336−TRACE_EVENT(xprtrdma_disconnect,
374+TRACE_EVENT(xprtrdma_inline_thresh,
337375 TP_PROTO(
338− const struct rpcrdma_xprt *r_xprt,
339− int status
376+ const struct rpcrdma_xprt *r_xprt
340377 ),
341378
342− TP_ARGS(r_xprt, status),
379+ TP_ARGS(r_xprt),
343380
344381 TP_STRUCT__entry(
345382 __field(const void *, r_xprt)
346− __field(int, status)
347− __field(int, connected)
383+ __field(unsigned int, inline_send)
384+ __field(unsigned int, inline_recv)
385+ __field(unsigned int, max_send)
386+ __field(unsigned int, max_recv)
348387 __string(addr, rpcrdma_addrstr(r_xprt))
349388 __string(port, rpcrdma_portstr(r_xprt))
350389 ),
351390
352391 TP_fast_assign(
392+ const struct rpcrdma_ep *ep = &r_xprt->rx_ep;
393+
353394 __entry->r_xprt = r_xprt;
354− __entry->status = status;
355− __entry->connected = r_xprt->rx_ep.rep_connected;
395+ __entry->inline_send = ep->rep_inline_send;
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;
356399 __assign_str(addr, rpcrdma_addrstr(r_xprt));
357400 __assign_str(port, rpcrdma_portstr(r_xprt));
358401 ),
359402
360− TP_printk("peer=[%s]:%s r_xprt=%p: status=%d %sconnected",
361− __get_str(addr), __get_str(port),
362− __entry->r_xprt, __entry->status,
363− __entry->connected == 1 ? "still " : "dis"
403+ TP_printk("peer=[%s]:%s r_xprt=%p neg send/recv=%u/%u, calc send/recv=%u/%u",
404+ __get_str(addr), __get_str(port), __entry->r_xprt,
405+ __entry->inline_send, __entry->inline_recv,
406+ __entry->max_send, __entry->max_recv
364407 )
365408 );
366409
367−DEFINE_RXPRT_EVENT(xprtrdma_conn_start);
368−DEFINE_RXPRT_EVENT(xprtrdma_conn_tout);
410+DEFINE_CONN_EVENT(connect);
411+DEFINE_CONN_EVENT(disconnect);
412+
369413 DEFINE_RXPRT_EVENT(xprtrdma_create);
370414 DEFINE_RXPRT_EVENT(xprtrdma_op_destroy);
371415 DEFINE_RXPRT_EVENT(xprtrdma_remove);
372416 DEFINE_RXPRT_EVENT(xprtrdma_reinsert);
373−DEFINE_RXPRT_EVENT(xprtrdma_reconnect);
374417 DEFINE_RXPRT_EVENT(xprtrdma_op_inject_dsc);
375418 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+
377449
378450 TRACE_EVENT(xprtrdma_op_set_cto,
379451 TP_PROTO(
@@ -532,6 +604,8 @@ DEFINE_WRCH_EVENT(write); · 152 unmodified lines
532604 DEFINE_WRCH_EVENT(reply);
533605
534606 TRACE_DEFINE_ENUM(rpcrdma_noch);
607+TRACE_DEFINE_ENUM(rpcrdma_noch_pullup);
608+TRACE_DEFINE_ENUM(rpcrdma_noch_mapped);
535609 TRACE_DEFINE_ENUM(rpcrdma_readch);
536610 TRACE_DEFINE_ENUM(rpcrdma_areadch);
537611 TRACE_DEFINE_ENUM(rpcrdma_writech);
@@ -540,6 +614,8 @@ TRACE_DEFINE_ENUM(rpcrdma_replych); · 2 unmodified lines
540614 #define xprtrdma_show_chunktype(x) \
541615 __print_symbolic(x, \
542616 { rpcrdma_noch, "inline" }, \
617+ { rpcrdma_noch_pullup, "pullup" }, \
618+ { rpcrdma_noch_mapped, "mapped" }, \
543619 { rpcrdma_readch, "read list" }, \
544620 { rpcrdma_areadch, "*read list" }, \
545621 { rpcrdma_writech, "write list" }, \
@@ -667,9 +743,8 @@ TRACE_EVENT(xprtrdma_post_send, · 121 unmodified lines
667743 __entry->client_id = rqst->rq_task->tk_client ?
668744 rqst->rq_task->tk_client->cl_clid : -1;
669745 __entry->req = req;
670− __entry->num_sge = req->rl_sendctx->sc_wr.num_sge;
671− __entry->signaled = req->rl_sendctx->sc_wr.send_flags &
672− IB_SEND_SIGNALED;
746+ __entry->num_sge = req->rl_wr.num_sge;
747+ __entry->signaled = req->rl_wr.send_flags & IB_SEND_SIGNALED;
673748 __entry->status = status;
674749 ),
675750
@@ -735,6 +810,31 @@ TRACE_EVENT(xprtrdma_post_recvs, · 59 unmodified lines
735810 )
736811 );
737812
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+
738838 /**
739839 ** Completion events
740840 **/
@@ -1021,66 +1121,32 @@ DEFINE_REPLY_EVENT(xprtrdma_reply_hdr); · 280 unmodified lines
10211121 TRACE_EVENT(xprtrdma_fixup,
10221122 TP_PROTO(
10231123 const struct rpc_rqst *rqst,
1024− int len,
1025− int hdrlen
1124+ unsigned long fixup
10261125 ),
10271126
1028− TP_ARGS(rqst, len, hdrlen),
1127+ TP_ARGS(rqst, fixup),
10291128
10301129 TP_STRUCT__entry(
10311130 __field(unsigned int, task_id)
10321131 __field(unsigned int, client_id)
1033− __field(const void *, base)
1034− __field(int, len)
1035− __field(int, hdrlen)
1036− ),
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)
1132+ __field(unsigned long, fixup)
1133+ __field(size_t, headlen)
1134+ __field(unsigned int, pagelen)
1135+ __field(size_t, taillen)
10701136 ),
10711137
10721138 TP_fast_assign(
10731139 __entry->task_id = rqst->rq_task->tk_pid;
10741140 __entry->client_id = rqst->rq_task->tk_client->cl_clid;
1075− __entry->pos = pos;
1076− __entry->pageno = pageno;
1077− __entry->len = len;
1078− __entry->curlen = curlen;
1141+ __entry->fixup = fixup;
1142+ __entry->headlen = rqst->rq_rcv_buf.head[0].iov_len;
1143+ __entry->pagelen = rqst->rq_rcv_buf.page_len;
1144+ __entry->taillen = rqst->rq_rcv_buf.tail[0].iov_len;
10791145 ),
10801146
1081− TP_printk("task:%u@%u pageno=%d pos=%p len=%d curlen=%d",
1082− __entry->task_id, __entry->client_id,
1083− __entry->pageno, __entry->pos, __entry->len, __entry->curlen
1147+ TP_printk("task:%u@%u fixup=%lu xdr=%zu/%u/%zu",
1148+ __entry->task_id, __entry->client_id, __entry->fixup,
1149+ __entry->headlen, __entry->pagelen, __entry->taillen
10841150 )
10851151 );
10861152
include/trace/events/sunrpc.h+94−0
@@ -165,6 +165,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, · 164 unmodified lines
165165 DEFINE_RPC_RUNNING_EVENT(begin);
166166 DEFINE_RPC_RUNNING_EVENT(run_action);
167167 DEFINE_RPC_RUNNING_EVENT(complete);
168+DEFINE_RPC_RUNNING_EVENT(end);
168169
169170 DECLARE_EVENT_CLASS(rpc_task_queued,
170171
@@ -777,6 +778,99 @@ TRACE_EVENT(xprt_ping, · 606 unmodified lines
777778 __get_str(addr), __get_str(port), __entry->status)
778779 );
779780
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+
780874 TRACE_EVENT(xs_stream_read_data,
781875 TP_PROTO(struct rpc_xprt *xprt, ssize_t err, size_t total),
782876

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t