]> asedeno.scripts.mit.edu Git - linux.git/blob - include/trace/events/afs.h
afs: Set up the iov_iter before calling afs_extract_data()
[linux.git] / include / trace / events / afs.h
1 /* AFS tracepoints
2  *
3  * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4  * Written by David Howells (dhowells@redhat.com)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public Licence
8  * as published by the Free Software Foundation; either version
9  * 2 of the Licence, or (at your option) any later version.
10  */
11 #undef TRACE_SYSTEM
12 #define TRACE_SYSTEM afs
13
14 #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ)
15 #define _TRACE_AFS_H
16
17 #include <linux/tracepoint.h>
18
19 /*
20  * Define enums for tracing information.
21  */
22 #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
23 #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
24
25 enum afs_call_trace {
26         afs_call_trace_alloc,
27         afs_call_trace_free,
28         afs_call_trace_put,
29         afs_call_trace_wake,
30         afs_call_trace_work,
31 };
32
33 enum afs_fs_operation {
34         afs_FS_FetchData                = 130,  /* AFS Fetch file data */
35         afs_FS_FetchStatus              = 132,  /* AFS Fetch file status */
36         afs_FS_StoreData                = 133,  /* AFS Store file data */
37         afs_FS_StoreStatus              = 135,  /* AFS Store file status */
38         afs_FS_RemoveFile               = 136,  /* AFS Remove a file */
39         afs_FS_CreateFile               = 137,  /* AFS Create a file */
40         afs_FS_Rename                   = 138,  /* AFS Rename or move a file or directory */
41         afs_FS_Symlink                  = 139,  /* AFS Create a symbolic link */
42         afs_FS_Link                     = 140,  /* AFS Create a hard link */
43         afs_FS_MakeDir                  = 141,  /* AFS Create a directory */
44         afs_FS_RemoveDir                = 142,  /* AFS Remove a directory */
45         afs_FS_GetVolumeInfo            = 148,  /* AFS Get information about a volume */
46         afs_FS_GetVolumeStatus          = 149,  /* AFS Get volume status information */
47         afs_FS_GetRootVolume            = 151,  /* AFS Get root volume name */
48         afs_FS_SetLock                  = 156,  /* AFS Request a file lock */
49         afs_FS_ExtendLock               = 157,  /* AFS Extend a file lock */
50         afs_FS_ReleaseLock              = 158,  /* AFS Release a file lock */
51         afs_FS_Lookup                   = 161,  /* AFS lookup file in directory */
52         afs_FS_InlineBulkStatus         = 65536, /* AFS Fetch multiple file statuses with errors */
53         afs_FS_FetchData64              = 65537, /* AFS Fetch file data */
54         afs_FS_StoreData64              = 65538, /* AFS Store file data */
55         afs_FS_GiveUpAllCallBacks       = 65539, /* AFS Give up all our callbacks on a server */
56         afs_FS_GetCapabilities          = 65540, /* AFS Get FS server capabilities */
57 };
58
59 enum afs_vl_operation {
60         afs_VL_GetEntryByNameU  = 527,          /* AFS Get Vol Entry By Name operation ID */
61         afs_VL_GetAddrsU        = 533,          /* AFS Get FS server addresses */
62         afs_YFSVL_GetEndpoints  = 64002,        /* YFS Get FS & Vol server addresses */
63         afs_VL_GetCapabilities  = 65537,        /* AFS Get VL server capabilities */
64 };
65
66 enum afs_edit_dir_op {
67         afs_edit_dir_create,
68         afs_edit_dir_create_error,
69         afs_edit_dir_create_inval,
70         afs_edit_dir_create_nospc,
71         afs_edit_dir_delete,
72         afs_edit_dir_delete_error,
73         afs_edit_dir_delete_inval,
74         afs_edit_dir_delete_noent,
75 };
76
77 enum afs_edit_dir_reason {
78         afs_edit_dir_for_create,
79         afs_edit_dir_for_link,
80         afs_edit_dir_for_mkdir,
81         afs_edit_dir_for_rename,
82         afs_edit_dir_for_rmdir,
83         afs_edit_dir_for_symlink,
84         afs_edit_dir_for_unlink,
85 };
86
87 enum afs_eproto_cause {
88         afs_eproto_bad_status,
89         afs_eproto_cb_count,
90         afs_eproto_cb_fid_count,
91         afs_eproto_file_type,
92         afs_eproto_ibulkst_cb_count,
93         afs_eproto_ibulkst_count,
94         afs_eproto_motd_len,
95         afs_eproto_offline_msg_len,
96         afs_eproto_volname_len,
97         afs_eproto_yvl_fsendpt4_len,
98         afs_eproto_yvl_fsendpt6_len,
99         afs_eproto_yvl_fsendpt_num,
100         afs_eproto_yvl_fsendpt_type,
101         afs_eproto_yvl_vlendpt4_len,
102         afs_eproto_yvl_vlendpt6_len,
103         afs_eproto_yvl_vlendpt_type,
104 };
105
106 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
107
108 /*
109  * Declare tracing information enums and their string mappings for display.
110  */
111 #define afs_call_traces \
112         EM(afs_call_trace_alloc,                "ALLOC") \
113         EM(afs_call_trace_free,                 "FREE ") \
114         EM(afs_call_trace_put,                  "PUT  ") \
115         EM(afs_call_trace_wake,                 "WAKE ") \
116         E_(afs_call_trace_work,                 "WORK ")
117
118 #define afs_fs_operations \
119         EM(afs_FS_FetchData,                    "FS.FetchData") \
120         EM(afs_FS_FetchStatus,                  "FS.FetchStatus") \
121         EM(afs_FS_StoreData,                    "FS.StoreData") \
122         EM(afs_FS_StoreStatus,                  "FS.StoreStatus") \
123         EM(afs_FS_RemoveFile,                   "FS.RemoveFile") \
124         EM(afs_FS_CreateFile,                   "FS.CreateFile") \
125         EM(afs_FS_Rename,                       "FS.Rename") \
126         EM(afs_FS_Symlink,                      "FS.Symlink") \
127         EM(afs_FS_Link,                         "FS.Link") \
128         EM(afs_FS_MakeDir,                      "FS.MakeDir") \
129         EM(afs_FS_RemoveDir,                    "FS.RemoveDir") \
130         EM(afs_FS_GetVolumeInfo,                "FS.GetVolumeInfo") \
131         EM(afs_FS_GetVolumeStatus,              "FS.GetVolumeStatus") \
132         EM(afs_FS_GetRootVolume,                "FS.GetRootVolume") \
133         EM(afs_FS_SetLock,                      "FS.SetLock") \
134         EM(afs_FS_ExtendLock,                   "FS.ExtendLock") \
135         EM(afs_FS_ReleaseLock,                  "FS.ReleaseLock") \
136         EM(afs_FS_Lookup,                       "FS.Lookup") \
137         EM(afs_FS_InlineBulkStatus,             "FS.InlineBulkStatus") \
138         EM(afs_FS_FetchData64,                  "FS.FetchData64") \
139         EM(afs_FS_StoreData64,                  "FS.StoreData64") \
140         EM(afs_FS_GiveUpAllCallBacks,           "FS.GiveUpAllCallBacks") \
141         E_(afs_FS_GetCapabilities,              "FS.GetCapabilities")
142
143 #define afs_vl_operations \
144         EM(afs_VL_GetEntryByNameU,              "VL.GetEntryByNameU") \
145         EM(afs_VL_GetAddrsU,                    "VL.GetAddrsU") \
146         EM(afs_YFSVL_GetEndpoints,              "YFSVL.GetEndpoints") \
147         E_(afs_VL_GetCapabilities,              "VL.GetCapabilities")
148
149 #define afs_edit_dir_ops                                  \
150         EM(afs_edit_dir_create,                 "create") \
151         EM(afs_edit_dir_create_error,           "c_fail") \
152         EM(afs_edit_dir_create_inval,           "c_invl") \
153         EM(afs_edit_dir_create_nospc,           "c_nspc") \
154         EM(afs_edit_dir_delete,                 "delete") \
155         EM(afs_edit_dir_delete_error,           "d_err ") \
156         EM(afs_edit_dir_delete_inval,           "d_invl") \
157         E_(afs_edit_dir_delete_noent,           "d_nent")
158
159 #define afs_edit_dir_reasons                              \
160         EM(afs_edit_dir_for_create,             "Create") \
161         EM(afs_edit_dir_for_link,               "Link  ") \
162         EM(afs_edit_dir_for_mkdir,              "MkDir ") \
163         EM(afs_edit_dir_for_rename,             "Rename") \
164         EM(afs_edit_dir_for_rmdir,              "RmDir ") \
165         EM(afs_edit_dir_for_symlink,            "Symlnk") \
166         E_(afs_edit_dir_for_unlink,             "Unlink")
167
168 #define afs_eproto_causes                       \
169         EM(afs_eproto_bad_status,       "BadStatus") \
170         EM(afs_eproto_cb_count,         "CbCount") \
171         EM(afs_eproto_cb_fid_count,     "CbFidCount") \
172         EM(afs_eproto_file_type,        "FileTYpe") \
173         EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \
174         EM(afs_eproto_ibulkst_count,    "IBS.FidCount") \
175         EM(afs_eproto_motd_len,         "MotdLen") \
176         EM(afs_eproto_offline_msg_len,  "OfflineMsgLen") \
177         EM(afs_eproto_volname_len,      "VolNameLen") \
178         EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \
179         EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \
180         EM(afs_eproto_yvl_fsendpt_num,  "YVL.FsEndCount") \
181         EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \
182         EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \
183         EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \
184         E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType")
185
186
187 /*
188  * Export enum symbols via userspace.
189  */
190 #undef EM
191 #undef E_
192 #define EM(a, b) TRACE_DEFINE_ENUM(a);
193 #define E_(a, b) TRACE_DEFINE_ENUM(a);
194
195 afs_call_traces;
196 afs_fs_operations;
197 afs_vl_operations;
198 afs_edit_dir_ops;
199 afs_edit_dir_reasons;
200
201 /*
202  * Now redefine the EM() and E_() macros to map the enums to the strings that
203  * will be printed in the output.
204  */
205 #undef EM
206 #undef E_
207 #define EM(a, b)        { a, b },
208 #define E_(a, b)        { a, b }
209
210 TRACE_EVENT(afs_receive_data,
211             TP_PROTO(struct afs_call *call, struct iov_iter *iter,
212                      bool want_more, int ret),
213
214             TP_ARGS(call, iter, want_more, ret),
215
216             TP_STRUCT__entry(
217                     __field(loff_t,                     remain          )
218                     __field(unsigned int,               call            )
219                     __field(enum afs_call_state,        state           )
220                     __field(unsigned short,             unmarshall      )
221                     __field(bool,                       want_more       )
222                     __field(int,                        ret             )
223                              ),
224
225             TP_fast_assign(
226                     __entry->call       = call->debug_id;
227                     __entry->state      = call->state;
228                     __entry->unmarshall = call->unmarshall;
229                     __entry->remain     = iov_iter_count(iter);
230                     __entry->want_more  = want_more;
231                     __entry->ret        = ret;
232                            ),
233
234             TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
235                       __entry->call,
236                       __entry->remain,
237                       __entry->unmarshall,
238                       __entry->want_more,
239                       __entry->state,
240                       __entry->ret)
241             );
242
243 TRACE_EVENT(afs_notify_call,
244             TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call),
245
246             TP_ARGS(rxcall, call),
247
248             TP_STRUCT__entry(
249                     __field(unsigned int,               call            )
250                     __field(enum afs_call_state,        state           )
251                     __field(unsigned short,             unmarshall      )
252                              ),
253
254             TP_fast_assign(
255                     __entry->call       = call->debug_id;
256                     __entry->state      = call->state;
257                     __entry->unmarshall = call->unmarshall;
258                            ),
259
260             TP_printk("c=%08x s=%u u=%u",
261                       __entry->call,
262                       __entry->state, __entry->unmarshall)
263             );
264
265 TRACE_EVENT(afs_cb_call,
266             TP_PROTO(struct afs_call *call),
267
268             TP_ARGS(call),
269
270             TP_STRUCT__entry(
271                     __field(unsigned int,               call            )
272                     __field(const char *,               name            )
273                     __field(u32,                        op              )
274                              ),
275
276             TP_fast_assign(
277                     __entry->call       = call->debug_id;
278                     __entry->name       = call->type->name;
279                     __entry->op         = call->operation_ID;
280                            ),
281
282             TP_printk("c=%08x %s o=%u",
283                       __entry->call,
284                       __entry->name,
285                       __entry->op)
286             );
287
288 TRACE_EVENT(afs_call,
289             TP_PROTO(struct afs_call *call, enum afs_call_trace op,
290                      int usage, int outstanding, const void *where),
291
292             TP_ARGS(call, op, usage, outstanding, where),
293
294             TP_STRUCT__entry(
295                     __field(unsigned int,               call            )
296                     __field(int,                        op              )
297                     __field(int,                        usage           )
298                     __field(int,                        outstanding     )
299                     __field(const void *,               where           )
300                              ),
301
302             TP_fast_assign(
303                     __entry->call = call->debug_id;
304                     __entry->op = op;
305                     __entry->usage = usage;
306                     __entry->outstanding = outstanding;
307                     __entry->where = where;
308                            ),
309
310             TP_printk("c=%08x %s u=%d o=%d sp=%pSR",
311                       __entry->call,
312                       __print_symbolic(__entry->op, afs_call_traces),
313                       __entry->usage,
314                       __entry->outstanding,
315                       __entry->where)
316             );
317
318 TRACE_EVENT(afs_make_fs_call,
319             TP_PROTO(struct afs_call *call, const struct afs_fid *fid),
320
321             TP_ARGS(call, fid),
322
323             TP_STRUCT__entry(
324                     __field(unsigned int,               call            )
325                     __field(enum afs_fs_operation,      op              )
326                     __field_struct(struct afs_fid,      fid             )
327                              ),
328
329             TP_fast_assign(
330                     __entry->call = call->debug_id;
331                     __entry->op = call->operation_ID;
332                     if (fid) {
333                             __entry->fid = *fid;
334                     } else {
335                             __entry->fid.vid = 0;
336                             __entry->fid.vnode = 0;
337                             __entry->fid.unique = 0;
338                     }
339                            ),
340
341             TP_printk("c=%08x %06x:%06x:%06x %s",
342                       __entry->call,
343                       __entry->fid.vid,
344                       __entry->fid.vnode,
345                       __entry->fid.unique,
346                       __print_symbolic(__entry->op, afs_fs_operations))
347             );
348
349 TRACE_EVENT(afs_make_vl_call,
350             TP_PROTO(struct afs_call *call),
351
352             TP_ARGS(call),
353
354             TP_STRUCT__entry(
355                     __field(unsigned int,               call            )
356                     __field(enum afs_vl_operation,      op              )
357                              ),
358
359             TP_fast_assign(
360                     __entry->call = call->debug_id;
361                     __entry->op = call->operation_ID;
362                            ),
363
364             TP_printk("c=%08x %s",
365                       __entry->call,
366                       __print_symbolic(__entry->op, afs_vl_operations))
367             );
368
369 TRACE_EVENT(afs_call_done,
370             TP_PROTO(struct afs_call *call),
371
372             TP_ARGS(call),
373
374             TP_STRUCT__entry(
375                     __field(unsigned int,               call            )
376                     __field(struct rxrpc_call *,        rx_call         )
377                     __field(int,                        ret             )
378                     __field(u32,                        abort_code      )
379                              ),
380
381             TP_fast_assign(
382                     __entry->call = call->debug_id;
383                     __entry->rx_call = call->rxcall;
384                     __entry->ret = call->error;
385                     __entry->abort_code = call->abort_code;
386                            ),
387
388             TP_printk("   c=%08x ret=%d ab=%d [%p]",
389                       __entry->call,
390                       __entry->ret,
391                       __entry->abort_code,
392                       __entry->rx_call)
393             );
394
395 TRACE_EVENT(afs_send_pages,
396             TP_PROTO(struct afs_call *call, struct msghdr *msg,
397                      pgoff_t first, pgoff_t last, unsigned int offset),
398
399             TP_ARGS(call, msg, first, last, offset),
400
401             TP_STRUCT__entry(
402                     __field(unsigned int,               call            )
403                     __field(pgoff_t,                    first           )
404                     __field(pgoff_t,                    last            )
405                     __field(unsigned int,               nr              )
406                     __field(unsigned int,               bytes           )
407                     __field(unsigned int,               offset          )
408                     __field(unsigned int,               flags           )
409                              ),
410
411             TP_fast_assign(
412                     __entry->call = call->debug_id;
413                     __entry->first = first;
414                     __entry->last = last;
415                     __entry->nr = msg->msg_iter.nr_segs;
416                     __entry->bytes = msg->msg_iter.count;
417                     __entry->offset = offset;
418                     __entry->flags = msg->msg_flags;
419                            ),
420
421             TP_printk(" c=%08x %lx-%lx-%lx b=%x o=%x f=%x",
422                       __entry->call,
423                       __entry->first, __entry->first + __entry->nr - 1, __entry->last,
424                       __entry->bytes, __entry->offset,
425                       __entry->flags)
426             );
427
428 TRACE_EVENT(afs_sent_pages,
429             TP_PROTO(struct afs_call *call, pgoff_t first, pgoff_t last,
430                      pgoff_t cursor, int ret),
431
432             TP_ARGS(call, first, last, cursor, ret),
433
434             TP_STRUCT__entry(
435                     __field(unsigned int,               call            )
436                     __field(pgoff_t,                    first           )
437                     __field(pgoff_t,                    last            )
438                     __field(pgoff_t,                    cursor          )
439                     __field(int,                        ret             )
440                              ),
441
442             TP_fast_assign(
443                     __entry->call = call->debug_id;
444                     __entry->first = first;
445                     __entry->last = last;
446                     __entry->cursor = cursor;
447                     __entry->ret = ret;
448                            ),
449
450             TP_printk(" c=%08x %lx-%lx c=%lx r=%d",
451                       __entry->call,
452                       __entry->first, __entry->last,
453                       __entry->cursor, __entry->ret)
454             );
455
456 TRACE_EVENT(afs_dir_check_failed,
457             TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size),
458
459             TP_ARGS(vnode, off, i_size),
460
461             TP_STRUCT__entry(
462                     __field(struct afs_vnode *,         vnode           )
463                     __field(loff_t,                     off             )
464                     __field(loff_t,                     i_size          )
465                              ),
466
467             TP_fast_assign(
468                     __entry->vnode = vnode;
469                     __entry->off = off;
470                     __entry->i_size = i_size;
471                            ),
472
473             TP_printk("vn=%p %llx/%llx",
474                       __entry->vnode, __entry->off, __entry->i_size)
475             );
476
477 /*
478  * We use page->private to hold the amount of the page that we've written to,
479  * splitting the field into two parts.  However, we need to represent a range
480  * 0...PAGE_SIZE inclusive, so we can't support 64K pages on a 32-bit system.
481  */
482 #if PAGE_SIZE > 32768
483 #define AFS_PRIV_MAX    0xffffffff
484 #define AFS_PRIV_SHIFT  32
485 #else
486 #define AFS_PRIV_MAX    0xffff
487 #define AFS_PRIV_SHIFT  16
488 #endif
489
490 TRACE_EVENT(afs_page_dirty,
491             TP_PROTO(struct afs_vnode *vnode, const char *where,
492                      pgoff_t page, unsigned long priv),
493
494             TP_ARGS(vnode, where, page, priv),
495
496             TP_STRUCT__entry(
497                     __field(struct afs_vnode *,         vnode           )
498                     __field(const char *,               where           )
499                     __field(pgoff_t,                    page            )
500                     __field(unsigned long,              priv            )
501                              ),
502
503             TP_fast_assign(
504                     __entry->vnode = vnode;
505                     __entry->where = where;
506                     __entry->page = page;
507                     __entry->priv = priv;
508                            ),
509
510             TP_printk("vn=%p %lx %s %lu-%lu",
511                       __entry->vnode, __entry->page, __entry->where,
512                       __entry->priv & AFS_PRIV_MAX,
513                       __entry->priv >> AFS_PRIV_SHIFT)
514             );
515
516 TRACE_EVENT(afs_call_state,
517             TP_PROTO(struct afs_call *call,
518                      enum afs_call_state from,
519                      enum afs_call_state to,
520                      int ret, u32 remote_abort),
521
522             TP_ARGS(call, from, to, ret, remote_abort),
523
524             TP_STRUCT__entry(
525                     __field(unsigned int,               call            )
526                     __field(enum afs_call_state,        from            )
527                     __field(enum afs_call_state,        to              )
528                     __field(int,                        ret             )
529                     __field(u32,                        abort           )
530                              ),
531
532             TP_fast_assign(
533                     __entry->call = call->debug_id;
534                     __entry->from = from;
535                     __entry->to = to;
536                     __entry->ret = ret;
537                     __entry->abort = remote_abort;
538                            ),
539
540             TP_printk("c=%08x %u->%u r=%d ab=%d",
541                       __entry->call,
542                       __entry->from, __entry->to,
543                       __entry->ret, __entry->abort)
544             );
545
546 TRACE_EVENT(afs_edit_dir,
547             TP_PROTO(struct afs_vnode *dvnode,
548                      enum afs_edit_dir_reason why,
549                      enum afs_edit_dir_op op,
550                      unsigned int block,
551                      unsigned int slot,
552                      unsigned int f_vnode,
553                      unsigned int f_unique,
554                      const char *name),
555
556             TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name),
557
558             TP_STRUCT__entry(
559                     __field(unsigned int,               vnode           )
560                     __field(unsigned int,               unique          )
561                     __field(enum afs_edit_dir_reason,   why             )
562                     __field(enum afs_edit_dir_op,       op              )
563                     __field(unsigned int,               block           )
564                     __field(unsigned short,             slot            )
565                     __field(unsigned int,               f_vnode         )
566                     __field(unsigned int,               f_unique        )
567                     __array(char,                       name, 18        )
568                              ),
569
570             TP_fast_assign(
571                     int __len = strlen(name);
572                     __len = min(__len, 17);
573                     __entry->vnode      = dvnode->fid.vnode;
574                     __entry->unique     = dvnode->fid.unique;
575                     __entry->why        = why;
576                     __entry->op         = op;
577                     __entry->block      = block;
578                     __entry->slot       = slot;
579                     __entry->f_vnode    = f_vnode;
580                     __entry->f_unique   = f_unique;
581                     memcpy(__entry->name, name, __len);
582                     __entry->name[__len] = 0;
583                            ),
584
585             TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x %s",
586                       __entry->vnode, __entry->unique,
587                       __print_symbolic(__entry->why, afs_edit_dir_reasons),
588                       __print_symbolic(__entry->op, afs_edit_dir_ops),
589                       __entry->block, __entry->slot,
590                       __entry->f_vnode, __entry->f_unique,
591                       __entry->name)
592             );
593
594 TRACE_EVENT(afs_protocol_error,
595             TP_PROTO(struct afs_call *call, int error, enum afs_eproto_cause cause),
596
597             TP_ARGS(call, error, cause),
598
599             TP_STRUCT__entry(
600                     __field(unsigned int,               call            )
601                     __field(int,                        error           )
602                     __field(enum afs_eproto_cause,      cause           )
603                              ),
604
605             TP_fast_assign(
606                     __entry->call = call ? call->debug_id : 0;
607                     __entry->error = error;
608                     __entry->cause = cause;
609                            ),
610
611             TP_printk("c=%08x r=%d %s",
612                       __entry->call, __entry->error,
613                       __print_symbolic(__entry->cause, afs_eproto_causes))
614             );
615
616 TRACE_EVENT(afs_cm_no_server,
617             TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx),
618
619             TP_ARGS(call, srx),
620
621             TP_STRUCT__entry(
622                     __field(unsigned int,                       call    )
623                     __field(unsigned int,                       op_id   )
624                     __field_struct(struct sockaddr_rxrpc,       srx     )
625                              ),
626
627             TP_fast_assign(
628                     __entry->call = call->debug_id;
629                     __entry->op_id = call->operation_ID;
630                     memcpy(&__entry->srx, srx, sizeof(__entry->srx));
631                            ),
632
633             TP_printk("c=%08x op=%u %pISpc",
634                       __entry->call, __entry->op_id, &__entry->srx.transport)
635             );
636
637 TRACE_EVENT(afs_cm_no_server_u,
638             TP_PROTO(struct afs_call *call, const uuid_t *uuid),
639
640             TP_ARGS(call, uuid),
641
642             TP_STRUCT__entry(
643                     __field(unsigned int,                       call    )
644                     __field(unsigned int,                       op_id   )
645                     __field_struct(uuid_t,                      uuid    )
646                              ),
647
648             TP_fast_assign(
649                     __entry->call = call->debug_id;
650                     __entry->op_id = call->operation_ID;
651                     memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid));
652                            ),
653
654             TP_printk("c=%08x op=%u %pU",
655                       __entry->call, __entry->op_id, &__entry->uuid)
656             );
657
658 #endif /* _TRACE_AFS_H */
659
660 /* This part must be outside protection */
661 #include <trace/define_trace.h>