xref: /linux/include/trace/events/afs.h (revision d56239a82e3721d38ff5496f2411bf0cb57ece5c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* AFS tracepoints
3  *
4  * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5  * Written by David Howells (dhowells@redhat.com)
6  */
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM afs
9 
10 #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_AFS_H
12 
13 #include <linux/tracepoint.h>
14 
15 /*
16  * Define enums for tracing information.
17  */
18 #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
19 #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
20 
21 enum afs_fs_operation {
22 	afs_FS_FetchData		= 130,	/* AFS Fetch file data */
23 	afs_FS_FetchACL			= 131,	/* AFS Fetch file ACL */
24 	afs_FS_FetchStatus		= 132,	/* AFS Fetch file status */
25 	afs_FS_StoreData		= 133,	/* AFS Store file data */
26 	afs_FS_StoreACL			= 134,	/* AFS Store file ACL */
27 	afs_FS_StoreStatus		= 135,	/* AFS Store file status */
28 	afs_FS_RemoveFile		= 136,	/* AFS Remove a file */
29 	afs_FS_CreateFile		= 137,	/* AFS Create a file */
30 	afs_FS_Rename			= 138,	/* AFS Rename or move a file or directory */
31 	afs_FS_Symlink			= 139,	/* AFS Create a symbolic link */
32 	afs_FS_Link			= 140,	/* AFS Create a hard link */
33 	afs_FS_MakeDir			= 141,	/* AFS Create a directory */
34 	afs_FS_RemoveDir		= 142,	/* AFS Remove a directory */
35 	afs_FS_GetVolumeInfo		= 148,	/* AFS Get information about a volume */
36 	afs_FS_GetVolumeStatus		= 149,	/* AFS Get volume status information */
37 	afs_FS_GetRootVolume		= 151,	/* AFS Get root volume name */
38 	afs_FS_SetLock			= 156,	/* AFS Request a file lock */
39 	afs_FS_ExtendLock		= 157,	/* AFS Extend a file lock */
40 	afs_FS_ReleaseLock		= 158,	/* AFS Release a file lock */
41 	afs_FS_Lookup			= 161,	/* AFS lookup file in directory */
42 	afs_FS_InlineBulkStatus		= 65536, /* AFS Fetch multiple file statuses with errors */
43 	afs_FS_FetchData64		= 65537, /* AFS Fetch file data */
44 	afs_FS_StoreData64		= 65538, /* AFS Store file data */
45 	afs_FS_GiveUpAllCallBacks	= 65539, /* AFS Give up all our callbacks on a server */
46 	afs_FS_GetCapabilities		= 65540, /* AFS Get FS server capabilities */
47 
48 	yfs_FS_FetchData		= 130,	 /* YFS Fetch file data */
49 	yfs_FS_FetchACL			= 64131, /* YFS Fetch file ACL */
50 	yfs_FS_FetchStatus		= 64132, /* YFS Fetch file status */
51 	yfs_FS_StoreACL			= 64134, /* YFS Store file ACL */
52 	yfs_FS_StoreStatus		= 64135, /* YFS Store file status */
53 	yfs_FS_RemoveFile		= 64136, /* YFS Remove a file */
54 	yfs_FS_CreateFile		= 64137, /* YFS Create a file */
55 	yfs_FS_Rename			= 64138, /* YFS Rename or move a file or directory */
56 	yfs_FS_Symlink			= 64139, /* YFS Create a symbolic link */
57 	yfs_FS_Link			= 64140, /* YFS Create a hard link */
58 	yfs_FS_MakeDir			= 64141, /* YFS Create a directory */
59 	yfs_FS_RemoveDir		= 64142, /* YFS Remove a directory */
60 	yfs_FS_GetVolumeStatus		= 64149, /* YFS Get volume status information */
61 	yfs_FS_SetVolumeStatus		= 64150, /* YFS Set volume status information */
62 	yfs_FS_SetLock			= 64156, /* YFS Request a file lock */
63 	yfs_FS_ExtendLock		= 64157, /* YFS Extend a file lock */
64 	yfs_FS_ReleaseLock		= 64158, /* YFS Release a file lock */
65 	yfs_FS_Lookup			= 64161, /* YFS lookup file in directory */
66 	yfs_FS_FlushCPS			= 64165,
67 	yfs_FS_FetchOpaqueACL		= 64168,
68 	yfs_FS_WhoAmI			= 64170,
69 	yfs_FS_RemoveACL		= 64171,
70 	yfs_FS_RemoveFile2		= 64173,
71 	yfs_FS_StoreOpaqueACL2		= 64174,
72 	yfs_FS_InlineBulkStatus		= 64536, /* YFS Fetch multiple file statuses with errors */
73 	yfs_FS_FetchData64		= 64537, /* YFS Fetch file data */
74 	yfs_FS_StoreData64		= 64538, /* YFS Store file data */
75 	yfs_FS_UpdateSymlink		= 64540,
76 };
77 
78 enum afs_vl_operation {
79 	afs_VL_GetEntryByNameU	= 527,		/* AFS Get Vol Entry By Name operation ID */
80 	afs_VL_GetAddrsU	= 533,		/* AFS Get FS server addresses */
81 	afs_YFSVL_GetEndpoints	= 64002,	/* YFS Get FS & Vol server addresses */
82 	afs_YFSVL_GetCellName	= 64014,	/* YFS Get actual cell name */
83 	afs_VL_GetCapabilities	= 65537,	/* AFS Get VL server capabilities */
84 };
85 
86 enum afs_cm_operation {
87 	afs_CB_CallBack			= 204,	/* AFS break callback promises */
88 	afs_CB_InitCallBackState	= 205,	/* AFS initialise callback state */
89 	afs_CB_Probe			= 206,	/* AFS probe client */
90 	afs_CB_GetLock			= 207,	/* AFS get contents of CM lock table */
91 	afs_CB_GetCE			= 208,	/* AFS get cache file description */
92 	afs_CB_GetXStatsVersion		= 209,	/* AFS get version of extended statistics */
93 	afs_CB_GetXStats		= 210,	/* AFS get contents of extended statistics data */
94 	afs_CB_InitCallBackState3	= 213,	/* AFS initialise callback state, version 3 */
95 	afs_CB_ProbeUuid		= 214,	/* AFS check the client hasn't rebooted */
96 };
97 
98 enum yfs_cm_operation {
99 	yfs_CB_Probe			= 206,	/* YFS probe client */
100 	yfs_CB_GetLock			= 207,	/* YFS get contents of CM lock table */
101 	yfs_CB_XStatsVersion		= 209,	/* YFS get version of extended statistics */
102 	yfs_CB_GetXStats		= 210,	/* YFS get contents of extended statistics data */
103 	yfs_CB_InitCallBackState3	= 213,	/* YFS initialise callback state, version 3 */
104 	yfs_CB_ProbeUuid		= 214,	/* YFS check the client hasn't rebooted */
105 	yfs_CB_GetServerPrefs		= 215,
106 	yfs_CB_GetCellServDV		= 216,
107 	yfs_CB_GetLocalCell		= 217,
108 	yfs_CB_GetCacheConfig		= 218,
109 	yfs_CB_GetCellByNum		= 65537,
110 	yfs_CB_TellMeAboutYourself	= 65538, /* get client capabilities */
111 	yfs_CB_CallBack			= 64204,
112 };
113 
114 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
115 
116 /*
117  * Declare tracing information enums and their string mappings for display.
118  */
119 #define afs_call_traces \
120 	EM(afs_call_trace_alloc,		"ALLOC") \
121 	EM(afs_call_trace_free,			"FREE ") \
122 	EM(afs_call_trace_get,			"GET  ") \
123 	EM(afs_call_trace_put,			"PUT  ") \
124 	EM(afs_call_trace_wake,			"WAKE ") \
125 	E_(afs_call_trace_work,			"QUEUE")
126 
127 #define afs_server_traces \
128 	EM(afs_server_trace_alloc,		"ALLOC    ") \
129 	EM(afs_server_trace_callback,		"CALLBACK ") \
130 	EM(afs_server_trace_destroy,		"DESTROY  ") \
131 	EM(afs_server_trace_free,		"FREE     ") \
132 	EM(afs_server_trace_gc,			"GC       ") \
133 	EM(afs_server_trace_get_by_addr,	"GET addr ") \
134 	EM(afs_server_trace_get_by_uuid,	"GET uuid ") \
135 	EM(afs_server_trace_get_caps,		"GET caps ") \
136 	EM(afs_server_trace_get_install,	"GET inst ") \
137 	EM(afs_server_trace_get_new_cbi,	"GET cbi  ") \
138 	EM(afs_server_trace_get_probe,		"GET probe") \
139 	EM(afs_server_trace_give_up_cb,		"giveup-cb") \
140 	EM(afs_server_trace_purging,		"PURGE    ") \
141 	EM(afs_server_trace_put_call,		"PUT call ") \
142 	EM(afs_server_trace_put_cbi,		"PUT cbi  ") \
143 	EM(afs_server_trace_put_find_rsq,	"PUT f-rsq") \
144 	EM(afs_server_trace_put_probe,		"PUT probe") \
145 	EM(afs_server_trace_put_slist,		"PUT slist") \
146 	EM(afs_server_trace_put_slist_isort,	"PUT isort") \
147 	EM(afs_server_trace_put_uuid_rsq,	"PUT u-req") \
148 	E_(afs_server_trace_update,		"UPDATE")
149 
150 #define afs_volume_traces \
151 	EM(afs_volume_trace_alloc,		"ALLOC         ") \
152 	EM(afs_volume_trace_free,		"FREE          ") \
153 	EM(afs_volume_trace_get_alloc_sbi,	"GET sbi-alloc ") \
154 	EM(afs_volume_trace_get_callback,	"GET callback  ") \
155 	EM(afs_volume_trace_get_cell_insert,	"GET cell-insrt") \
156 	EM(afs_volume_trace_get_new_op,		"GET op-new    ") \
157 	EM(afs_volume_trace_get_query_alias,	"GET cell-alias") \
158 	EM(afs_volume_trace_put_callback,	"PUT callback  ") \
159 	EM(afs_volume_trace_put_cell_dup,	"PUT cell-dup  ") \
160 	EM(afs_volume_trace_put_cell_root,	"PUT cell-root ") \
161 	EM(afs_volume_trace_put_destroy_sbi,	"PUT sbi-destry") \
162 	EM(afs_volume_trace_put_free_fc,	"PUT fc-free   ") \
163 	EM(afs_volume_trace_put_put_op,		"PUT op-put    ") \
164 	EM(afs_volume_trace_put_query_alias,	"PUT cell-alias") \
165 	EM(afs_volume_trace_put_validate_fc,	"PUT fc-validat") \
166 	E_(afs_volume_trace_remove,		"REMOVE        ")
167 
168 #define afs_cell_traces \
169 	EM(afs_cell_trace_alloc,		"ALLOC     ") \
170 	EM(afs_cell_trace_free,			"FREE      ") \
171 	EM(afs_cell_trace_get_queue_dns,	"GET q-dns ") \
172 	EM(afs_cell_trace_get_queue_manage,	"GET q-mng ") \
173 	EM(afs_cell_trace_get_queue_new,	"GET q-new ") \
174 	EM(afs_cell_trace_get_vol,		"GET vol   ") \
175 	EM(afs_cell_trace_insert,		"INSERT    ") \
176 	EM(afs_cell_trace_manage,		"MANAGE    ") \
177 	EM(afs_cell_trace_put_candidate,	"PUT candid") \
178 	EM(afs_cell_trace_put_destroy,		"PUT destry") \
179 	EM(afs_cell_trace_put_queue_work,	"PUT q-work") \
180 	EM(afs_cell_trace_put_queue_fail,	"PUT q-fail") \
181 	EM(afs_cell_trace_put_vol,		"PUT vol   ") \
182 	EM(afs_cell_trace_see_source,		"SEE source") \
183 	EM(afs_cell_trace_see_ws,		"SEE ws    ") \
184 	EM(afs_cell_trace_unuse_alias,		"UNU alias ") \
185 	EM(afs_cell_trace_unuse_check_alias,	"UNU chk-al") \
186 	EM(afs_cell_trace_unuse_delete,		"UNU delete") \
187 	EM(afs_cell_trace_unuse_fc,		"UNU fc    ") \
188 	EM(afs_cell_trace_unuse_lookup,		"UNU lookup") \
189 	EM(afs_cell_trace_unuse_mntpt,		"UNU mntpt ") \
190 	EM(afs_cell_trace_unuse_no_pin,		"UNU no-pin") \
191 	EM(afs_cell_trace_unuse_parse,		"UNU parse ") \
192 	EM(afs_cell_trace_unuse_pin,		"UNU pin   ") \
193 	EM(afs_cell_trace_unuse_probe,		"UNU probe ") \
194 	EM(afs_cell_trace_unuse_sbi,		"UNU sbi   ") \
195 	EM(afs_cell_trace_unuse_ws,		"UNU ws    ") \
196 	EM(afs_cell_trace_use_alias,		"USE alias ") \
197 	EM(afs_cell_trace_use_check_alias,	"USE chk-al") \
198 	EM(afs_cell_trace_use_fc,		"USE fc    ") \
199 	EM(afs_cell_trace_use_fc_alias,		"USE fc-al ") \
200 	EM(afs_cell_trace_use_lookup,		"USE lookup") \
201 	EM(afs_cell_trace_use_mntpt,		"USE mntpt ") \
202 	EM(afs_cell_trace_use_pin,		"USE pin   ") \
203 	EM(afs_cell_trace_use_probe,		"USE probe ") \
204 	EM(afs_cell_trace_use_sbi,		"USE sbi   ") \
205 	E_(afs_cell_trace_wait,			"WAIT      ")
206 
207 #define afs_alist_traces \
208 	EM(afs_alist_trace_alloc,		"ALLOC     ") \
209 	EM(afs_alist_trace_get_estate,		"GET estate") \
210 	EM(afs_alist_trace_get_vlgetcaps,	"GET vgtcap") \
211 	EM(afs_alist_trace_get_vlprobe,		"GET vprobe") \
212 	EM(afs_alist_trace_get_vlrotate_set,	"GET vl-rot") \
213 	EM(afs_alist_trace_put_estate,		"PUT estate") \
214 	EM(afs_alist_trace_put_getaddru,	"PUT GtAdrU") \
215 	EM(afs_alist_trace_put_parse_empty,	"PUT p-empt") \
216 	EM(afs_alist_trace_put_parse_error,	"PUT p-err ") \
217 	EM(afs_alist_trace_put_server_dup,	"PUT sv-dup") \
218 	EM(afs_alist_trace_put_server_oom,	"PUT sv-oom") \
219 	EM(afs_alist_trace_put_server_update,	"PUT sv-upd") \
220 	EM(afs_alist_trace_put_vlgetcaps,	"PUT vgtcap") \
221 	EM(afs_alist_trace_put_vlprobe,		"PUT vprobe") \
222 	EM(afs_alist_trace_put_vlrotate_end,	"PUT vr-end") \
223 	EM(afs_alist_trace_put_vlrotate_fail,	"PUT vr-fai") \
224 	EM(afs_alist_trace_put_vlrotate_next,	"PUT vr-nxt") \
225 	EM(afs_alist_trace_put_vlrotate_restart,"PUT vr-rst") \
226 	EM(afs_alist_trace_put_vlserver,	"PUT vlsrvr") \
227 	EM(afs_alist_trace_put_vlserver_old,	"PUT vs-old") \
228 	E_(afs_alist_trace_free,		"FREE      ")
229 
230 #define afs_estate_traces \
231 	EM(afs_estate_trace_alloc_probe,	"ALLOC prob") \
232 	EM(afs_estate_trace_alloc_server,	"ALLOC srvr") \
233 	EM(afs_estate_trace_get_server_state,	"GET srv-st") \
234 	EM(afs_estate_trace_get_getcaps,	"GET getcap") \
235 	EM(afs_estate_trace_put_getcaps,	"PUT getcap") \
236 	EM(afs_estate_trace_put_probe,		"PUT probe ") \
237 	EM(afs_estate_trace_put_server,		"PUT server") \
238 	EM(afs_estate_trace_put_server_state,	"PUT srv-st") \
239 	E_(afs_estate_trace_free,		"FREE      ")
240 
241 #define afs_fs_operations \
242 	EM(afs_FS_FetchData,			"FS.FetchData") \
243 	EM(afs_FS_FetchStatus,			"FS.FetchStatus") \
244 	EM(afs_FS_StoreData,			"FS.StoreData") \
245 	EM(afs_FS_StoreStatus,			"FS.StoreStatus") \
246 	EM(afs_FS_RemoveFile,			"FS.RemoveFile") \
247 	EM(afs_FS_CreateFile,			"FS.CreateFile") \
248 	EM(afs_FS_Rename,			"FS.Rename") \
249 	EM(afs_FS_Symlink,			"FS.Symlink") \
250 	EM(afs_FS_Link,				"FS.Link") \
251 	EM(afs_FS_MakeDir,			"FS.MakeDir") \
252 	EM(afs_FS_RemoveDir,			"FS.RemoveDir") \
253 	EM(afs_FS_GetVolumeInfo,		"FS.GetVolumeInfo") \
254 	EM(afs_FS_GetVolumeStatus,		"FS.GetVolumeStatus") \
255 	EM(afs_FS_GetRootVolume,		"FS.GetRootVolume") \
256 	EM(afs_FS_SetLock,			"FS.SetLock") \
257 	EM(afs_FS_ExtendLock,			"FS.ExtendLock") \
258 	EM(afs_FS_ReleaseLock,			"FS.ReleaseLock") \
259 	EM(afs_FS_Lookup,			"FS.Lookup") \
260 	EM(afs_FS_InlineBulkStatus,		"FS.InlineBulkStatus") \
261 	EM(afs_FS_FetchData64,			"FS.FetchData64") \
262 	EM(afs_FS_StoreData64,			"FS.StoreData64") \
263 	EM(afs_FS_GiveUpAllCallBacks,		"FS.GiveUpAllCallBacks") \
264 	EM(afs_FS_GetCapabilities,		"FS.GetCapabilities") \
265 	EM(yfs_FS_FetchACL,			"YFS.FetchACL") \
266 	EM(yfs_FS_FetchStatus,			"YFS.FetchStatus") \
267 	EM(yfs_FS_StoreACL,			"YFS.StoreACL") \
268 	EM(yfs_FS_StoreStatus,			"YFS.StoreStatus") \
269 	EM(yfs_FS_RemoveFile,			"YFS.RemoveFile") \
270 	EM(yfs_FS_CreateFile,			"YFS.CreateFile") \
271 	EM(yfs_FS_Rename,			"YFS.Rename") \
272 	EM(yfs_FS_Symlink,			"YFS.Symlink") \
273 	EM(yfs_FS_Link,				"YFS.Link") \
274 	EM(yfs_FS_MakeDir,			"YFS.MakeDir") \
275 	EM(yfs_FS_RemoveDir,			"YFS.RemoveDir") \
276 	EM(yfs_FS_GetVolumeStatus,		"YFS.GetVolumeStatus") \
277 	EM(yfs_FS_SetVolumeStatus,		"YFS.SetVolumeStatus") \
278 	EM(yfs_FS_SetLock,			"YFS.SetLock") \
279 	EM(yfs_FS_ExtendLock,			"YFS.ExtendLock") \
280 	EM(yfs_FS_ReleaseLock,			"YFS.ReleaseLock") \
281 	EM(yfs_FS_Lookup,			"YFS.Lookup") \
282 	EM(yfs_FS_FlushCPS,			"YFS.FlushCPS") \
283 	EM(yfs_FS_FetchOpaqueACL,		"YFS.FetchOpaqueACL") \
284 	EM(yfs_FS_WhoAmI,			"YFS.WhoAmI") \
285 	EM(yfs_FS_RemoveACL,			"YFS.RemoveACL") \
286 	EM(yfs_FS_RemoveFile2,			"YFS.RemoveFile2") \
287 	EM(yfs_FS_StoreOpaqueACL2,		"YFS.StoreOpaqueACL2") \
288 	EM(yfs_FS_InlineBulkStatus,		"YFS.InlineBulkStatus") \
289 	EM(yfs_FS_FetchData64,			"YFS.FetchData64") \
290 	EM(yfs_FS_StoreData64,			"YFS.StoreData64") \
291 	E_(yfs_FS_UpdateSymlink,		"YFS.UpdateSymlink")
292 
293 #define afs_vl_operations \
294 	EM(afs_VL_GetEntryByNameU,		"VL.GetEntryByNameU") \
295 	EM(afs_VL_GetAddrsU,			"VL.GetAddrsU") \
296 	EM(afs_YFSVL_GetEndpoints,		"YFSVL.GetEndpoints") \
297 	EM(afs_YFSVL_GetCellName,		"YFSVL.GetCellName") \
298 	E_(afs_VL_GetCapabilities,		"VL.GetCapabilities")
299 
300 #define afs_cm_operations \
301 	EM(afs_CB_CallBack,			"CB.CallBack") \
302 	EM(afs_CB_InitCallBackState,		"CB.InitCallBackState") \
303 	EM(afs_CB_Probe,			"CB.Probe") \
304 	EM(afs_CB_GetLock,			"CB.GetLock") \
305 	EM(afs_CB_GetCE,			"CB.GetCE") \
306 	EM(afs_CB_GetXStatsVersion,		"CB.GetXStatsVersion") \
307 	EM(afs_CB_GetXStats,			"CB.GetXStats") \
308 	EM(afs_CB_InitCallBackState3,		"CB.InitCallBackState3") \
309 	E_(afs_CB_ProbeUuid,			"CB.ProbeUuid")
310 
311 #define yfs_cm_operations \
312 	EM(yfs_CB_Probe,			"YFSCB.Probe") \
313 	EM(yfs_CB_GetLock,			"YFSCB.GetLock") \
314 	EM(yfs_CB_XStatsVersion,		"YFSCB.XStatsVersion") \
315 	EM(yfs_CB_GetXStats,			"YFSCB.GetXStats") \
316 	EM(yfs_CB_InitCallBackState3,		"YFSCB.InitCallBackState3") \
317 	EM(yfs_CB_ProbeUuid,			"YFSCB.ProbeUuid") \
318 	EM(yfs_CB_GetServerPrefs,		"YFSCB.GetServerPrefs") \
319 	EM(yfs_CB_GetCellServDV,		"YFSCB.GetCellServDV") \
320 	EM(yfs_CB_GetLocalCell,			"YFSCB.GetLocalCell") \
321 	EM(yfs_CB_GetCacheConfig,		"YFSCB.GetCacheConfig") \
322 	EM(yfs_CB_GetCellByNum,			"YFSCB.GetCellByNum") \
323 	EM(yfs_CB_TellMeAboutYourself,		"YFSCB.TellMeAboutYourself") \
324 	E_(yfs_CB_CallBack,			"YFSCB.CallBack")
325 
326 #define afs_edit_dir_ops				  \
327 	EM(afs_edit_dir_create,			"create") \
328 	EM(afs_edit_dir_create_error,		"c_fail") \
329 	EM(afs_edit_dir_create_inval,		"c_invl") \
330 	EM(afs_edit_dir_create_nospc,		"c_nspc") \
331 	EM(afs_edit_dir_delete,			"delete") \
332 	EM(afs_edit_dir_delete_error,		"d_err ") \
333 	EM(afs_edit_dir_delete_inval,		"d_invl") \
334 	EM(afs_edit_dir_delete_noent,		"d_nent") \
335 	EM(afs_edit_dir_update_dd,		"u_ddot") \
336 	EM(afs_edit_dir_update_error,		"u_fail") \
337 	EM(afs_edit_dir_update_inval,		"u_invl") \
338 	E_(afs_edit_dir_update_nodd,		"u_nodd")
339 
340 #define afs_edit_dir_reasons				  \
341 	EM(afs_edit_dir_for_create,		"Create") \
342 	EM(afs_edit_dir_for_link,		"Link  ") \
343 	EM(afs_edit_dir_for_mkdir,		"MkDir ") \
344 	EM(afs_edit_dir_for_rename_0,		"Renam0") \
345 	EM(afs_edit_dir_for_rename_1,		"Renam1") \
346 	EM(afs_edit_dir_for_rename_2,		"Renam2") \
347 	EM(afs_edit_dir_for_rename_sub,		"RnmSub") \
348 	EM(afs_edit_dir_for_rmdir,		"RmDir ") \
349 	EM(afs_edit_dir_for_silly_0,		"S_Ren0") \
350 	EM(afs_edit_dir_for_silly_1,		"S_Ren1") \
351 	EM(afs_edit_dir_for_symlink,		"Symlnk") \
352 	E_(afs_edit_dir_for_unlink,		"Unlink")
353 
354 #define afs_eproto_causes			\
355 	EM(afs_eproto_bad_status,	"BadStatus") \
356 	EM(afs_eproto_cb_count,		"CbCount") \
357 	EM(afs_eproto_cb_fid_count,	"CbFidCount") \
358 	EM(afs_eproto_cellname_len,	"CellNameLen") \
359 	EM(afs_eproto_file_type,	"FileTYpe") \
360 	EM(afs_eproto_ibulkst_cb_count,	"IBS.CbCount") \
361 	EM(afs_eproto_ibulkst_count,	"IBS.FidCount") \
362 	EM(afs_eproto_motd_len,		"MotdLen") \
363 	EM(afs_eproto_offline_msg_len,	"OfflineMsgLen") \
364 	EM(afs_eproto_volname_len,	"VolNameLen") \
365 	EM(afs_eproto_yvl_fsendpt4_len,	"YVL.FsEnd4Len") \
366 	EM(afs_eproto_yvl_fsendpt6_len,	"YVL.FsEnd6Len") \
367 	EM(afs_eproto_yvl_fsendpt_num,	"YVL.FsEndCount") \
368 	EM(afs_eproto_yvl_fsendpt_type,	"YVL.FsEndType") \
369 	EM(afs_eproto_yvl_vlendpt4_len,	"YVL.VlEnd4Len") \
370 	EM(afs_eproto_yvl_vlendpt6_len,	"YVL.VlEnd6Len") \
371 	E_(afs_eproto_yvl_vlendpt_type,	"YVL.VlEndType")
372 
373 #define afs_io_errors							\
374 	EM(afs_io_error_cm_reply,		"CM_REPLY")		\
375 	EM(afs_io_error_extract,		"EXTRACT")		\
376 	EM(afs_io_error_fs_probe_fail,		"FS_PROBE_FAIL")	\
377 	EM(afs_io_error_vl_lookup_fail,		"VL_LOOKUP_FAIL")	\
378 	E_(afs_io_error_vl_probe_fail,		"VL_PROBE_FAIL")
379 
380 #define afs_file_errors							\
381 	EM(afs_file_error_dir_bad_magic,	"DIR_BAD_MAGIC")	\
382 	EM(afs_file_error_dir_big,		"DIR_BIG")		\
383 	EM(afs_file_error_dir_missing_page,	"DIR_MISSING_PAGE")	\
384 	EM(afs_file_error_dir_name_too_long,	"DIR_NAME_TOO_LONG")	\
385 	EM(afs_file_error_dir_over_end,		"DIR_ENT_OVER_END")	\
386 	EM(afs_file_error_dir_small,		"DIR_SMALL")		\
387 	EM(afs_file_error_dir_unmarked_ext,	"DIR_UNMARKED_EXT")	\
388 	EM(afs_file_error_mntpt,		"MNTPT_READ_FAILED")	\
389 	E_(afs_file_error_writeback_fail,	"WRITEBACK_FAILED")
390 
391 #define afs_flock_types							\
392 	EM(F_RDLCK,				"RDLCK")		\
393 	EM(F_WRLCK,				"WRLCK")		\
394 	E_(F_UNLCK,				"UNLCK")
395 
396 #define afs_flock_states						\
397 	EM(AFS_VNODE_LOCK_NONE,			"NONE")			\
398 	EM(AFS_VNODE_LOCK_WAITING_FOR_CB,	"WAIT_FOR_CB")		\
399 	EM(AFS_VNODE_LOCK_SETTING,		"SETTING")		\
400 	EM(AFS_VNODE_LOCK_GRANTED,		"GRANTED")		\
401 	EM(AFS_VNODE_LOCK_EXTENDING,		"EXTENDING")		\
402 	EM(AFS_VNODE_LOCK_NEED_UNLOCK,		"NEED_UNLOCK")		\
403 	EM(AFS_VNODE_LOCK_UNLOCKING,		"UNLOCKING")		\
404 	E_(AFS_VNODE_LOCK_DELETED,		"DELETED")
405 
406 #define afs_flock_events						\
407 	EM(afs_flock_acquired,			"Acquired")		\
408 	EM(afs_flock_callback_break,		"Callback")		\
409 	EM(afs_flock_defer_unlock,		"D-Unlock")		\
410 	EM(afs_flock_extend_fail,		"Ext_Fail")		\
411 	EM(afs_flock_fail_other,		"ErrOther")		\
412 	EM(afs_flock_fail_perm,			"ErrPerm ")		\
413 	EM(afs_flock_no_lockers,		"NoLocker")		\
414 	EM(afs_flock_release_fail,		"Rel_Fail")		\
415 	EM(afs_flock_silly_delete,		"SillyDel")		\
416 	EM(afs_flock_timestamp,			"Timestmp")		\
417 	EM(afs_flock_try_to_lock,		"TryToLck")		\
418 	EM(afs_flock_vfs_lock,			"VFSLock ")		\
419 	EM(afs_flock_vfs_locking,		"VFSLking")		\
420 	EM(afs_flock_waited,			"Waited  ")		\
421 	EM(afs_flock_waiting,			"Waiting ")		\
422 	EM(afs_flock_work_extending,		"Extendng")		\
423 	EM(afs_flock_work_retry,		"Retry   ")		\
424 	EM(afs_flock_work_unlocking,		"Unlcking")		\
425 	E_(afs_flock_would_block,		"EWOULDBL")
426 
427 #define afs_flock_operations						\
428 	EM(afs_flock_op_copy_lock,		"COPY    ")		\
429 	EM(afs_flock_op_flock,			"->flock ")		\
430 	EM(afs_flock_op_grant,			"GRANT   ")		\
431 	EM(afs_flock_op_lock,			"->lock  ")		\
432 	EM(afs_flock_op_release_lock,		"RELEASE ")		\
433 	EM(afs_flock_op_return_ok,		"<-OK    ")		\
434 	EM(afs_flock_op_return_edeadlk,		"<-EDEADL")		\
435 	EM(afs_flock_op_return_eagain,		"<-EAGAIN")		\
436 	EM(afs_flock_op_return_error,		"<-ERROR ")		\
437 	EM(afs_flock_op_set_lock,		"SET     ")		\
438 	EM(afs_flock_op_unlock,			"UNLOCK  ")		\
439 	E_(afs_flock_op_wake,			"WAKE    ")
440 
441 #define afs_cb_break_reasons						\
442 	EM(afs_cb_break_no_break,		"no-break")		\
443 	EM(afs_cb_break_for_callback,		"break-cb")		\
444 	EM(afs_cb_break_for_creation_regress,	"creation-regress")	\
445 	EM(afs_cb_break_for_deleted,		"break-del")		\
446 	EM(afs_cb_break_for_s_reinit,		"s-reinit")		\
447 	EM(afs_cb_break_for_unlink,		"break-unlink")		\
448 	EM(afs_cb_break_for_update_regress,	"update-regress")	\
449 	EM(afs_cb_break_for_volume_callback,	"break-v-cb")		\
450 	EM(afs_cb_break_for_vos_release,	"break-vos-release")	\
451 	E_(afs_cb_break_volume_excluded,	"vol-excluded")
452 
453 #define afs_rotate_traces						\
454 	EM(afs_rotate_trace_aborted,		"Abortd")		\
455 	EM(afs_rotate_trace_busy_sleep,		"BsySlp")		\
456 	EM(afs_rotate_trace_check_vol_status,	"VolStt")		\
457 	EM(afs_rotate_trace_failed,		"Failed")		\
458 	EM(afs_rotate_trace_iter,		"Iter  ")		\
459 	EM(afs_rotate_trace_iterate_addr,	"ItAddr")		\
460 	EM(afs_rotate_trace_next_server,	"NextSv")		\
461 	EM(afs_rotate_trace_no_more_servers,	"NoMore")		\
462 	EM(afs_rotate_trace_nomem,		"Nomem ")		\
463 	EM(afs_rotate_trace_probe_error,	"PrbErr")		\
464 	EM(afs_rotate_trace_probe_fileserver,	"PrbFsv")		\
465 	EM(afs_rotate_trace_probe_none,		"PrbNon")		\
466 	EM(afs_rotate_trace_probe_response,	"PrbRsp")		\
467 	EM(afs_rotate_trace_probe_superseded,	"PrbSup")		\
468 	EM(afs_rotate_trace_restart,		"Rstart")		\
469 	EM(afs_rotate_trace_retry_server,	"RtrySv")		\
470 	EM(afs_rotate_trace_selected_server,	"SlctSv")		\
471 	EM(afs_rotate_trace_stale_lock,		"StlLck")		\
472 	EM(afs_rotate_trace_start,		"Start ")		\
473 	EM(afs_rotate_trace_stop,		"Stop  ")		\
474 	E_(afs_rotate_trace_stopped,		"Stoppd")
475 
476 /*
477  * Generate enums for tracing information.
478  */
479 #ifndef __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY
480 #define __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY
481 
482 #undef EM
483 #undef E_
484 #define EM(a, b) a,
485 #define E_(a, b) a
486 
487 enum afs_alist_trace		{ afs_alist_traces } __mode(byte);
488 enum afs_call_trace		{ afs_call_traces } __mode(byte);
489 enum afs_cb_break_reason	{ afs_cb_break_reasons } __mode(byte);
490 enum afs_cell_trace		{ afs_cell_traces } __mode(byte);
491 enum afs_edit_dir_op		{ afs_edit_dir_ops } __mode(byte);
492 enum afs_edit_dir_reason	{ afs_edit_dir_reasons } __mode(byte);
493 enum afs_eproto_cause		{ afs_eproto_causes } __mode(byte);
494 enum afs_estate_trace		{ afs_estate_traces } __mode(byte);
495 enum afs_file_error		{ afs_file_errors } __mode(byte);
496 enum afs_flock_event		{ afs_flock_events } __mode(byte);
497 enum afs_flock_operation	{ afs_flock_operations } __mode(byte);
498 enum afs_io_error		{ afs_io_errors } __mode(byte);
499 enum afs_rotate_trace		{ afs_rotate_traces } __mode(byte);
500 enum afs_server_trace		{ afs_server_traces } __mode(byte);
501 enum afs_volume_trace		{ afs_volume_traces } __mode(byte);
502 
503 #endif /* end __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY */
504 
505 /*
506  * Export enum symbols via userspace.
507  */
508 #undef EM
509 #undef E_
510 #define EM(a, b) TRACE_DEFINE_ENUM(a);
511 #define E_(a, b) TRACE_DEFINE_ENUM(a);
512 
513 afs_alist_traces;
514 afs_call_traces;
515 afs_cb_break_reasons;
516 afs_cell_traces;
517 afs_cm_operations;
518 afs_edit_dir_ops;
519 afs_edit_dir_reasons;
520 afs_eproto_causes;
521 afs_estate_traces;
522 afs_file_errors;
523 afs_flock_operations;
524 afs_flock_types;
525 afs_fs_operations;
526 afs_io_errors;
527 afs_rotate_traces;
528 afs_server_traces;
529 afs_vl_operations;
530 yfs_cm_operations;
531 
532 /*
533  * Now redefine the EM() and E_() macros to map the enums to the strings that
534  * will be printed in the output.
535  */
536 #undef EM
537 #undef E_
538 #define EM(a, b)	{ a, b },
539 #define E_(a, b)	{ a, b }
540 
541 TRACE_EVENT(afs_receive_data,
542 	    TP_PROTO(struct afs_call *call, struct iov_iter *iter,
543 		     bool want_more, int ret),
544 
545 	    TP_ARGS(call, iter, want_more, ret),
546 
547 	    TP_STRUCT__entry(
548 		    __field(loff_t,			remain)
549 		    __field(unsigned int,		call)
550 		    __field(enum afs_call_state,	state)
551 		    __field(unsigned short,		unmarshall)
552 		    __field(bool,			want_more)
553 		    __field(int,			ret)
554 			     ),
555 
556 	    TP_fast_assign(
557 		    __entry->call	= call->debug_id;
558 		    __entry->state	= call->state;
559 		    __entry->unmarshall	= call->unmarshall;
560 		    __entry->remain	= iov_iter_count(iter);
561 		    __entry->want_more	= want_more;
562 		    __entry->ret	= ret;
563 			   ),
564 
565 	    TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
566 		      __entry->call,
567 		      __entry->remain,
568 		      __entry->unmarshall,
569 		      __entry->want_more,
570 		      __entry->state,
571 		      __entry->ret)
572 	    );
573 
574 TRACE_EVENT(afs_notify_call,
575 	    TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call),
576 
577 	    TP_ARGS(rxcall, call),
578 
579 	    TP_STRUCT__entry(
580 		    __field(unsigned int,		call)
581 		    __field(enum afs_call_state,	state)
582 		    __field(unsigned short,		unmarshall)
583 			     ),
584 
585 	    TP_fast_assign(
586 		    __entry->call	= call->debug_id;
587 		    __entry->state	= call->state;
588 		    __entry->unmarshall	= call->unmarshall;
589 			   ),
590 
591 	    TP_printk("c=%08x s=%u u=%u",
592 		      __entry->call,
593 		      __entry->state, __entry->unmarshall)
594 	    );
595 
596 TRACE_EVENT(afs_cb_call,
597 	    TP_PROTO(struct afs_call *call),
598 
599 	    TP_ARGS(call),
600 
601 	    TP_STRUCT__entry(
602 		    __field(unsigned int,		call)
603 		    __field(u32,			op)
604 		    __field(u16,			service_id)
605 			     ),
606 
607 	    TP_fast_assign(
608 		    __entry->call	= call->debug_id;
609 		    __entry->op		= call->operation_ID;
610 		    __entry->service_id	= call->service_id;
611 			   ),
612 
613 	    TP_printk("c=%08x %s",
614 		      __entry->call,
615 		      __entry->service_id == 2501 ?
616 		      __print_symbolic(__entry->op, yfs_cm_operations) :
617 		      __print_symbolic(__entry->op, afs_cm_operations))
618 	    );
619 
620 TRACE_EVENT(afs_call,
621 	    TP_PROTO(unsigned int call_debug_id, enum afs_call_trace op,
622 		     int ref, int outstanding, const void *where),
623 
624 	    TP_ARGS(call_debug_id, op, ref, outstanding, where),
625 
626 	    TP_STRUCT__entry(
627 		    __field(unsigned int,		call)
628 		    __field(int,			op)
629 		    __field(int,			ref)
630 		    __field(int,			outstanding)
631 		    __field(const void *,		where)
632 			     ),
633 
634 	    TP_fast_assign(
635 		    __entry->call = call_debug_id;
636 		    __entry->op = op;
637 		    __entry->ref = ref;
638 		    __entry->outstanding = outstanding;
639 		    __entry->where = where;
640 			   ),
641 
642 	    TP_printk("c=%08x %s r=%d o=%d sp=%pSR",
643 		      __entry->call,
644 		      __print_symbolic(__entry->op, afs_call_traces),
645 		      __entry->ref,
646 		      __entry->outstanding,
647 		      __entry->where)
648 	    );
649 
650 TRACE_EVENT(afs_make_fs_call,
651 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid),
652 
653 	    TP_ARGS(call, fid),
654 
655 	    TP_STRUCT__entry(
656 		    __field(unsigned int,		call)
657 		    __field(enum afs_fs_operation,	op)
658 		    __field_struct(struct afs_fid,	fid)
659 			     ),
660 
661 	    TP_fast_assign(
662 		    __entry->call = call->debug_id;
663 		    __entry->op = call->operation_ID;
664 		    if (fid) {
665 			    __entry->fid = *fid;
666 		    } else {
667 			    __entry->fid.vid = 0;
668 			    __entry->fid.vnode = 0;
669 			    __entry->fid.unique = 0;
670 		    }
671 			   ),
672 
673 	    TP_printk("c=%08x %06llx:%06llx:%06x %s",
674 		      __entry->call,
675 		      __entry->fid.vid,
676 		      __entry->fid.vnode,
677 		      __entry->fid.unique,
678 		      __print_symbolic(__entry->op, afs_fs_operations))
679 	    );
680 
681 TRACE_EVENT(afs_make_fs_calli,
682 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
683 		     unsigned int i),
684 
685 	    TP_ARGS(call, fid, i),
686 
687 	    TP_STRUCT__entry(
688 		    __field(unsigned int,		call)
689 		    __field(unsigned int,		i)
690 		    __field(enum afs_fs_operation,	op)
691 		    __field_struct(struct afs_fid,	fid)
692 			     ),
693 
694 	    TP_fast_assign(
695 		    __entry->call = call->debug_id;
696 		    __entry->i = i;
697 		    __entry->op = call->operation_ID;
698 		    if (fid) {
699 			    __entry->fid = *fid;
700 		    } else {
701 			    __entry->fid.vid = 0;
702 			    __entry->fid.vnode = 0;
703 			    __entry->fid.unique = 0;
704 		    }
705 			   ),
706 
707 	    TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u",
708 		      __entry->call,
709 		      __entry->fid.vid,
710 		      __entry->fid.vnode,
711 		      __entry->fid.unique,
712 		      __print_symbolic(__entry->op, afs_fs_operations),
713 		      __entry->i)
714 	    );
715 
716 TRACE_EVENT(afs_make_fs_call1,
717 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
718 		     const struct qstr *name),
719 
720 	    TP_ARGS(call, fid, name),
721 
722 	    TP_STRUCT__entry(
723 		    __field(unsigned int,		call)
724 		    __field(enum afs_fs_operation,	op)
725 		    __field_struct(struct afs_fid,	fid)
726 		    __array(char,			name, 24)
727 			     ),
728 
729 	    TP_fast_assign(
730 		    unsigned int __len = min_t(unsigned int, name->len, 23);
731 		    __entry->call = call->debug_id;
732 		    __entry->op = call->operation_ID;
733 		    if (fid) {
734 			    __entry->fid = *fid;
735 		    } else {
736 			    __entry->fid.vid = 0;
737 			    __entry->fid.vnode = 0;
738 			    __entry->fid.unique = 0;
739 		    }
740 		    memcpy(__entry->name, name->name, __len);
741 		    __entry->name[__len] = 0;
742 			   ),
743 
744 	    TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"",
745 		      __entry->call,
746 		      __entry->fid.vid,
747 		      __entry->fid.vnode,
748 		      __entry->fid.unique,
749 		      __print_symbolic(__entry->op, afs_fs_operations),
750 		      __entry->name)
751 	    );
752 
753 TRACE_EVENT(afs_make_fs_call2,
754 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
755 		     const struct qstr *name, const struct qstr *name2),
756 
757 	    TP_ARGS(call, fid, name, name2),
758 
759 	    TP_STRUCT__entry(
760 		    __field(unsigned int,		call)
761 		    __field(enum afs_fs_operation,	op)
762 		    __field_struct(struct afs_fid,	fid)
763 		    __array(char,			name, 24)
764 		    __array(char,			name2, 24)
765 			     ),
766 
767 	    TP_fast_assign(
768 		    unsigned int __len = min_t(unsigned int, name->len, 23);
769 		    unsigned int __len2 = min_t(unsigned int, name2->len, 23);
770 		    __entry->call = call->debug_id;
771 		    __entry->op = call->operation_ID;
772 		    if (fid) {
773 			    __entry->fid = *fid;
774 		    } else {
775 			    __entry->fid.vid = 0;
776 			    __entry->fid.vnode = 0;
777 			    __entry->fid.unique = 0;
778 		    }
779 		    memcpy(__entry->name, name->name, __len);
780 		    __entry->name[__len] = 0;
781 		    memcpy(__entry->name2, name2->name, __len2);
782 		    __entry->name2[__len2] = 0;
783 			   ),
784 
785 	    TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"",
786 		      __entry->call,
787 		      __entry->fid.vid,
788 		      __entry->fid.vnode,
789 		      __entry->fid.unique,
790 		      __print_symbolic(__entry->op, afs_fs_operations),
791 		      __entry->name,
792 		      __entry->name2)
793 	    );
794 
795 TRACE_EVENT(afs_make_vl_call,
796 	    TP_PROTO(struct afs_call *call),
797 
798 	    TP_ARGS(call),
799 
800 	    TP_STRUCT__entry(
801 		    __field(unsigned int,		call)
802 		    __field(enum afs_vl_operation,	op)
803 			     ),
804 
805 	    TP_fast_assign(
806 		    __entry->call = call->debug_id;
807 		    __entry->op = call->operation_ID;
808 			   ),
809 
810 	    TP_printk("c=%08x %s",
811 		      __entry->call,
812 		      __print_symbolic(__entry->op, afs_vl_operations))
813 	    );
814 
815 TRACE_EVENT(afs_call_done,
816 	    TP_PROTO(struct afs_call *call),
817 
818 	    TP_ARGS(call),
819 
820 	    TP_STRUCT__entry(
821 		    __field(unsigned int,		call)
822 		    __field(struct rxrpc_call *,	rx_call)
823 		    __field(int,			ret)
824 		    __field(u32,			abort_code)
825 			     ),
826 
827 	    TP_fast_assign(
828 		    __entry->call = call->debug_id;
829 		    __entry->rx_call = call->rxcall;
830 		    __entry->ret = call->error;
831 		    __entry->abort_code = call->abort_code;
832 			   ),
833 
834 	    TP_printk("   c=%08x ret=%d ab=%d [%p]",
835 		      __entry->call,
836 		      __entry->ret,
837 		      __entry->abort_code,
838 		      __entry->rx_call)
839 	    );
840 
841 TRACE_EVENT(afs_send_data,
842 	    TP_PROTO(struct afs_call *call, struct msghdr *msg),
843 
844 	    TP_ARGS(call, msg),
845 
846 	    TP_STRUCT__entry(
847 		    __field(unsigned int,		call)
848 		    __field(unsigned int,		flags)
849 		    __field(loff_t,			offset)
850 		    __field(loff_t,			count)
851 			     ),
852 
853 	    TP_fast_assign(
854 		    __entry->call = call->debug_id;
855 		    __entry->flags = msg->msg_flags;
856 		    __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset;
857 		    __entry->count = iov_iter_count(&msg->msg_iter);
858 			   ),
859 
860 	    TP_printk(" c=%08x o=%llx n=%llx f=%x",
861 		      __entry->call, __entry->offset, __entry->count,
862 		      __entry->flags)
863 	    );
864 
865 TRACE_EVENT(afs_sent_data,
866 	    TP_PROTO(struct afs_call *call, struct msghdr *msg, int ret),
867 
868 	    TP_ARGS(call, msg, ret),
869 
870 	    TP_STRUCT__entry(
871 		    __field(unsigned int,		call)
872 		    __field(int,			ret)
873 		    __field(loff_t,			offset)
874 		    __field(loff_t,			count)
875 			     ),
876 
877 	    TP_fast_assign(
878 		    __entry->call = call->debug_id;
879 		    __entry->ret = ret;
880 		    __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset;
881 		    __entry->count = iov_iter_count(&msg->msg_iter);
882 			   ),
883 
884 	    TP_printk(" c=%08x o=%llx n=%llx r=%x",
885 		      __entry->call, __entry->offset, __entry->count,
886 		      __entry->ret)
887 	    );
888 
889 TRACE_EVENT(afs_dir_check_failed,
890 	    TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size),
891 
892 	    TP_ARGS(vnode, off, i_size),
893 
894 	    TP_STRUCT__entry(
895 		    __field(struct afs_vnode *,		vnode)
896 		    __field(loff_t,			off)
897 		    __field(loff_t,			i_size)
898 			     ),
899 
900 	    TP_fast_assign(
901 		    __entry->vnode = vnode;
902 		    __entry->off = off;
903 		    __entry->i_size = i_size;
904 			   ),
905 
906 	    TP_printk("vn=%p %llx/%llx",
907 		      __entry->vnode, __entry->off, __entry->i_size)
908 	    );
909 
910 TRACE_EVENT(afs_call_state,
911 	    TP_PROTO(struct afs_call *call,
912 		     enum afs_call_state from,
913 		     enum afs_call_state to,
914 		     int ret, u32 remote_abort),
915 
916 	    TP_ARGS(call, from, to, ret, remote_abort),
917 
918 	    TP_STRUCT__entry(
919 		    __field(unsigned int,		call)
920 		    __field(enum afs_call_state,	from)
921 		    __field(enum afs_call_state,	to)
922 		    __field(int,			ret)
923 		    __field(u32,			abort)
924 			     ),
925 
926 	    TP_fast_assign(
927 		    __entry->call = call->debug_id;
928 		    __entry->from = from;
929 		    __entry->to = to;
930 		    __entry->ret = ret;
931 		    __entry->abort = remote_abort;
932 			   ),
933 
934 	    TP_printk("c=%08x %u->%u r=%d ab=%d",
935 		      __entry->call,
936 		      __entry->from, __entry->to,
937 		      __entry->ret, __entry->abort)
938 	    );
939 
940 TRACE_EVENT(afs_lookup,
941 	    TP_PROTO(struct afs_vnode *dvnode, const struct qstr *name,
942 		     struct afs_fid *fid),
943 
944 	    TP_ARGS(dvnode, name, fid),
945 
946 	    TP_STRUCT__entry(
947 		    __field_struct(struct afs_fid,	dfid)
948 		    __field_struct(struct afs_fid,	fid)
949 		    __array(char,			name, 24)
950 			     ),
951 
952 	    TP_fast_assign(
953 		    int __len = min_t(int, name->len, 23);
954 		    __entry->dfid = dvnode->fid;
955 		    __entry->fid = *fid;
956 		    memcpy(__entry->name, name->name, __len);
957 		    __entry->name[__len] = 0;
958 			   ),
959 
960 	    TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x",
961 		      __entry->dfid.vid, __entry->dfid.vnode, __entry->dfid.unique,
962 		      __entry->name,
963 		      __entry->fid.vnode, __entry->fid.unique)
964 	    );
965 
966 TRACE_EVENT(afs_edit_dir,
967 	    TP_PROTO(struct afs_vnode *dvnode,
968 		     enum afs_edit_dir_reason why,
969 		     enum afs_edit_dir_op op,
970 		     unsigned int block,
971 		     unsigned int slot,
972 		     unsigned int f_vnode,
973 		     unsigned int f_unique,
974 		     const char *name),
975 
976 	    TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name),
977 
978 	    TP_STRUCT__entry(
979 		    __field(unsigned int,		vnode)
980 		    __field(unsigned int,		unique)
981 		    __field(enum afs_edit_dir_reason,	why)
982 		    __field(enum afs_edit_dir_op,	op)
983 		    __field(unsigned int,		block)
984 		    __field(unsigned short,		slot)
985 		    __field(unsigned int,		f_vnode)
986 		    __field(unsigned int,		f_unique)
987 		    __array(char,			name, 24)
988 			     ),
989 
990 	    TP_fast_assign(
991 		    int __len = strlen(name);
992 		    __len = min(__len, 23);
993 		    __entry->vnode	= dvnode->fid.vnode;
994 		    __entry->unique	= dvnode->fid.unique;
995 		    __entry->why	= why;
996 		    __entry->op		= op;
997 		    __entry->block	= block;
998 		    __entry->slot	= slot;
999 		    __entry->f_vnode	= f_vnode;
1000 		    __entry->f_unique	= f_unique;
1001 		    memcpy(__entry->name, name, __len);
1002 		    __entry->name[__len] = 0;
1003 			   ),
1004 
1005 	    TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"",
1006 		      __entry->vnode, __entry->unique,
1007 		      __print_symbolic(__entry->why, afs_edit_dir_reasons),
1008 		      __print_symbolic(__entry->op, afs_edit_dir_ops),
1009 		      __entry->block, __entry->slot,
1010 		      __entry->f_vnode, __entry->f_unique,
1011 		      __entry->name)
1012 	    );
1013 
1014 TRACE_EVENT(afs_protocol_error,
1015 	    TP_PROTO(struct afs_call *call, enum afs_eproto_cause cause),
1016 
1017 	    TP_ARGS(call, cause),
1018 
1019 	    TP_STRUCT__entry(
1020 		    __field(unsigned int,		call)
1021 		    __field(enum afs_eproto_cause,	cause)
1022 			     ),
1023 
1024 	    TP_fast_assign(
1025 		    __entry->call = call ? call->debug_id : 0;
1026 		    __entry->cause = cause;
1027 			   ),
1028 
1029 	    TP_printk("c=%08x %s",
1030 		      __entry->call,
1031 		      __print_symbolic(__entry->cause, afs_eproto_causes))
1032 	    );
1033 
1034 TRACE_EVENT(afs_io_error,
1035 	    TP_PROTO(unsigned int call, int error, enum afs_io_error where),
1036 
1037 	    TP_ARGS(call, error, where),
1038 
1039 	    TP_STRUCT__entry(
1040 		    __field(unsigned int,	call)
1041 		    __field(int,		error)
1042 		    __field(enum afs_io_error,	where)
1043 			     ),
1044 
1045 	    TP_fast_assign(
1046 		    __entry->call = call;
1047 		    __entry->error = error;
1048 		    __entry->where = where;
1049 			   ),
1050 
1051 	    TP_printk("c=%08x r=%d %s",
1052 		      __entry->call, __entry->error,
1053 		      __print_symbolic(__entry->where, afs_io_errors))
1054 	    );
1055 
1056 TRACE_EVENT(afs_file_error,
1057 	    TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where),
1058 
1059 	    TP_ARGS(vnode, error, where),
1060 
1061 	    TP_STRUCT__entry(
1062 		    __field_struct(struct afs_fid,	fid)
1063 		    __field(int,			error)
1064 		    __field(enum afs_file_error,	where)
1065 			     ),
1066 
1067 	    TP_fast_assign(
1068 		    __entry->fid = vnode->fid;
1069 		    __entry->error = error;
1070 		    __entry->where = where;
1071 			   ),
1072 
1073 	    TP_printk("%llx:%llx:%x r=%d %s",
1074 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1075 		      __entry->error,
1076 		      __print_symbolic(__entry->where, afs_file_errors))
1077 	    );
1078 
1079 TRACE_EVENT(afs_bulkstat_error,
1080 	    TP_PROTO(struct afs_operation *op, struct afs_fid *fid, unsigned int index, s32 abort),
1081 
1082 	    TP_ARGS(op, fid, index, abort),
1083 
1084 	    TP_STRUCT__entry(
1085 		    __field_struct(struct afs_fid,	fid)
1086 		    __field(unsigned int,		op)
1087 		    __field(unsigned int,		index)
1088 		    __field(s32,			abort)
1089 			     ),
1090 
1091 	    TP_fast_assign(
1092 		    __entry->op = op->debug_id;
1093 		    __entry->fid = *fid;
1094 		    __entry->index = index;
1095 		    __entry->abort = abort;
1096 			   ),
1097 
1098 	    TP_printk("OP=%08x[%02x] %llx:%llx:%x a=%d",
1099 		      __entry->op, __entry->index,
1100 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1101 		      __entry->abort)
1102 	    );
1103 
1104 TRACE_EVENT(afs_cm_no_server,
1105 	    TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx),
1106 
1107 	    TP_ARGS(call, srx),
1108 
1109 	    TP_STRUCT__entry(
1110 		    __field(unsigned int,			call)
1111 		    __field(unsigned int,			op_id)
1112 		    __field_struct(struct sockaddr_rxrpc,	srx)
1113 			     ),
1114 
1115 	    TP_fast_assign(
1116 		    __entry->call = call->debug_id;
1117 		    __entry->op_id = call->operation_ID;
1118 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1119 			   ),
1120 
1121 	    TP_printk("c=%08x op=%u %pISpc",
1122 		      __entry->call, __entry->op_id, &__entry->srx.transport)
1123 	    );
1124 
1125 TRACE_EVENT(afs_cm_no_server_u,
1126 	    TP_PROTO(struct afs_call *call, const uuid_t *uuid),
1127 
1128 	    TP_ARGS(call, uuid),
1129 
1130 	    TP_STRUCT__entry(
1131 		    __field(unsigned int,			call)
1132 		    __field(unsigned int,			op_id)
1133 		    __field_struct(uuid_t,			uuid)
1134 			     ),
1135 
1136 	    TP_fast_assign(
1137 		    __entry->call = call->debug_id;
1138 		    __entry->op_id = call->operation_ID;
1139 		    memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid));
1140 			   ),
1141 
1142 	    TP_printk("c=%08x op=%u %pU",
1143 		      __entry->call, __entry->op_id, &__entry->uuid)
1144 	    );
1145 
1146 TRACE_EVENT(afs_flock_ev,
1147 	    TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1148 		     enum afs_flock_event event, int error),
1149 
1150 	    TP_ARGS(vnode, fl, event, error),
1151 
1152 	    TP_STRUCT__entry(
1153 		    __field_struct(struct afs_fid,	fid)
1154 		    __field(enum afs_flock_event,	event)
1155 		    __field(enum afs_lock_state,	state)
1156 		    __field(int,			error)
1157 		    __field(unsigned int,		debug_id)
1158 			     ),
1159 
1160 	    TP_fast_assign(
1161 		    __entry->fid = vnode->fid;
1162 		    __entry->event = event;
1163 		    __entry->state = vnode->lock_state;
1164 		    __entry->error = error;
1165 		    __entry->debug_id = fl ? fl->fl_u.afs.debug_id : 0;
1166 			   ),
1167 
1168 	    TP_printk("%llx:%llx:%x %04x %s s=%s e=%d",
1169 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1170 		      __entry->debug_id,
1171 		      __print_symbolic(__entry->event, afs_flock_events),
1172 		      __print_symbolic(__entry->state, afs_flock_states),
1173 		      __entry->error)
1174 	    );
1175 
1176 TRACE_EVENT(afs_flock_op,
1177 	    TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1178 		     enum afs_flock_operation op),
1179 
1180 	    TP_ARGS(vnode, fl, op),
1181 
1182 	    TP_STRUCT__entry(
1183 		    __field_struct(struct afs_fid,	fid)
1184 		    __field(loff_t,			from)
1185 		    __field(loff_t,			len)
1186 		    __field(enum afs_flock_operation,	op)
1187 		    __field(unsigned char,		type)
1188 		    __field(unsigned int,		flags)
1189 		    __field(unsigned int,		debug_id)
1190 			     ),
1191 
1192 	    TP_fast_assign(
1193 		    __entry->fid = vnode->fid;
1194 		    __entry->from = fl->fl_start;
1195 		    __entry->len = fl->fl_end - fl->fl_start + 1;
1196 		    __entry->op = op;
1197 		    __entry->type = fl->c.flc_type;
1198 		    __entry->flags = fl->c.flc_flags;
1199 		    __entry->debug_id = fl->fl_u.afs.debug_id;
1200 			   ),
1201 
1202 	    TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x",
1203 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1204 		      __entry->debug_id,
1205 		      __print_symbolic(__entry->op, afs_flock_operations),
1206 		      __print_symbolic(__entry->type, afs_flock_types),
1207 		      __entry->from, __entry->len, __entry->flags)
1208 	    );
1209 
1210 TRACE_EVENT(afs_reload_dir,
1211 	    TP_PROTO(struct afs_vnode *vnode),
1212 
1213 	    TP_ARGS(vnode),
1214 
1215 	    TP_STRUCT__entry(
1216 		    __field_struct(struct afs_fid,	fid)
1217 			     ),
1218 
1219 	    TP_fast_assign(
1220 		    __entry->fid = vnode->fid;
1221 			   ),
1222 
1223 	    TP_printk("%llx:%llx:%x",
1224 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique)
1225 	    );
1226 
1227 TRACE_EVENT(afs_silly_rename,
1228 	    TP_PROTO(struct afs_vnode *vnode, bool done),
1229 
1230 	    TP_ARGS(vnode, done),
1231 
1232 	    TP_STRUCT__entry(
1233 		    __field_struct(struct afs_fid,	fid)
1234 		    __field(bool,			done)
1235 			     ),
1236 
1237 	    TP_fast_assign(
1238 		    __entry->fid = vnode->fid;
1239 		    __entry->done = done;
1240 			   ),
1241 
1242 	    TP_printk("%llx:%llx:%x done=%u",
1243 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1244 		      __entry->done)
1245 	    );
1246 
1247 TRACE_EVENT(afs_get_tree,
1248 	    TP_PROTO(struct afs_cell *cell, struct afs_volume *volume),
1249 
1250 	    TP_ARGS(cell, volume),
1251 
1252 	    TP_STRUCT__entry(
1253 		    __field(u64,			vid)
1254 		    __array(char,			cell, 24)
1255 		    __array(char,			volume, 24)
1256 			     ),
1257 
1258 	    TP_fast_assign(
1259 		    int __len;
1260 		    __entry->vid = volume->vid;
1261 		    __len = min_t(int, cell->name_len, 23);
1262 		    memcpy(__entry->cell, cell->name, __len);
1263 		    __entry->cell[__len] = 0;
1264 		    __len = min_t(int, volume->name_len, 23);
1265 		    memcpy(__entry->volume, volume->name, __len);
1266 		    __entry->volume[__len] = 0;
1267 			   ),
1268 
1269 	    TP_printk("--- MOUNT %s:%s %llx",
1270 		      __entry->cell, __entry->volume, __entry->vid)
1271 	    );
1272 
1273 TRACE_EVENT(afs_cb_v_break,
1274 	    TP_PROTO(afs_volid_t vid, unsigned int cb_v_break,
1275 		     enum afs_cb_break_reason reason),
1276 
1277 	    TP_ARGS(vid, cb_v_break, reason),
1278 
1279 	    TP_STRUCT__entry(
1280 		    __field(afs_volid_t,		vid)
1281 		    __field(unsigned int,		cb_v_break)
1282 		    __field(enum afs_cb_break_reason,	reason)
1283 			     ),
1284 
1285 	    TP_fast_assign(
1286 		    __entry->vid	= vid;
1287 		    __entry->cb_v_break	= cb_v_break;
1288 		    __entry->reason	= reason;
1289 			   ),
1290 
1291 	    TP_printk("%llx vb=%x %s",
1292 		      __entry->vid,
1293 		      __entry->cb_v_break,
1294 		      __print_symbolic(__entry->reason, afs_cb_break_reasons))
1295 	    );
1296 
1297 TRACE_EVENT(afs_cb_break,
1298 	    TP_PROTO(struct afs_fid *fid, unsigned int cb_break,
1299 		     enum afs_cb_break_reason reason, bool skipped),
1300 
1301 	    TP_ARGS(fid, cb_break, reason, skipped),
1302 
1303 	    TP_STRUCT__entry(
1304 		    __field_struct(struct afs_fid,	fid)
1305 		    __field(unsigned int,		cb_break)
1306 		    __field(enum afs_cb_break_reason,	reason)
1307 		    __field(bool,			skipped)
1308 			     ),
1309 
1310 	    TP_fast_assign(
1311 		    __entry->fid	= *fid;
1312 		    __entry->cb_break	= cb_break;
1313 		    __entry->reason	= reason;
1314 		    __entry->skipped	= skipped;
1315 			   ),
1316 
1317 	    TP_printk("%llx:%llx:%x b=%x s=%u %s",
1318 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1319 		      __entry->cb_break,
1320 		      __entry->skipped,
1321 		      __print_symbolic(__entry->reason, afs_cb_break_reasons))
1322 	    );
1323 
1324 TRACE_EVENT(afs_cb_miss,
1325 	    TP_PROTO(struct afs_fid *fid, enum afs_cb_break_reason reason),
1326 
1327 	    TP_ARGS(fid, reason),
1328 
1329 	    TP_STRUCT__entry(
1330 		    __field_struct(struct afs_fid,	fid)
1331 		    __field(enum afs_cb_break_reason,	reason)
1332 			     ),
1333 
1334 	    TP_fast_assign(
1335 		    __entry->fid	= *fid;
1336 		    __entry->reason	= reason;
1337 			   ),
1338 
1339 	    TP_printk(" %llx:%llx:%x %s",
1340 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1341 		      __print_symbolic(__entry->reason, afs_cb_break_reasons))
1342 	    );
1343 
1344 TRACE_EVENT(afs_server,
1345 	    TP_PROTO(unsigned int server_debug_id, int ref, int active,
1346 		     enum afs_server_trace reason),
1347 
1348 	    TP_ARGS(server_debug_id, ref, active, reason),
1349 
1350 	    TP_STRUCT__entry(
1351 		    __field(unsigned int,		server)
1352 		    __field(int,			ref)
1353 		    __field(int,			active)
1354 		    __field(int,			reason)
1355 			     ),
1356 
1357 	    TP_fast_assign(
1358 		    __entry->server = server_debug_id;
1359 		    __entry->ref = ref;
1360 		    __entry->active = active;
1361 		    __entry->reason = reason;
1362 			   ),
1363 
1364 	    TP_printk("s=%08x %s u=%d a=%d",
1365 		      __entry->server,
1366 		      __print_symbolic(__entry->reason, afs_server_traces),
1367 		      __entry->ref,
1368 		      __entry->active)
1369 	    );
1370 
1371 TRACE_EVENT(afs_volume,
1372 	    TP_PROTO(afs_volid_t vid, int ref, enum afs_volume_trace reason),
1373 
1374 	    TP_ARGS(vid, ref, reason),
1375 
1376 	    TP_STRUCT__entry(
1377 		    __field(afs_volid_t,		vid)
1378 		    __field(int,			ref)
1379 		    __field(enum afs_volume_trace,	reason)
1380 			     ),
1381 
1382 	    TP_fast_assign(
1383 		    __entry->vid = vid;
1384 		    __entry->ref = ref;
1385 		    __entry->reason = reason;
1386 			   ),
1387 
1388 	    TP_printk("V=%llx %s ur=%d",
1389 		      __entry->vid,
1390 		      __print_symbolic(__entry->reason, afs_volume_traces),
1391 		      __entry->ref)
1392 	    );
1393 
1394 TRACE_EVENT(afs_cell,
1395 	    TP_PROTO(unsigned int cell_debug_id, int ref, int active,
1396 		     enum afs_cell_trace reason),
1397 
1398 	    TP_ARGS(cell_debug_id, ref, active, reason),
1399 
1400 	    TP_STRUCT__entry(
1401 		    __field(unsigned int,		cell)
1402 		    __field(int,			ref)
1403 		    __field(int,			active)
1404 		    __field(int,			reason)
1405 			     ),
1406 
1407 	    TP_fast_assign(
1408 		    __entry->cell = cell_debug_id;
1409 		    __entry->ref = ref;
1410 		    __entry->active = active;
1411 		    __entry->reason = reason;
1412 			   ),
1413 
1414 	    TP_printk("L=%08x %s r=%d a=%d",
1415 		      __entry->cell,
1416 		      __print_symbolic(__entry->reason, afs_cell_traces),
1417 		      __entry->ref,
1418 		      __entry->active)
1419 	    );
1420 
1421 TRACE_EVENT(afs_alist,
1422 	    TP_PROTO(unsigned int alist_debug_id, int ref, enum afs_alist_trace reason),
1423 
1424 	    TP_ARGS(alist_debug_id, ref, reason),
1425 
1426 	    TP_STRUCT__entry(
1427 		    __field(unsigned int,		alist)
1428 		    __field(int,			ref)
1429 		    __field(int,			active)
1430 		    __field(int,			reason)
1431 			     ),
1432 
1433 	    TP_fast_assign(
1434 		    __entry->alist = alist_debug_id;
1435 		    __entry->ref = ref;
1436 		    __entry->reason = reason;
1437 			   ),
1438 
1439 	    TP_printk("AL=%08x %s r=%d",
1440 		      __entry->alist,
1441 		      __print_symbolic(__entry->reason, afs_alist_traces),
1442 		      __entry->ref)
1443 	    );
1444 
1445 TRACE_EVENT(afs_estate,
1446 	    TP_PROTO(unsigned int server_debug_id, unsigned int estate_debug_id,
1447 		     int ref, enum afs_estate_trace reason),
1448 
1449 	    TP_ARGS(server_debug_id, estate_debug_id, ref, reason),
1450 
1451 	    TP_STRUCT__entry(
1452 		    __field(unsigned int,		server)
1453 		    __field(unsigned int,		estate)
1454 		    __field(int,			ref)
1455 		    __field(int,			active)
1456 		    __field(int,			reason)
1457 			     ),
1458 
1459 	    TP_fast_assign(
1460 		    __entry->server = server_debug_id;
1461 		    __entry->estate = estate_debug_id;
1462 		    __entry->ref = ref;
1463 		    __entry->reason = reason;
1464 			   ),
1465 
1466 	    TP_printk("ES=%08x[%x] %s r=%d",
1467 		      __entry->server,
1468 		      __entry->estate,
1469 		      __print_symbolic(__entry->reason, afs_estate_traces),
1470 		      __entry->ref)
1471 	    );
1472 
1473 TRACE_EVENT(afs_fs_probe,
1474 	    TP_PROTO(struct afs_server *server, bool tx, struct afs_endpoint_state *estate,
1475 		     unsigned int addr_index, int error, s32 abort_code, unsigned int rtt_us),
1476 
1477 	    TP_ARGS(server, tx, estate, addr_index, error, abort_code, rtt_us),
1478 
1479 	    TP_STRUCT__entry(
1480 		    __field(unsigned int,		server)
1481 		    __field(unsigned int,		estate)
1482 		    __field(bool,			tx)
1483 		    __field(u16,			addr_index)
1484 		    __field(short,			error)
1485 		    __field(s32,			abort_code)
1486 		    __field(unsigned int,		rtt_us)
1487 		    __field_struct(struct sockaddr_rxrpc, srx)
1488 			     ),
1489 
1490 	    TP_fast_assign(
1491 		    struct afs_addr_list *alist = estate->addresses;
1492 		    __entry->server = server->debug_id;
1493 		    __entry->estate = estate->probe_seq;
1494 		    __entry->tx = tx;
1495 		    __entry->addr_index = addr_index;
1496 		    __entry->error = error;
1497 		    __entry->abort_code = abort_code;
1498 		    __entry->rtt_us = rtt_us;
1499 		    memcpy(&__entry->srx, rxrpc_kernel_remote_srx(alist->addrs[addr_index].peer),
1500 			   sizeof(__entry->srx));
1501 			   ),
1502 
1503 	    TP_printk("s=%08x %s pq=%x ax=%u e=%d ac=%d rtt=%d %pISpc",
1504 		      __entry->server, __entry->tx ? "tx" : "rx", __entry->estate,
1505 		      __entry->addr_index, __entry->error, __entry->abort_code, __entry->rtt_us,
1506 		      &__entry->srx.transport)
1507 	    );
1508 
1509 TRACE_EVENT(afs_vl_probe,
1510 	    TP_PROTO(struct afs_vlserver *server, bool tx, struct afs_addr_list *alist,
1511 		     unsigned int addr_index, int error, s32 abort_code, unsigned int rtt_us),
1512 
1513 	    TP_ARGS(server, tx, alist, addr_index, error, abort_code, rtt_us),
1514 
1515 	    TP_STRUCT__entry(
1516 		    __field(unsigned int,		server)
1517 		    __field(bool,			tx)
1518 		    __field(unsigned short,		flags)
1519 		    __field(u16,			addr_index)
1520 		    __field(short,			error)
1521 		    __field(s32,			abort_code)
1522 		    __field(unsigned int,		rtt_us)
1523 		    __field_struct(struct sockaddr_rxrpc, srx)
1524 			     ),
1525 
1526 	    TP_fast_assign(
1527 		    __entry->server = server->debug_id;
1528 		    __entry->tx = tx;
1529 		    __entry->addr_index = addr_index;
1530 		    __entry->error = error;
1531 		    __entry->abort_code = abort_code;
1532 		    __entry->rtt_us = rtt_us;
1533 		    memcpy(&__entry->srx, rxrpc_kernel_remote_srx(alist->addrs[addr_index].peer),
1534 			   sizeof(__entry->srx));
1535 			   ),
1536 
1537 	    TP_printk("vl=%08x %s ax=%u e=%d ac=%d rtt=%d %pISpc",
1538 		      __entry->server, __entry->tx ? "tx" : "rx", __entry->addr_index,
1539 		      __entry->error, __entry->abort_code, __entry->rtt_us,
1540 		      &__entry->srx.transport)
1541 	    );
1542 
1543 TRACE_EVENT(afs_rotate,
1544 	    TP_PROTO(struct afs_operation *op, enum afs_rotate_trace reason, unsigned int extra),
1545 
1546 	    TP_ARGS(op, reason, extra),
1547 
1548 	    TP_STRUCT__entry(
1549 		    __field(unsigned int,		op)
1550 		    __field(unsigned int,		flags)
1551 		    __field(unsigned int,		extra)
1552 		    __field(unsigned short,		iteration)
1553 		    __field(short,			server_index)
1554 		    __field(short,			addr_index)
1555 		    __field(enum afs_rotate_trace,	reason)
1556 			     ),
1557 
1558 	    TP_fast_assign(
1559 		    __entry->op = op->debug_id;
1560 		    __entry->flags = op->flags;
1561 		    __entry->iteration = op->nr_iterations;
1562 		    __entry->server_index = op->server_index;
1563 		    __entry->addr_index = op->addr_index;
1564 		    __entry->reason = reason;
1565 		    __entry->extra = extra;
1566 			   ),
1567 
1568 	    TP_printk("OP=%08x it=%02x %s fl=%x sx=%d ax=%d ext=%d",
1569 		      __entry->op,
1570 		      __entry->iteration,
1571 		      __print_symbolic(__entry->reason, afs_rotate_traces),
1572 		      __entry->flags,
1573 		      __entry->server_index,
1574 		      __entry->addr_index,
1575 		      __entry->extra)
1576 	    );
1577 
1578 TRACE_EVENT(afs_make_call,
1579 	    TP_PROTO(struct afs_call *call),
1580 
1581 	    TP_ARGS(call),
1582 
1583 	    TP_STRUCT__entry(
1584 		    __field(unsigned int,		call)
1585 		    __field(bool,			is_vl)
1586 		    __field(enum afs_fs_operation,	op)
1587 		    __field_struct(struct afs_fid,	fid)
1588 		    __field_struct(struct sockaddr_rxrpc, srx)
1589 			     ),
1590 
1591 	    TP_fast_assign(
1592 		    __entry->call = call->debug_id;
1593 		    __entry->op = call->operation_ID;
1594 		    __entry->fid = call->fid;
1595 		    memcpy(&__entry->srx, rxrpc_kernel_remote_srx(call->peer),
1596 			   sizeof(__entry->srx));
1597 		    __entry->srx.srx_service = call->service_id;
1598 		    __entry->is_vl = (__entry->srx.srx_service == VL_SERVICE ||
1599 				      __entry->srx.srx_service == YFS_VL_SERVICE);
1600 			   ),
1601 
1602 	    TP_printk("c=%08x %pISpc+%u %s %llx:%llx:%x",
1603 		      __entry->call,
1604 		      &__entry->srx.transport,
1605 		      __entry->srx.srx_service,
1606 		      __entry->is_vl ?
1607 		      __print_symbolic(__entry->op, afs_vl_operations) :
1608 		      __print_symbolic(__entry->op, afs_fs_operations),
1609 		      __entry->fid.vid,
1610 		      __entry->fid.vnode,
1611 		      __entry->fid.unique)
1612 	    );
1613 
1614 #endif /* _TRACE_AFS_H */
1615 
1616 /* This part must be outside protection */
1617 #include <trace/define_trace.h>
1618