3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
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.
12 #define TRACE_SYSTEM afs
14 #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ)
17 #include <linux/tracepoint.h>
20 * Define enums for tracing information.
22 #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
23 #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
34 enum afs_fs_operation {
35 afs_FS_FetchData = 130, /* AFS Fetch file data */
36 afs_FS_FetchStatus = 132, /* AFS Fetch file status */
37 afs_FS_StoreData = 133, /* AFS Store file data */
38 afs_FS_StoreStatus = 135, /* AFS Store file status */
39 afs_FS_RemoveFile = 136, /* AFS Remove a file */
40 afs_FS_CreateFile = 137, /* AFS Create a file */
41 afs_FS_Rename = 138, /* AFS Rename or move a file or directory */
42 afs_FS_Symlink = 139, /* AFS Create a symbolic link */
43 afs_FS_Link = 140, /* AFS Create a hard link */
44 afs_FS_MakeDir = 141, /* AFS Create a directory */
45 afs_FS_RemoveDir = 142, /* AFS Remove a directory */
46 afs_FS_GetVolumeInfo = 148, /* AFS Get information about a volume */
47 afs_FS_GetVolumeStatus = 149, /* AFS Get volume status information */
48 afs_FS_GetRootVolume = 151, /* AFS Get root volume name */
49 afs_FS_SetLock = 156, /* AFS Request a file lock */
50 afs_FS_ExtendLock = 157, /* AFS Extend a file lock */
51 afs_FS_ReleaseLock = 158, /* AFS Release a file lock */
52 afs_FS_Lookup = 161, /* AFS lookup file in directory */
53 afs_FS_InlineBulkStatus = 65536, /* AFS Fetch multiple file statuses with errors */
54 afs_FS_FetchData64 = 65537, /* AFS Fetch file data */
55 afs_FS_StoreData64 = 65538, /* AFS Store file data */
56 afs_FS_GiveUpAllCallBacks = 65539, /* AFS Give up all our callbacks on a server */
57 afs_FS_GetCapabilities = 65540, /* AFS Get FS server capabilities */
59 yfs_FS_FetchData = 130, /* YFS Fetch file data */
60 yfs_FS_FetchACL = 64131, /* YFS Fetch file ACL */
61 yfs_FS_FetchStatus = 64132, /* YFS Fetch file status */
62 yfs_FS_StoreACL = 64134, /* YFS Store file ACL */
63 yfs_FS_StoreStatus = 64135, /* YFS Store file status */
64 yfs_FS_RemoveFile = 64136, /* YFS Remove a file */
65 yfs_FS_CreateFile = 64137, /* YFS Create a file */
66 yfs_FS_Rename = 64138, /* YFS Rename or move a file or directory */
67 yfs_FS_Symlink = 64139, /* YFS Create a symbolic link */
68 yfs_FS_Link = 64140, /* YFS Create a hard link */
69 yfs_FS_MakeDir = 64141, /* YFS Create a directory */
70 yfs_FS_RemoveDir = 64142, /* YFS Remove a directory */
71 yfs_FS_GetVolumeStatus = 64149, /* YFS Get volume status information */
72 yfs_FS_SetVolumeStatus = 64150, /* YFS Set volume status information */
73 yfs_FS_SetLock = 64156, /* YFS Request a file lock */
74 yfs_FS_ExtendLock = 64157, /* YFS Extend a file lock */
75 yfs_FS_ReleaseLock = 64158, /* YFS Release a file lock */
76 yfs_FS_Lookup = 64161, /* YFS lookup file in directory */
77 yfs_FS_FlushCPS = 64165,
78 yfs_FS_FetchOpaqueACL = 64168,
79 yfs_FS_WhoAmI = 64170,
80 yfs_FS_RemoveACL = 64171,
81 yfs_FS_RemoveFile2 = 64173,
82 yfs_FS_StoreOpaqueACL2 = 64174,
83 yfs_FS_InlineBulkStatus = 64536, /* YFS Fetch multiple file statuses with errors */
84 yfs_FS_FetchData64 = 64537, /* YFS Fetch file data */
85 yfs_FS_StoreData64 = 64538, /* YFS Store file data */
86 yfs_FS_UpdateSymlink = 64540,
89 enum afs_vl_operation {
90 afs_VL_GetEntryByNameU = 527, /* AFS Get Vol Entry By Name operation ID */
91 afs_VL_GetAddrsU = 533, /* AFS Get FS server addresses */
92 afs_YFSVL_GetEndpoints = 64002, /* YFS Get FS & Vol server addresses */
93 afs_VL_GetCapabilities = 65537, /* AFS Get VL server capabilities */
96 enum afs_edit_dir_op {
98 afs_edit_dir_create_error,
99 afs_edit_dir_create_inval,
100 afs_edit_dir_create_nospc,
102 afs_edit_dir_delete_error,
103 afs_edit_dir_delete_inval,
104 afs_edit_dir_delete_noent,
107 enum afs_edit_dir_reason {
108 afs_edit_dir_for_create,
109 afs_edit_dir_for_link,
110 afs_edit_dir_for_mkdir,
111 afs_edit_dir_for_rename,
112 afs_edit_dir_for_rmdir,
113 afs_edit_dir_for_symlink,
114 afs_edit_dir_for_unlink,
117 enum afs_eproto_cause {
118 afs_eproto_bad_status,
120 afs_eproto_cb_fid_count,
121 afs_eproto_file_type,
122 afs_eproto_ibulkst_cb_count,
123 afs_eproto_ibulkst_count,
125 afs_eproto_offline_msg_len,
126 afs_eproto_volname_len,
127 afs_eproto_yvl_fsendpt4_len,
128 afs_eproto_yvl_fsendpt6_len,
129 afs_eproto_yvl_fsendpt_num,
130 afs_eproto_yvl_fsendpt_type,
131 afs_eproto_yvl_vlendpt4_len,
132 afs_eproto_yvl_vlendpt6_len,
133 afs_eproto_yvl_vlendpt_type,
137 afs_io_error_cm_reply,
138 afs_io_error_extract,
139 afs_io_error_fs_probe_fail,
140 afs_io_error_vl_lookup_fail,
141 afs_io_error_vl_probe_fail,
144 enum afs_file_error {
145 afs_file_error_dir_bad_magic,
146 afs_file_error_dir_big,
147 afs_file_error_dir_missing_page,
148 afs_file_error_dir_over_end,
149 afs_file_error_dir_small,
150 afs_file_error_dir_unmarked_ext,
151 afs_file_error_mntpt,
152 afs_file_error_writeback_fail,
155 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
158 * Declare tracing information enums and their string mappings for display.
160 #define afs_call_traces \
161 EM(afs_call_trace_alloc, "ALLOC") \
162 EM(afs_call_trace_free, "FREE ") \
163 EM(afs_call_trace_get, "GET ") \
164 EM(afs_call_trace_put, "PUT ") \
165 EM(afs_call_trace_wake, "WAKE ") \
166 E_(afs_call_trace_work, "WORK ")
168 #define afs_fs_operations \
169 EM(afs_FS_FetchData, "FS.FetchData") \
170 EM(afs_FS_FetchStatus, "FS.FetchStatus") \
171 EM(afs_FS_StoreData, "FS.StoreData") \
172 EM(afs_FS_StoreStatus, "FS.StoreStatus") \
173 EM(afs_FS_RemoveFile, "FS.RemoveFile") \
174 EM(afs_FS_CreateFile, "FS.CreateFile") \
175 EM(afs_FS_Rename, "FS.Rename") \
176 EM(afs_FS_Symlink, "FS.Symlink") \
177 EM(afs_FS_Link, "FS.Link") \
178 EM(afs_FS_MakeDir, "FS.MakeDir") \
179 EM(afs_FS_RemoveDir, "FS.RemoveDir") \
180 EM(afs_FS_GetVolumeInfo, "FS.GetVolumeInfo") \
181 EM(afs_FS_GetVolumeStatus, "FS.GetVolumeStatus") \
182 EM(afs_FS_GetRootVolume, "FS.GetRootVolume") \
183 EM(afs_FS_SetLock, "FS.SetLock") \
184 EM(afs_FS_ExtendLock, "FS.ExtendLock") \
185 EM(afs_FS_ReleaseLock, "FS.ReleaseLock") \
186 EM(afs_FS_Lookup, "FS.Lookup") \
187 EM(afs_FS_InlineBulkStatus, "FS.InlineBulkStatus") \
188 EM(afs_FS_FetchData64, "FS.FetchData64") \
189 EM(afs_FS_StoreData64, "FS.StoreData64") \
190 EM(afs_FS_GiveUpAllCallBacks, "FS.GiveUpAllCallBacks") \
191 EM(afs_FS_GetCapabilities, "FS.GetCapabilities") \
192 EM(yfs_FS_FetchACL, "YFS.FetchACL") \
193 EM(yfs_FS_FetchStatus, "YFS.FetchStatus") \
194 EM(yfs_FS_StoreACL, "YFS.StoreACL") \
195 EM(yfs_FS_StoreStatus, "YFS.StoreStatus") \
196 EM(yfs_FS_RemoveFile, "YFS.RemoveFile") \
197 EM(yfs_FS_CreateFile, "YFS.CreateFile") \
198 EM(yfs_FS_Rename, "YFS.Rename") \
199 EM(yfs_FS_Symlink, "YFS.Symlink") \
200 EM(yfs_FS_Link, "YFS.Link") \
201 EM(yfs_FS_MakeDir, "YFS.MakeDir") \
202 EM(yfs_FS_RemoveDir, "YFS.RemoveDir") \
203 EM(yfs_FS_GetVolumeStatus, "YFS.GetVolumeStatus") \
204 EM(yfs_FS_SetVolumeStatus, "YFS.SetVolumeStatus") \
205 EM(yfs_FS_SetLock, "YFS.SetLock") \
206 EM(yfs_FS_ExtendLock, "YFS.ExtendLock") \
207 EM(yfs_FS_ReleaseLock, "YFS.ReleaseLock") \
208 EM(yfs_FS_Lookup, "YFS.Lookup") \
209 EM(yfs_FS_FlushCPS, "YFS.FlushCPS") \
210 EM(yfs_FS_FetchOpaqueACL, "YFS.FetchOpaqueACL") \
211 EM(yfs_FS_WhoAmI, "YFS.WhoAmI") \
212 EM(yfs_FS_RemoveACL, "YFS.RemoveACL") \
213 EM(yfs_FS_RemoveFile2, "YFS.RemoveFile2") \
214 EM(yfs_FS_StoreOpaqueACL2, "YFS.StoreOpaqueACL2") \
215 EM(yfs_FS_InlineBulkStatus, "YFS.InlineBulkStatus") \
216 EM(yfs_FS_FetchData64, "YFS.FetchData64") \
217 EM(yfs_FS_StoreData64, "YFS.StoreData64") \
218 E_(yfs_FS_UpdateSymlink, "YFS.UpdateSymlink")
220 #define afs_vl_operations \
221 EM(afs_VL_GetEntryByNameU, "VL.GetEntryByNameU") \
222 EM(afs_VL_GetAddrsU, "VL.GetAddrsU") \
223 EM(afs_YFSVL_GetEndpoints, "YFSVL.GetEndpoints") \
224 E_(afs_VL_GetCapabilities, "VL.GetCapabilities")
226 #define afs_edit_dir_ops \
227 EM(afs_edit_dir_create, "create") \
228 EM(afs_edit_dir_create_error, "c_fail") \
229 EM(afs_edit_dir_create_inval, "c_invl") \
230 EM(afs_edit_dir_create_nospc, "c_nspc") \
231 EM(afs_edit_dir_delete, "delete") \
232 EM(afs_edit_dir_delete_error, "d_err ") \
233 EM(afs_edit_dir_delete_inval, "d_invl") \
234 E_(afs_edit_dir_delete_noent, "d_nent")
236 #define afs_edit_dir_reasons \
237 EM(afs_edit_dir_for_create, "Create") \
238 EM(afs_edit_dir_for_link, "Link ") \
239 EM(afs_edit_dir_for_mkdir, "MkDir ") \
240 EM(afs_edit_dir_for_rename, "Rename") \
241 EM(afs_edit_dir_for_rmdir, "RmDir ") \
242 EM(afs_edit_dir_for_symlink, "Symlnk") \
243 E_(afs_edit_dir_for_unlink, "Unlink")
245 #define afs_eproto_causes \
246 EM(afs_eproto_bad_status, "BadStatus") \
247 EM(afs_eproto_cb_count, "CbCount") \
248 EM(afs_eproto_cb_fid_count, "CbFidCount") \
249 EM(afs_eproto_file_type, "FileTYpe") \
250 EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \
251 EM(afs_eproto_ibulkst_count, "IBS.FidCount") \
252 EM(afs_eproto_motd_len, "MotdLen") \
253 EM(afs_eproto_offline_msg_len, "OfflineMsgLen") \
254 EM(afs_eproto_volname_len, "VolNameLen") \
255 EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \
256 EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \
257 EM(afs_eproto_yvl_fsendpt_num, "YVL.FsEndCount") \
258 EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \
259 EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \
260 EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \
261 E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType")
263 #define afs_io_errors \
264 EM(afs_io_error_cm_reply, "CM_REPLY") \
265 EM(afs_io_error_extract, "EXTRACT") \
266 EM(afs_io_error_fs_probe_fail, "FS_PROBE_FAIL") \
267 EM(afs_io_error_vl_lookup_fail, "VL_LOOKUP_FAIL") \
268 E_(afs_io_error_vl_probe_fail, "VL_PROBE_FAIL")
270 #define afs_file_errors \
271 EM(afs_file_error_dir_bad_magic, "DIR_BAD_MAGIC") \
272 EM(afs_file_error_dir_big, "DIR_BIG") \
273 EM(afs_file_error_dir_missing_page, "DIR_MISSING_PAGE") \
274 EM(afs_file_error_dir_over_end, "DIR_ENT_OVER_END") \
275 EM(afs_file_error_dir_small, "DIR_SMALL") \
276 EM(afs_file_error_dir_unmarked_ext, "DIR_UNMARKED_EXT") \
277 EM(afs_file_error_mntpt, "MNTPT_READ_FAILED") \
278 E_(afs_file_error_writeback_fail, "WRITEBACK_FAILED")
281 * Export enum symbols via userspace.
285 #define EM(a, b) TRACE_DEFINE_ENUM(a);
286 #define E_(a, b) TRACE_DEFINE_ENUM(a);
292 afs_edit_dir_reasons;
298 * Now redefine the EM() and E_() macros to map the enums to the strings that
299 * will be printed in the output.
303 #define EM(a, b) { a, b },
304 #define E_(a, b) { a, b }
306 TRACE_EVENT(afs_receive_data,
307 TP_PROTO(struct afs_call *call, struct iov_iter *iter,
308 bool want_more, int ret),
310 TP_ARGS(call, iter, want_more, ret),
313 __field(loff_t, remain )
314 __field(unsigned int, call )
315 __field(enum afs_call_state, state )
316 __field(unsigned short, unmarshall )
317 __field(bool, want_more )
322 __entry->call = call->debug_id;
323 __entry->state = call->state;
324 __entry->unmarshall = call->unmarshall;
325 __entry->remain = iov_iter_count(iter);
326 __entry->want_more = want_more;
330 TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
339 TRACE_EVENT(afs_notify_call,
340 TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call),
342 TP_ARGS(rxcall, call),
345 __field(unsigned int, call )
346 __field(enum afs_call_state, state )
347 __field(unsigned short, unmarshall )
351 __entry->call = call->debug_id;
352 __entry->state = call->state;
353 __entry->unmarshall = call->unmarshall;
356 TP_printk("c=%08x s=%u u=%u",
358 __entry->state, __entry->unmarshall)
361 TRACE_EVENT(afs_cb_call,
362 TP_PROTO(struct afs_call *call),
367 __field(unsigned int, call )
368 __field(const char *, name )
373 __entry->call = call->debug_id;
374 __entry->name = call->type->name;
375 __entry->op = call->operation_ID;
378 TP_printk("c=%08x %s o=%u",
384 TRACE_EVENT(afs_call,
385 TP_PROTO(struct afs_call *call, enum afs_call_trace op,
386 int usage, int outstanding, const void *where),
388 TP_ARGS(call, op, usage, outstanding, where),
391 __field(unsigned int, call )
394 __field(int, outstanding )
395 __field(const void *, where )
399 __entry->call = call->debug_id;
401 __entry->usage = usage;
402 __entry->outstanding = outstanding;
403 __entry->where = where;
406 TP_printk("c=%08x %s u=%d o=%d sp=%pSR",
408 __print_symbolic(__entry->op, afs_call_traces),
410 __entry->outstanding,
414 TRACE_EVENT(afs_make_fs_call,
415 TP_PROTO(struct afs_call *call, const struct afs_fid *fid),
420 __field(unsigned int, call )
421 __field(enum afs_fs_operation, op )
422 __field_struct(struct afs_fid, fid )
426 __entry->call = call->debug_id;
427 __entry->op = call->operation_ID;
431 __entry->fid.vid = 0;
432 __entry->fid.vnode = 0;
433 __entry->fid.unique = 0;
437 TP_printk("c=%08x %06llx:%06llx:%06x %s",
442 __print_symbolic(__entry->op, afs_fs_operations))
445 TRACE_EVENT(afs_make_vl_call,
446 TP_PROTO(struct afs_call *call),
451 __field(unsigned int, call )
452 __field(enum afs_vl_operation, op )
456 __entry->call = call->debug_id;
457 __entry->op = call->operation_ID;
460 TP_printk("c=%08x %s",
462 __print_symbolic(__entry->op, afs_vl_operations))
465 TRACE_EVENT(afs_call_done,
466 TP_PROTO(struct afs_call *call),
471 __field(unsigned int, call )
472 __field(struct rxrpc_call *, rx_call )
474 __field(u32, abort_code )
478 __entry->call = call->debug_id;
479 __entry->rx_call = call->rxcall;
480 __entry->ret = call->error;
481 __entry->abort_code = call->abort_code;
484 TP_printk(" c=%08x ret=%d ab=%d [%p]",
491 TRACE_EVENT(afs_send_pages,
492 TP_PROTO(struct afs_call *call, struct msghdr *msg,
493 pgoff_t first, pgoff_t last, unsigned int offset),
495 TP_ARGS(call, msg, first, last, offset),
498 __field(unsigned int, call )
499 __field(pgoff_t, first )
500 __field(pgoff_t, last )
501 __field(unsigned int, nr )
502 __field(unsigned int, bytes )
503 __field(unsigned int, offset )
504 __field(unsigned int, flags )
508 __entry->call = call->debug_id;
509 __entry->first = first;
510 __entry->last = last;
511 __entry->nr = msg->msg_iter.nr_segs;
512 __entry->bytes = msg->msg_iter.count;
513 __entry->offset = offset;
514 __entry->flags = msg->msg_flags;
517 TP_printk(" c=%08x %lx-%lx-%lx b=%x o=%x f=%x",
519 __entry->first, __entry->first + __entry->nr - 1, __entry->last,
520 __entry->bytes, __entry->offset,
524 TRACE_EVENT(afs_sent_pages,
525 TP_PROTO(struct afs_call *call, pgoff_t first, pgoff_t last,
526 pgoff_t cursor, int ret),
528 TP_ARGS(call, first, last, cursor, ret),
531 __field(unsigned int, call )
532 __field(pgoff_t, first )
533 __field(pgoff_t, last )
534 __field(pgoff_t, cursor )
539 __entry->call = call->debug_id;
540 __entry->first = first;
541 __entry->last = last;
542 __entry->cursor = cursor;
546 TP_printk(" c=%08x %lx-%lx c=%lx r=%d",
548 __entry->first, __entry->last,
549 __entry->cursor, __entry->ret)
552 TRACE_EVENT(afs_dir_check_failed,
553 TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size),
555 TP_ARGS(vnode, off, i_size),
558 __field(struct afs_vnode *, vnode )
559 __field(loff_t, off )
560 __field(loff_t, i_size )
564 __entry->vnode = vnode;
566 __entry->i_size = i_size;
569 TP_printk("vn=%p %llx/%llx",
570 __entry->vnode, __entry->off, __entry->i_size)
574 * We use page->private to hold the amount of the page that we've written to,
575 * splitting the field into two parts. However, we need to represent a range
576 * 0...PAGE_SIZE inclusive, so we can't support 64K pages on a 32-bit system.
578 #if PAGE_SIZE > 32768
579 #define AFS_PRIV_MAX 0xffffffff
580 #define AFS_PRIV_SHIFT 32
582 #define AFS_PRIV_MAX 0xffff
583 #define AFS_PRIV_SHIFT 16
586 TRACE_EVENT(afs_page_dirty,
587 TP_PROTO(struct afs_vnode *vnode, const char *where,
588 pgoff_t page, unsigned long priv),
590 TP_ARGS(vnode, where, page, priv),
593 __field(struct afs_vnode *, vnode )
594 __field(const char *, where )
595 __field(pgoff_t, page )
596 __field(unsigned long, priv )
600 __entry->vnode = vnode;
601 __entry->where = where;
602 __entry->page = page;
603 __entry->priv = priv;
606 TP_printk("vn=%p %lx %s %lu-%lu",
607 __entry->vnode, __entry->page, __entry->where,
608 __entry->priv & AFS_PRIV_MAX,
609 __entry->priv >> AFS_PRIV_SHIFT)
612 TRACE_EVENT(afs_call_state,
613 TP_PROTO(struct afs_call *call,
614 enum afs_call_state from,
615 enum afs_call_state to,
616 int ret, u32 remote_abort),
618 TP_ARGS(call, from, to, ret, remote_abort),
621 __field(unsigned int, call )
622 __field(enum afs_call_state, from )
623 __field(enum afs_call_state, to )
629 __entry->call = call->debug_id;
630 __entry->from = from;
633 __entry->abort = remote_abort;
636 TP_printk("c=%08x %u->%u r=%d ab=%d",
638 __entry->from, __entry->to,
639 __entry->ret, __entry->abort)
642 TRACE_EVENT(afs_edit_dir,
643 TP_PROTO(struct afs_vnode *dvnode,
644 enum afs_edit_dir_reason why,
645 enum afs_edit_dir_op op,
648 unsigned int f_vnode,
649 unsigned int f_unique,
652 TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name),
655 __field(unsigned int, vnode )
656 __field(unsigned int, unique )
657 __field(enum afs_edit_dir_reason, why )
658 __field(enum afs_edit_dir_op, op )
659 __field(unsigned int, block )
660 __field(unsigned short, slot )
661 __field(unsigned int, f_vnode )
662 __field(unsigned int, f_unique )
663 __array(char, name, 18 )
667 int __len = strlen(name);
668 __len = min(__len, 17);
669 __entry->vnode = dvnode->fid.vnode;
670 __entry->unique = dvnode->fid.unique;
673 __entry->block = block;
674 __entry->slot = slot;
675 __entry->f_vnode = f_vnode;
676 __entry->f_unique = f_unique;
677 memcpy(__entry->name, name, __len);
678 __entry->name[__len] = 0;
681 TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x %s",
682 __entry->vnode, __entry->unique,
683 __print_symbolic(__entry->why, afs_edit_dir_reasons),
684 __print_symbolic(__entry->op, afs_edit_dir_ops),
685 __entry->block, __entry->slot,
686 __entry->f_vnode, __entry->f_unique,
690 TRACE_EVENT(afs_protocol_error,
691 TP_PROTO(struct afs_call *call, int error, enum afs_eproto_cause cause),
693 TP_ARGS(call, error, cause),
696 __field(unsigned int, call )
698 __field(enum afs_eproto_cause, cause )
702 __entry->call = call ? call->debug_id : 0;
703 __entry->error = error;
704 __entry->cause = cause;
707 TP_printk("c=%08x r=%d %s",
708 __entry->call, __entry->error,
709 __print_symbolic(__entry->cause, afs_eproto_causes))
712 TRACE_EVENT(afs_io_error,
713 TP_PROTO(unsigned int call, int error, enum afs_io_error where),
715 TP_ARGS(call, error, where),
718 __field(unsigned int, call )
720 __field(enum afs_io_error, where )
724 __entry->call = call;
725 __entry->error = error;
726 __entry->where = where;
729 TP_printk("c=%08x r=%d %s",
730 __entry->call, __entry->error,
731 __print_symbolic(__entry->where, afs_io_errors))
734 TRACE_EVENT(afs_file_error,
735 TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where),
737 TP_ARGS(vnode, error, where),
740 __field_struct(struct afs_fid, fid )
742 __field(enum afs_file_error, where )
746 __entry->fid = vnode->fid;
747 __entry->error = error;
748 __entry->where = where;
751 TP_printk("%llx:%llx:%x r=%d %s",
752 __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
754 __print_symbolic(__entry->where, afs_file_errors))
757 TRACE_EVENT(afs_cm_no_server,
758 TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx),
763 __field(unsigned int, call )
764 __field(unsigned int, op_id )
765 __field_struct(struct sockaddr_rxrpc, srx )
769 __entry->call = call->debug_id;
770 __entry->op_id = call->operation_ID;
771 memcpy(&__entry->srx, srx, sizeof(__entry->srx));
774 TP_printk("c=%08x op=%u %pISpc",
775 __entry->call, __entry->op_id, &__entry->srx.transport)
778 TRACE_EVENT(afs_cm_no_server_u,
779 TP_PROTO(struct afs_call *call, const uuid_t *uuid),
784 __field(unsigned int, call )
785 __field(unsigned int, op_id )
786 __field_struct(uuid_t, uuid )
790 __entry->call = call->debug_id;
791 __entry->op_id = call->operation_ID;
792 memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid));
795 TP_printk("c=%08x op=%u %pU",
796 __entry->call, __entry->op_id, &__entry->uuid)
799 #endif /* _TRACE_AFS_H */
801 /* This part must be outside protection */
802 #include <trace/define_trace.h>