xref: /openbmc/linux/include/trace/events/afs.h (revision 4a075bd4)
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_get,
29 	afs_call_trace_put,
30 	afs_call_trace_wake,
31 	afs_call_trace_work,
32 };
33 
34 enum afs_fs_operation {
35 	afs_FS_FetchData		= 130,	/* AFS Fetch file data */
36 	afs_FS_FetchACL			= 131,	/* AFS Fetch file ACL */
37 	afs_FS_FetchStatus		= 132,	/* AFS Fetch file status */
38 	afs_FS_StoreData		= 133,	/* AFS Store file data */
39 	afs_FS_StoreACL			= 134,	/* AFS Store file ACL */
40 	afs_FS_StoreStatus		= 135,	/* AFS Store file status */
41 	afs_FS_RemoveFile		= 136,	/* AFS Remove a file */
42 	afs_FS_CreateFile		= 137,	/* AFS Create a file */
43 	afs_FS_Rename			= 138,	/* AFS Rename or move a file or directory */
44 	afs_FS_Symlink			= 139,	/* AFS Create a symbolic link */
45 	afs_FS_Link			= 140,	/* AFS Create a hard link */
46 	afs_FS_MakeDir			= 141,	/* AFS Create a directory */
47 	afs_FS_RemoveDir		= 142,	/* AFS Remove a directory */
48 	afs_FS_GetVolumeInfo		= 148,	/* AFS Get information about a volume */
49 	afs_FS_GetVolumeStatus		= 149,	/* AFS Get volume status information */
50 	afs_FS_GetRootVolume		= 151,	/* AFS Get root volume name */
51 	afs_FS_SetLock			= 156,	/* AFS Request a file lock */
52 	afs_FS_ExtendLock		= 157,	/* AFS Extend a file lock */
53 	afs_FS_ReleaseLock		= 158,	/* AFS Release a file lock */
54 	afs_FS_Lookup			= 161,	/* AFS lookup file in directory */
55 	afs_FS_InlineBulkStatus		= 65536, /* AFS Fetch multiple file statuses with errors */
56 	afs_FS_FetchData64		= 65537, /* AFS Fetch file data */
57 	afs_FS_StoreData64		= 65538, /* AFS Store file data */
58 	afs_FS_GiveUpAllCallBacks	= 65539, /* AFS Give up all our callbacks on a server */
59 	afs_FS_GetCapabilities		= 65540, /* AFS Get FS server capabilities */
60 
61 	yfs_FS_FetchData		= 130,	 /* YFS Fetch file data */
62 	yfs_FS_FetchACL			= 64131, /* YFS Fetch file ACL */
63 	yfs_FS_FetchStatus		= 64132, /* YFS Fetch file status */
64 	yfs_FS_StoreACL			= 64134, /* YFS Store file ACL */
65 	yfs_FS_StoreStatus		= 64135, /* YFS Store file status */
66 	yfs_FS_RemoveFile		= 64136, /* YFS Remove a file */
67 	yfs_FS_CreateFile		= 64137, /* YFS Create a file */
68 	yfs_FS_Rename			= 64138, /* YFS Rename or move a file or directory */
69 	yfs_FS_Symlink			= 64139, /* YFS Create a symbolic link */
70 	yfs_FS_Link			= 64140, /* YFS Create a hard link */
71 	yfs_FS_MakeDir			= 64141, /* YFS Create a directory */
72 	yfs_FS_RemoveDir		= 64142, /* YFS Remove a directory */
73 	yfs_FS_GetVolumeStatus		= 64149, /* YFS Get volume status information */
74 	yfs_FS_SetVolumeStatus		= 64150, /* YFS Set volume status information */
75 	yfs_FS_SetLock			= 64156, /* YFS Request a file lock */
76 	yfs_FS_ExtendLock		= 64157, /* YFS Extend a file lock */
77 	yfs_FS_ReleaseLock		= 64158, /* YFS Release a file lock */
78 	yfs_FS_Lookup			= 64161, /* YFS lookup file in directory */
79 	yfs_FS_FlushCPS			= 64165,
80 	yfs_FS_FetchOpaqueACL		= 64168,
81 	yfs_FS_WhoAmI			= 64170,
82 	yfs_FS_RemoveACL		= 64171,
83 	yfs_FS_RemoveFile2		= 64173,
84 	yfs_FS_StoreOpaqueACL2		= 64174,
85 	yfs_FS_InlineBulkStatus		= 64536, /* YFS Fetch multiple file statuses with errors */
86 	yfs_FS_FetchData64		= 64537, /* YFS Fetch file data */
87 	yfs_FS_StoreData64		= 64538, /* YFS Store file data */
88 	yfs_FS_UpdateSymlink		= 64540,
89 };
90 
91 enum afs_vl_operation {
92 	afs_VL_GetEntryByNameU	= 527,		/* AFS Get Vol Entry By Name operation ID */
93 	afs_VL_GetAddrsU	= 533,		/* AFS Get FS server addresses */
94 	afs_YFSVL_GetEndpoints	= 64002,	/* YFS Get FS & Vol server addresses */
95 	afs_VL_GetCapabilities	= 65537,	/* AFS Get VL server capabilities */
96 };
97 
98 enum afs_edit_dir_op {
99 	afs_edit_dir_create,
100 	afs_edit_dir_create_error,
101 	afs_edit_dir_create_inval,
102 	afs_edit_dir_create_nospc,
103 	afs_edit_dir_delete,
104 	afs_edit_dir_delete_error,
105 	afs_edit_dir_delete_inval,
106 	afs_edit_dir_delete_noent,
107 };
108 
109 enum afs_edit_dir_reason {
110 	afs_edit_dir_for_create,
111 	afs_edit_dir_for_link,
112 	afs_edit_dir_for_mkdir,
113 	afs_edit_dir_for_rename_0,
114 	afs_edit_dir_for_rename_1,
115 	afs_edit_dir_for_rename_2,
116 	afs_edit_dir_for_rmdir,
117 	afs_edit_dir_for_silly_0,
118 	afs_edit_dir_for_silly_1,
119 	afs_edit_dir_for_symlink,
120 	afs_edit_dir_for_unlink,
121 };
122 
123 enum afs_eproto_cause {
124 	afs_eproto_bad_status,
125 	afs_eproto_cb_count,
126 	afs_eproto_cb_fid_count,
127 	afs_eproto_file_type,
128 	afs_eproto_ibulkst_cb_count,
129 	afs_eproto_ibulkst_count,
130 	afs_eproto_motd_len,
131 	afs_eproto_offline_msg_len,
132 	afs_eproto_volname_len,
133 	afs_eproto_yvl_fsendpt4_len,
134 	afs_eproto_yvl_fsendpt6_len,
135 	afs_eproto_yvl_fsendpt_num,
136 	afs_eproto_yvl_fsendpt_type,
137 	afs_eproto_yvl_vlendpt4_len,
138 	afs_eproto_yvl_vlendpt6_len,
139 	afs_eproto_yvl_vlendpt_type,
140 };
141 
142 enum afs_io_error {
143 	afs_io_error_cm_reply,
144 	afs_io_error_extract,
145 	afs_io_error_fs_probe_fail,
146 	afs_io_error_vl_lookup_fail,
147 	afs_io_error_vl_probe_fail,
148 };
149 
150 enum afs_file_error {
151 	afs_file_error_dir_bad_magic,
152 	afs_file_error_dir_big,
153 	afs_file_error_dir_missing_page,
154 	afs_file_error_dir_over_end,
155 	afs_file_error_dir_small,
156 	afs_file_error_dir_unmarked_ext,
157 	afs_file_error_mntpt,
158 	afs_file_error_writeback_fail,
159 };
160 
161 enum afs_flock_event {
162 	afs_flock_acquired,
163 	afs_flock_callback_break,
164 	afs_flock_defer_unlock,
165 	afs_flock_extend_fail,
166 	afs_flock_fail_other,
167 	afs_flock_fail_perm,
168 	afs_flock_no_lockers,
169 	afs_flock_release_fail,
170 	afs_flock_silly_delete,
171 	afs_flock_timestamp,
172 	afs_flock_try_to_lock,
173 	afs_flock_vfs_lock,
174 	afs_flock_vfs_locking,
175 	afs_flock_waited,
176 	afs_flock_waiting,
177 	afs_flock_work_extending,
178 	afs_flock_work_retry,
179 	afs_flock_work_unlocking,
180 	afs_flock_would_block,
181 };
182 
183 enum afs_flock_operation {
184 	afs_flock_op_copy_lock,
185 	afs_flock_op_flock,
186 	afs_flock_op_grant,
187 	afs_flock_op_lock,
188 	afs_flock_op_release_lock,
189 	afs_flock_op_return_ok,
190 	afs_flock_op_return_eagain,
191 	afs_flock_op_return_edeadlk,
192 	afs_flock_op_return_error,
193 	afs_flock_op_set_lock,
194 	afs_flock_op_unlock,
195 	afs_flock_op_wake,
196 };
197 
198 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
199 
200 /*
201  * Declare tracing information enums and their string mappings for display.
202  */
203 #define afs_call_traces \
204 	EM(afs_call_trace_alloc,		"ALLOC") \
205 	EM(afs_call_trace_free,			"FREE ") \
206 	EM(afs_call_trace_get,			"GET  ") \
207 	EM(afs_call_trace_put,			"PUT  ") \
208 	EM(afs_call_trace_wake,			"WAKE ") \
209 	E_(afs_call_trace_work,			"WORK ")
210 
211 #define afs_fs_operations \
212 	EM(afs_FS_FetchData,			"FS.FetchData") \
213 	EM(afs_FS_FetchStatus,			"FS.FetchStatus") \
214 	EM(afs_FS_StoreData,			"FS.StoreData") \
215 	EM(afs_FS_StoreStatus,			"FS.StoreStatus") \
216 	EM(afs_FS_RemoveFile,			"FS.RemoveFile") \
217 	EM(afs_FS_CreateFile,			"FS.CreateFile") \
218 	EM(afs_FS_Rename,			"FS.Rename") \
219 	EM(afs_FS_Symlink,			"FS.Symlink") \
220 	EM(afs_FS_Link,				"FS.Link") \
221 	EM(afs_FS_MakeDir,			"FS.MakeDir") \
222 	EM(afs_FS_RemoveDir,			"FS.RemoveDir") \
223 	EM(afs_FS_GetVolumeInfo,		"FS.GetVolumeInfo") \
224 	EM(afs_FS_GetVolumeStatus,		"FS.GetVolumeStatus") \
225 	EM(afs_FS_GetRootVolume,		"FS.GetRootVolume") \
226 	EM(afs_FS_SetLock,			"FS.SetLock") \
227 	EM(afs_FS_ExtendLock,			"FS.ExtendLock") \
228 	EM(afs_FS_ReleaseLock,			"FS.ReleaseLock") \
229 	EM(afs_FS_Lookup,			"FS.Lookup") \
230 	EM(afs_FS_InlineBulkStatus,		"FS.InlineBulkStatus") \
231 	EM(afs_FS_FetchData64,			"FS.FetchData64") \
232 	EM(afs_FS_StoreData64,			"FS.StoreData64") \
233 	EM(afs_FS_GiveUpAllCallBacks,		"FS.GiveUpAllCallBacks") \
234 	EM(afs_FS_GetCapabilities,		"FS.GetCapabilities") \
235 	EM(yfs_FS_FetchACL,			"YFS.FetchACL") \
236 	EM(yfs_FS_FetchStatus,			"YFS.FetchStatus") \
237 	EM(yfs_FS_StoreACL,			"YFS.StoreACL") \
238 	EM(yfs_FS_StoreStatus,			"YFS.StoreStatus") \
239 	EM(yfs_FS_RemoveFile,			"YFS.RemoveFile") \
240 	EM(yfs_FS_CreateFile,			"YFS.CreateFile") \
241 	EM(yfs_FS_Rename,			"YFS.Rename") \
242 	EM(yfs_FS_Symlink,			"YFS.Symlink") \
243 	EM(yfs_FS_Link,				"YFS.Link") \
244 	EM(yfs_FS_MakeDir,			"YFS.MakeDir") \
245 	EM(yfs_FS_RemoveDir,			"YFS.RemoveDir") \
246 	EM(yfs_FS_GetVolumeStatus,		"YFS.GetVolumeStatus") \
247 	EM(yfs_FS_SetVolumeStatus,		"YFS.SetVolumeStatus") \
248 	EM(yfs_FS_SetLock,			"YFS.SetLock") \
249 	EM(yfs_FS_ExtendLock,			"YFS.ExtendLock") \
250 	EM(yfs_FS_ReleaseLock,			"YFS.ReleaseLock") \
251 	EM(yfs_FS_Lookup,			"YFS.Lookup") \
252 	EM(yfs_FS_FlushCPS,			"YFS.FlushCPS") \
253 	EM(yfs_FS_FetchOpaqueACL,		"YFS.FetchOpaqueACL") \
254 	EM(yfs_FS_WhoAmI,			"YFS.WhoAmI") \
255 	EM(yfs_FS_RemoveACL,			"YFS.RemoveACL") \
256 	EM(yfs_FS_RemoveFile2,			"YFS.RemoveFile2") \
257 	EM(yfs_FS_StoreOpaqueACL2,		"YFS.StoreOpaqueACL2") \
258 	EM(yfs_FS_InlineBulkStatus,		"YFS.InlineBulkStatus") \
259 	EM(yfs_FS_FetchData64,			"YFS.FetchData64") \
260 	EM(yfs_FS_StoreData64,			"YFS.StoreData64") \
261 	E_(yfs_FS_UpdateSymlink,		"YFS.UpdateSymlink")
262 
263 #define afs_vl_operations \
264 	EM(afs_VL_GetEntryByNameU,		"VL.GetEntryByNameU") \
265 	EM(afs_VL_GetAddrsU,			"VL.GetAddrsU") \
266 	EM(afs_YFSVL_GetEndpoints,		"YFSVL.GetEndpoints") \
267 	E_(afs_VL_GetCapabilities,		"VL.GetCapabilities")
268 
269 #define afs_edit_dir_ops				  \
270 	EM(afs_edit_dir_create,			"create") \
271 	EM(afs_edit_dir_create_error,		"c_fail") \
272 	EM(afs_edit_dir_create_inval,		"c_invl") \
273 	EM(afs_edit_dir_create_nospc,		"c_nspc") \
274 	EM(afs_edit_dir_delete,			"delete") \
275 	EM(afs_edit_dir_delete_error,		"d_err ") \
276 	EM(afs_edit_dir_delete_inval,		"d_invl") \
277 	E_(afs_edit_dir_delete_noent,		"d_nent")
278 
279 #define afs_edit_dir_reasons				  \
280 	EM(afs_edit_dir_for_create,		"Create") \
281 	EM(afs_edit_dir_for_link,		"Link  ") \
282 	EM(afs_edit_dir_for_mkdir,		"MkDir ") \
283 	EM(afs_edit_dir_for_rename_0,		"Renam0") \
284 	EM(afs_edit_dir_for_rename_1,		"Renam1") \
285 	EM(afs_edit_dir_for_rename_2,		"Renam2") \
286 	EM(afs_edit_dir_for_rmdir,		"RmDir ") \
287 	EM(afs_edit_dir_for_silly_0,		"S_Ren0") \
288 	EM(afs_edit_dir_for_silly_1,		"S_Ren1") \
289 	EM(afs_edit_dir_for_symlink,		"Symlnk") \
290 	E_(afs_edit_dir_for_unlink,		"Unlink")
291 
292 #define afs_eproto_causes			\
293 	EM(afs_eproto_bad_status,	"BadStatus") \
294 	EM(afs_eproto_cb_count,		"CbCount") \
295 	EM(afs_eproto_cb_fid_count,	"CbFidCount") \
296 	EM(afs_eproto_file_type,	"FileTYpe") \
297 	EM(afs_eproto_ibulkst_cb_count,	"IBS.CbCount") \
298 	EM(afs_eproto_ibulkst_count,	"IBS.FidCount") \
299 	EM(afs_eproto_motd_len,		"MotdLen") \
300 	EM(afs_eproto_offline_msg_len,	"OfflineMsgLen") \
301 	EM(afs_eproto_volname_len,	"VolNameLen") \
302 	EM(afs_eproto_yvl_fsendpt4_len,	"YVL.FsEnd4Len") \
303 	EM(afs_eproto_yvl_fsendpt6_len,	"YVL.FsEnd6Len") \
304 	EM(afs_eproto_yvl_fsendpt_num,	"YVL.FsEndCount") \
305 	EM(afs_eproto_yvl_fsendpt_type,	"YVL.FsEndType") \
306 	EM(afs_eproto_yvl_vlendpt4_len,	"YVL.VlEnd4Len") \
307 	EM(afs_eproto_yvl_vlendpt6_len,	"YVL.VlEnd6Len") \
308 	E_(afs_eproto_yvl_vlendpt_type,	"YVL.VlEndType")
309 
310 #define afs_io_errors							\
311 	EM(afs_io_error_cm_reply,		"CM_REPLY")		\
312 	EM(afs_io_error_extract,		"EXTRACT")		\
313 	EM(afs_io_error_fs_probe_fail,		"FS_PROBE_FAIL")	\
314 	EM(afs_io_error_vl_lookup_fail,		"VL_LOOKUP_FAIL")	\
315 	E_(afs_io_error_vl_probe_fail,		"VL_PROBE_FAIL")
316 
317 #define afs_file_errors							\
318 	EM(afs_file_error_dir_bad_magic,	"DIR_BAD_MAGIC")	\
319 	EM(afs_file_error_dir_big,		"DIR_BIG")		\
320 	EM(afs_file_error_dir_missing_page,	"DIR_MISSING_PAGE")	\
321 	EM(afs_file_error_dir_over_end,		"DIR_ENT_OVER_END")	\
322 	EM(afs_file_error_dir_small,		"DIR_SMALL")		\
323 	EM(afs_file_error_dir_unmarked_ext,	"DIR_UNMARKED_EXT")	\
324 	EM(afs_file_error_mntpt,		"MNTPT_READ_FAILED")	\
325 	E_(afs_file_error_writeback_fail,	"WRITEBACK_FAILED")
326 
327 #define afs_flock_types							\
328 	EM(F_RDLCK,				"RDLCK")		\
329 	EM(F_WRLCK,				"WRLCK")		\
330 	E_(F_UNLCK,				"UNLCK")
331 
332 #define afs_flock_states						\
333 	EM(AFS_VNODE_LOCK_NONE,			"NONE")			\
334 	EM(AFS_VNODE_LOCK_WAITING_FOR_CB,	"WAIT_FOR_CB")		\
335 	EM(AFS_VNODE_LOCK_SETTING,		"SETTING")		\
336 	EM(AFS_VNODE_LOCK_GRANTED,		"GRANTED")		\
337 	EM(AFS_VNODE_LOCK_EXTENDING,		"EXTENDING")		\
338 	EM(AFS_VNODE_LOCK_NEED_UNLOCK,		"NEED_UNLOCK")		\
339 	EM(AFS_VNODE_LOCK_UNLOCKING,		"UNLOCKING")		\
340 	E_(AFS_VNODE_LOCK_DELETED,		"DELETED")
341 
342 #define afs_flock_events						\
343 	EM(afs_flock_acquired,			"Acquired")		\
344 	EM(afs_flock_callback_break,		"Callback")		\
345 	EM(afs_flock_defer_unlock,		"D-Unlock")		\
346 	EM(afs_flock_extend_fail,		"Ext_Fail")		\
347 	EM(afs_flock_fail_other,		"ErrOther")		\
348 	EM(afs_flock_fail_perm,			"ErrPerm ")		\
349 	EM(afs_flock_no_lockers,		"NoLocker")		\
350 	EM(afs_flock_release_fail,		"Rel_Fail")		\
351 	EM(afs_flock_silly_delete,		"SillyDel")		\
352 	EM(afs_flock_timestamp,			"Timestmp")		\
353 	EM(afs_flock_try_to_lock,		"TryToLck")		\
354 	EM(afs_flock_vfs_lock,			"VFSLock ")		\
355 	EM(afs_flock_vfs_locking,		"VFSLking")		\
356 	EM(afs_flock_waited,			"Waited  ")		\
357 	EM(afs_flock_waiting,			"Waiting ")		\
358 	EM(afs_flock_work_extending,		"Extendng")		\
359 	EM(afs_flock_work_retry,		"Retry   ")		\
360 	EM(afs_flock_work_unlocking,		"Unlcking")		\
361 	E_(afs_flock_would_block,		"EWOULDBL")
362 
363 #define afs_flock_operations						\
364 	EM(afs_flock_op_copy_lock,		"COPY    ")		\
365 	EM(afs_flock_op_flock,			"->flock ")		\
366 	EM(afs_flock_op_grant,			"GRANT   ")		\
367 	EM(afs_flock_op_lock,			"->lock  ")		\
368 	EM(afs_flock_op_release_lock,		"RELEASE ")		\
369 	EM(afs_flock_op_return_ok,		"<-OK    ")		\
370 	EM(afs_flock_op_return_edeadlk,		"<-EDEADL")		\
371 	EM(afs_flock_op_return_eagain,		"<-EAGAIN")		\
372 	EM(afs_flock_op_return_error,		"<-ERROR ")		\
373 	EM(afs_flock_op_set_lock,		"SET     ")		\
374 	EM(afs_flock_op_unlock,			"UNLOCK  ")		\
375 	E_(afs_flock_op_wake,			"WAKE    ")
376 
377 /*
378  * Export enum symbols via userspace.
379  */
380 #undef EM
381 #undef E_
382 #define EM(a, b) TRACE_DEFINE_ENUM(a);
383 #define E_(a, b) TRACE_DEFINE_ENUM(a);
384 
385 afs_call_traces;
386 afs_fs_operations;
387 afs_vl_operations;
388 afs_edit_dir_ops;
389 afs_edit_dir_reasons;
390 afs_eproto_causes;
391 afs_io_errors;
392 afs_file_errors;
393 afs_flock_types;
394 afs_flock_operations;
395 
396 /*
397  * Now redefine the EM() and E_() macros to map the enums to the strings that
398  * will be printed in the output.
399  */
400 #undef EM
401 #undef E_
402 #define EM(a, b)	{ a, b },
403 #define E_(a, b)	{ a, b }
404 
405 TRACE_EVENT(afs_receive_data,
406 	    TP_PROTO(struct afs_call *call, struct iov_iter *iter,
407 		     bool want_more, int ret),
408 
409 	    TP_ARGS(call, iter, want_more, ret),
410 
411 	    TP_STRUCT__entry(
412 		    __field(loff_t,			remain		)
413 		    __field(unsigned int,		call		)
414 		    __field(enum afs_call_state,	state		)
415 		    __field(unsigned short,		unmarshall	)
416 		    __field(bool,			want_more	)
417 		    __field(int,			ret		)
418 			     ),
419 
420 	    TP_fast_assign(
421 		    __entry->call	= call->debug_id;
422 		    __entry->state	= call->state;
423 		    __entry->unmarshall	= call->unmarshall;
424 		    __entry->remain	= iov_iter_count(iter);
425 		    __entry->want_more	= want_more;
426 		    __entry->ret	= ret;
427 			   ),
428 
429 	    TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
430 		      __entry->call,
431 		      __entry->remain,
432 		      __entry->unmarshall,
433 		      __entry->want_more,
434 		      __entry->state,
435 		      __entry->ret)
436 	    );
437 
438 TRACE_EVENT(afs_notify_call,
439 	    TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call),
440 
441 	    TP_ARGS(rxcall, call),
442 
443 	    TP_STRUCT__entry(
444 		    __field(unsigned int,		call		)
445 		    __field(enum afs_call_state,	state		)
446 		    __field(unsigned short,		unmarshall	)
447 			     ),
448 
449 	    TP_fast_assign(
450 		    __entry->call	= call->debug_id;
451 		    __entry->state	= call->state;
452 		    __entry->unmarshall	= call->unmarshall;
453 			   ),
454 
455 	    TP_printk("c=%08x s=%u u=%u",
456 		      __entry->call,
457 		      __entry->state, __entry->unmarshall)
458 	    );
459 
460 TRACE_EVENT(afs_cb_call,
461 	    TP_PROTO(struct afs_call *call),
462 
463 	    TP_ARGS(call),
464 
465 	    TP_STRUCT__entry(
466 		    __field(unsigned int,		call		)
467 		    __field(const char *,		name		)
468 		    __field(u32,			op		)
469 			     ),
470 
471 	    TP_fast_assign(
472 		    __entry->call	= call->debug_id;
473 		    __entry->name	= call->type->name;
474 		    __entry->op		= call->operation_ID;
475 			   ),
476 
477 	    TP_printk("c=%08x %s o=%u",
478 		      __entry->call,
479 		      __entry->name,
480 		      __entry->op)
481 	    );
482 
483 TRACE_EVENT(afs_call,
484 	    TP_PROTO(struct afs_call *call, enum afs_call_trace op,
485 		     int usage, int outstanding, const void *where),
486 
487 	    TP_ARGS(call, op, usage, outstanding, where),
488 
489 	    TP_STRUCT__entry(
490 		    __field(unsigned int,		call		)
491 		    __field(int,			op		)
492 		    __field(int,			usage		)
493 		    __field(int,			outstanding	)
494 		    __field(const void *,		where		)
495 			     ),
496 
497 	    TP_fast_assign(
498 		    __entry->call = call->debug_id;
499 		    __entry->op = op;
500 		    __entry->usage = usage;
501 		    __entry->outstanding = outstanding;
502 		    __entry->where = where;
503 			   ),
504 
505 	    TP_printk("c=%08x %s u=%d o=%d sp=%pSR",
506 		      __entry->call,
507 		      __print_symbolic(__entry->op, afs_call_traces),
508 		      __entry->usage,
509 		      __entry->outstanding,
510 		      __entry->where)
511 	    );
512 
513 TRACE_EVENT(afs_make_fs_call,
514 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid),
515 
516 	    TP_ARGS(call, fid),
517 
518 	    TP_STRUCT__entry(
519 		    __field(unsigned int,		call		)
520 		    __field(enum afs_fs_operation,	op		)
521 		    __field_struct(struct afs_fid,	fid		)
522 			     ),
523 
524 	    TP_fast_assign(
525 		    __entry->call = call->debug_id;
526 		    __entry->op = call->operation_ID;
527 		    if (fid) {
528 			    __entry->fid = *fid;
529 		    } else {
530 			    __entry->fid.vid = 0;
531 			    __entry->fid.vnode = 0;
532 			    __entry->fid.unique = 0;
533 		    }
534 			   ),
535 
536 	    TP_printk("c=%08x %06llx:%06llx:%06x %s",
537 		      __entry->call,
538 		      __entry->fid.vid,
539 		      __entry->fid.vnode,
540 		      __entry->fid.unique,
541 		      __print_symbolic(__entry->op, afs_fs_operations))
542 	    );
543 
544 TRACE_EVENT(afs_make_fs_calli,
545 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
546 		     unsigned int i),
547 
548 	    TP_ARGS(call, fid, i),
549 
550 	    TP_STRUCT__entry(
551 		    __field(unsigned int,		call		)
552 		    __field(unsigned int,		i		)
553 		    __field(enum afs_fs_operation,	op		)
554 		    __field_struct(struct afs_fid,	fid		)
555 			     ),
556 
557 	    TP_fast_assign(
558 		    __entry->call = call->debug_id;
559 		    __entry->i = i;
560 		    __entry->op = call->operation_ID;
561 		    if (fid) {
562 			    __entry->fid = *fid;
563 		    } else {
564 			    __entry->fid.vid = 0;
565 			    __entry->fid.vnode = 0;
566 			    __entry->fid.unique = 0;
567 		    }
568 			   ),
569 
570 	    TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u",
571 		      __entry->call,
572 		      __entry->fid.vid,
573 		      __entry->fid.vnode,
574 		      __entry->fid.unique,
575 		      __print_symbolic(__entry->op, afs_fs_operations),
576 		      __entry->i)
577 	    );
578 
579 TRACE_EVENT(afs_make_fs_call1,
580 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
581 		     const char *name),
582 
583 	    TP_ARGS(call, fid, name),
584 
585 	    TP_STRUCT__entry(
586 		    __field(unsigned int,		call		)
587 		    __field(enum afs_fs_operation,	op		)
588 		    __field_struct(struct afs_fid,	fid		)
589 		    __array(char,			name, 24	)
590 			     ),
591 
592 	    TP_fast_assign(
593 		    int __len = strlen(name);
594 		    __len = min(__len, 23);
595 		    __entry->call = call->debug_id;
596 		    __entry->op = call->operation_ID;
597 		    if (fid) {
598 			    __entry->fid = *fid;
599 		    } else {
600 			    __entry->fid.vid = 0;
601 			    __entry->fid.vnode = 0;
602 			    __entry->fid.unique = 0;
603 		    }
604 		    memcpy(__entry->name, name, __len);
605 		    __entry->name[__len] = 0;
606 			   ),
607 
608 	    TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"",
609 		      __entry->call,
610 		      __entry->fid.vid,
611 		      __entry->fid.vnode,
612 		      __entry->fid.unique,
613 		      __print_symbolic(__entry->op, afs_fs_operations),
614 		      __entry->name)
615 	    );
616 
617 TRACE_EVENT(afs_make_fs_call2,
618 	    TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
619 		     const char *name, const char *name2),
620 
621 	    TP_ARGS(call, fid, name, name2),
622 
623 	    TP_STRUCT__entry(
624 		    __field(unsigned int,		call		)
625 		    __field(enum afs_fs_operation,	op		)
626 		    __field_struct(struct afs_fid,	fid		)
627 		    __array(char,			name, 24	)
628 		    __array(char,			name2, 24	)
629 			     ),
630 
631 	    TP_fast_assign(
632 		    int __len = strlen(name);
633 		    int __len2 = strlen(name2);
634 		    __len = min(__len, 23);
635 		    __len2 = min(__len2, 23);
636 		    __entry->call = call->debug_id;
637 		    __entry->op = call->operation_ID;
638 		    if (fid) {
639 			    __entry->fid = *fid;
640 		    } else {
641 			    __entry->fid.vid = 0;
642 			    __entry->fid.vnode = 0;
643 			    __entry->fid.unique = 0;
644 		    }
645 		    memcpy(__entry->name, name, __len);
646 		    __entry->name[__len] = 0;
647 		    memcpy(__entry->name2, name2, __len2);
648 		    __entry->name2[__len2] = 0;
649 			   ),
650 
651 	    TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"",
652 		      __entry->call,
653 		      __entry->fid.vid,
654 		      __entry->fid.vnode,
655 		      __entry->fid.unique,
656 		      __print_symbolic(__entry->op, afs_fs_operations),
657 		      __entry->name,
658 		      __entry->name2)
659 	    );
660 
661 TRACE_EVENT(afs_make_vl_call,
662 	    TP_PROTO(struct afs_call *call),
663 
664 	    TP_ARGS(call),
665 
666 	    TP_STRUCT__entry(
667 		    __field(unsigned int,		call		)
668 		    __field(enum afs_vl_operation,	op		)
669 			     ),
670 
671 	    TP_fast_assign(
672 		    __entry->call = call->debug_id;
673 		    __entry->op = call->operation_ID;
674 			   ),
675 
676 	    TP_printk("c=%08x %s",
677 		      __entry->call,
678 		      __print_symbolic(__entry->op, afs_vl_operations))
679 	    );
680 
681 TRACE_EVENT(afs_call_done,
682 	    TP_PROTO(struct afs_call *call),
683 
684 	    TP_ARGS(call),
685 
686 	    TP_STRUCT__entry(
687 		    __field(unsigned int,		call		)
688 		    __field(struct rxrpc_call *,	rx_call		)
689 		    __field(int,			ret		)
690 		    __field(u32,			abort_code	)
691 			     ),
692 
693 	    TP_fast_assign(
694 		    __entry->call = call->debug_id;
695 		    __entry->rx_call = call->rxcall;
696 		    __entry->ret = call->error;
697 		    __entry->abort_code = call->abort_code;
698 			   ),
699 
700 	    TP_printk("   c=%08x ret=%d ab=%d [%p]",
701 		      __entry->call,
702 		      __entry->ret,
703 		      __entry->abort_code,
704 		      __entry->rx_call)
705 	    );
706 
707 TRACE_EVENT(afs_send_pages,
708 	    TP_PROTO(struct afs_call *call, struct msghdr *msg,
709 		     pgoff_t first, pgoff_t last, unsigned int offset),
710 
711 	    TP_ARGS(call, msg, first, last, offset),
712 
713 	    TP_STRUCT__entry(
714 		    __field(unsigned int,		call		)
715 		    __field(pgoff_t,			first		)
716 		    __field(pgoff_t,			last		)
717 		    __field(unsigned int,		nr		)
718 		    __field(unsigned int,		bytes		)
719 		    __field(unsigned int,		offset		)
720 		    __field(unsigned int,		flags		)
721 			     ),
722 
723 	    TP_fast_assign(
724 		    __entry->call = call->debug_id;
725 		    __entry->first = first;
726 		    __entry->last = last;
727 		    __entry->nr = msg->msg_iter.nr_segs;
728 		    __entry->bytes = msg->msg_iter.count;
729 		    __entry->offset = offset;
730 		    __entry->flags = msg->msg_flags;
731 			   ),
732 
733 	    TP_printk(" c=%08x %lx-%lx-%lx b=%x o=%x f=%x",
734 		      __entry->call,
735 		      __entry->first, __entry->first + __entry->nr - 1, __entry->last,
736 		      __entry->bytes, __entry->offset,
737 		      __entry->flags)
738 	    );
739 
740 TRACE_EVENT(afs_sent_pages,
741 	    TP_PROTO(struct afs_call *call, pgoff_t first, pgoff_t last,
742 		     pgoff_t cursor, int ret),
743 
744 	    TP_ARGS(call, first, last, cursor, ret),
745 
746 	    TP_STRUCT__entry(
747 		    __field(unsigned int,		call		)
748 		    __field(pgoff_t,			first		)
749 		    __field(pgoff_t,			last		)
750 		    __field(pgoff_t,			cursor		)
751 		    __field(int,			ret		)
752 			     ),
753 
754 	    TP_fast_assign(
755 		    __entry->call = call->debug_id;
756 		    __entry->first = first;
757 		    __entry->last = last;
758 		    __entry->cursor = cursor;
759 		    __entry->ret = ret;
760 			   ),
761 
762 	    TP_printk(" c=%08x %lx-%lx c=%lx r=%d",
763 		      __entry->call,
764 		      __entry->first, __entry->last,
765 		      __entry->cursor, __entry->ret)
766 	    );
767 
768 TRACE_EVENT(afs_dir_check_failed,
769 	    TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size),
770 
771 	    TP_ARGS(vnode, off, i_size),
772 
773 	    TP_STRUCT__entry(
774 		    __field(struct afs_vnode *,		vnode		)
775 		    __field(loff_t,			off		)
776 		    __field(loff_t,			i_size		)
777 			     ),
778 
779 	    TP_fast_assign(
780 		    __entry->vnode = vnode;
781 		    __entry->off = off;
782 		    __entry->i_size = i_size;
783 			   ),
784 
785 	    TP_printk("vn=%p %llx/%llx",
786 		      __entry->vnode, __entry->off, __entry->i_size)
787 	    );
788 
789 /*
790  * We use page->private to hold the amount of the page that we've written to,
791  * splitting the field into two parts.  However, we need to represent a range
792  * 0...PAGE_SIZE inclusive, so we can't support 64K pages on a 32-bit system.
793  */
794 #if PAGE_SIZE > 32768
795 #define AFS_PRIV_MAX	0xffffffff
796 #define AFS_PRIV_SHIFT	32
797 #else
798 #define AFS_PRIV_MAX	0xffff
799 #define AFS_PRIV_SHIFT	16
800 #endif
801 
802 TRACE_EVENT(afs_page_dirty,
803 	    TP_PROTO(struct afs_vnode *vnode, const char *where,
804 		     pgoff_t page, unsigned long priv),
805 
806 	    TP_ARGS(vnode, where, page, priv),
807 
808 	    TP_STRUCT__entry(
809 		    __field(struct afs_vnode *,		vnode		)
810 		    __field(const char *,		where		)
811 		    __field(pgoff_t,			page		)
812 		    __field(unsigned long,		priv		)
813 			     ),
814 
815 	    TP_fast_assign(
816 		    __entry->vnode = vnode;
817 		    __entry->where = where;
818 		    __entry->page = page;
819 		    __entry->priv = priv;
820 			   ),
821 
822 	    TP_printk("vn=%p %lx %s %lu-%lu",
823 		      __entry->vnode, __entry->page, __entry->where,
824 		      __entry->priv & AFS_PRIV_MAX,
825 		      __entry->priv >> AFS_PRIV_SHIFT)
826 	    );
827 
828 TRACE_EVENT(afs_call_state,
829 	    TP_PROTO(struct afs_call *call,
830 		     enum afs_call_state from,
831 		     enum afs_call_state to,
832 		     int ret, u32 remote_abort),
833 
834 	    TP_ARGS(call, from, to, ret, remote_abort),
835 
836 	    TP_STRUCT__entry(
837 		    __field(unsigned int,		call		)
838 		    __field(enum afs_call_state,	from		)
839 		    __field(enum afs_call_state,	to		)
840 		    __field(int,			ret		)
841 		    __field(u32,			abort		)
842 			     ),
843 
844 	    TP_fast_assign(
845 		    __entry->call = call->debug_id;
846 		    __entry->from = from;
847 		    __entry->to = to;
848 		    __entry->ret = ret;
849 		    __entry->abort = remote_abort;
850 			   ),
851 
852 	    TP_printk("c=%08x %u->%u r=%d ab=%d",
853 		      __entry->call,
854 		      __entry->from, __entry->to,
855 		      __entry->ret, __entry->abort)
856 	    );
857 
858 TRACE_EVENT(afs_lookup,
859 	    TP_PROTO(struct afs_vnode *dvnode, const struct qstr *name,
860 		     struct afs_vnode *vnode),
861 
862 	    TP_ARGS(dvnode, name, vnode),
863 
864 	    TP_STRUCT__entry(
865 		    __field_struct(struct afs_fid,	dfid		)
866 		    __field_struct(struct afs_fid,	fid		)
867 		    __array(char,			name, 24	)
868 			     ),
869 
870 	    TP_fast_assign(
871 		    int __len = min_t(int, name->len, 23);
872 		    __entry->dfid = dvnode->fid;
873 		    if (vnode) {
874 			    __entry->fid = vnode->fid;
875 		    } else {
876 			    __entry->fid.vid = 0;
877 			    __entry->fid.vnode = 0;
878 			    __entry->fid.unique = 0;
879 		    }
880 		    memcpy(__entry->name, name->name, __len);
881 		    __entry->name[__len] = 0;
882 			   ),
883 
884 	    TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x",
885 		      __entry->dfid.vid, __entry->dfid.vnode, __entry->dfid.unique,
886 		      __entry->name,
887 		      __entry->fid.vnode, __entry->fid.unique)
888 	    );
889 
890 TRACE_EVENT(afs_edit_dir,
891 	    TP_PROTO(struct afs_vnode *dvnode,
892 		     enum afs_edit_dir_reason why,
893 		     enum afs_edit_dir_op op,
894 		     unsigned int block,
895 		     unsigned int slot,
896 		     unsigned int f_vnode,
897 		     unsigned int f_unique,
898 		     const char *name),
899 
900 	    TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name),
901 
902 	    TP_STRUCT__entry(
903 		    __field(unsigned int,		vnode		)
904 		    __field(unsigned int,		unique		)
905 		    __field(enum afs_edit_dir_reason,	why		)
906 		    __field(enum afs_edit_dir_op,	op		)
907 		    __field(unsigned int,		block		)
908 		    __field(unsigned short,		slot		)
909 		    __field(unsigned int,		f_vnode		)
910 		    __field(unsigned int,		f_unique	)
911 		    __array(char,			name, 24	)
912 			     ),
913 
914 	    TP_fast_assign(
915 		    int __len = strlen(name);
916 		    __len = min(__len, 23);
917 		    __entry->vnode	= dvnode->fid.vnode;
918 		    __entry->unique	= dvnode->fid.unique;
919 		    __entry->why	= why;
920 		    __entry->op		= op;
921 		    __entry->block	= block;
922 		    __entry->slot	= slot;
923 		    __entry->f_vnode	= f_vnode;
924 		    __entry->f_unique	= f_unique;
925 		    memcpy(__entry->name, name, __len);
926 		    __entry->name[__len] = 0;
927 			   ),
928 
929 	    TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"",
930 		      __entry->vnode, __entry->unique,
931 		      __print_symbolic(__entry->why, afs_edit_dir_reasons),
932 		      __print_symbolic(__entry->op, afs_edit_dir_ops),
933 		      __entry->block, __entry->slot,
934 		      __entry->f_vnode, __entry->f_unique,
935 		      __entry->name)
936 	    );
937 
938 TRACE_EVENT(afs_protocol_error,
939 	    TP_PROTO(struct afs_call *call, int error, enum afs_eproto_cause cause),
940 
941 	    TP_ARGS(call, error, cause),
942 
943 	    TP_STRUCT__entry(
944 		    __field(unsigned int,		call		)
945 		    __field(int,			error		)
946 		    __field(enum afs_eproto_cause,	cause		)
947 			     ),
948 
949 	    TP_fast_assign(
950 		    __entry->call = call ? call->debug_id : 0;
951 		    __entry->error = error;
952 		    __entry->cause = cause;
953 			   ),
954 
955 	    TP_printk("c=%08x r=%d %s",
956 		      __entry->call, __entry->error,
957 		      __print_symbolic(__entry->cause, afs_eproto_causes))
958 	    );
959 
960 TRACE_EVENT(afs_io_error,
961 	    TP_PROTO(unsigned int call, int error, enum afs_io_error where),
962 
963 	    TP_ARGS(call, error, where),
964 
965 	    TP_STRUCT__entry(
966 		    __field(unsigned int,	call		)
967 		    __field(int,		error		)
968 		    __field(enum afs_io_error,	where		)
969 			     ),
970 
971 	    TP_fast_assign(
972 		    __entry->call = call;
973 		    __entry->error = error;
974 		    __entry->where = where;
975 			   ),
976 
977 	    TP_printk("c=%08x r=%d %s",
978 		      __entry->call, __entry->error,
979 		      __print_symbolic(__entry->where, afs_io_errors))
980 	    );
981 
982 TRACE_EVENT(afs_file_error,
983 	    TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where),
984 
985 	    TP_ARGS(vnode, error, where),
986 
987 	    TP_STRUCT__entry(
988 		    __field_struct(struct afs_fid,	fid		)
989 		    __field(int,			error		)
990 		    __field(enum afs_file_error,	where		)
991 			     ),
992 
993 	    TP_fast_assign(
994 		    __entry->fid = vnode->fid;
995 		    __entry->error = error;
996 		    __entry->where = where;
997 			   ),
998 
999 	    TP_printk("%llx:%llx:%x r=%d %s",
1000 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1001 		      __entry->error,
1002 		      __print_symbolic(__entry->where, afs_file_errors))
1003 	    );
1004 
1005 TRACE_EVENT(afs_cm_no_server,
1006 	    TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx),
1007 
1008 	    TP_ARGS(call, srx),
1009 
1010 	    TP_STRUCT__entry(
1011 		    __field(unsigned int,			call	)
1012 		    __field(unsigned int,			op_id	)
1013 		    __field_struct(struct sockaddr_rxrpc,	srx	)
1014 			     ),
1015 
1016 	    TP_fast_assign(
1017 		    __entry->call = call->debug_id;
1018 		    __entry->op_id = call->operation_ID;
1019 		    memcpy(&__entry->srx, srx, sizeof(__entry->srx));
1020 			   ),
1021 
1022 	    TP_printk("c=%08x op=%u %pISpc",
1023 		      __entry->call, __entry->op_id, &__entry->srx.transport)
1024 	    );
1025 
1026 TRACE_EVENT(afs_cm_no_server_u,
1027 	    TP_PROTO(struct afs_call *call, const uuid_t *uuid),
1028 
1029 	    TP_ARGS(call, uuid),
1030 
1031 	    TP_STRUCT__entry(
1032 		    __field(unsigned int,			call	)
1033 		    __field(unsigned int,			op_id	)
1034 		    __field_struct(uuid_t,			uuid	)
1035 			     ),
1036 
1037 	    TP_fast_assign(
1038 		    __entry->call = call->debug_id;
1039 		    __entry->op_id = call->operation_ID;
1040 		    memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid));
1041 			   ),
1042 
1043 	    TP_printk("c=%08x op=%u %pU",
1044 		      __entry->call, __entry->op_id, &__entry->uuid)
1045 	    );
1046 
1047 TRACE_EVENT(afs_flock_ev,
1048 	    TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1049 		     enum afs_flock_event event, int error),
1050 
1051 	    TP_ARGS(vnode, fl, event, error),
1052 
1053 	    TP_STRUCT__entry(
1054 		    __field_struct(struct afs_fid,	fid		)
1055 		    __field(enum afs_flock_event,	event		)
1056 		    __field(enum afs_lock_state,	state		)
1057 		    __field(int,			error		)
1058 		    __field(unsigned int,		debug_id	)
1059 			     ),
1060 
1061 	    TP_fast_assign(
1062 		    __entry->fid = vnode->fid;
1063 		    __entry->event = event;
1064 		    __entry->state = vnode->lock_state;
1065 		    __entry->error = error;
1066 		    __entry->debug_id = fl ? fl->fl_u.afs.debug_id : 0;
1067 			   ),
1068 
1069 	    TP_printk("%llx:%llx:%x %04x %s s=%s e=%d",
1070 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1071 		      __entry->debug_id,
1072 		      __print_symbolic(__entry->event, afs_flock_events),
1073 		      __print_symbolic(__entry->state, afs_flock_states),
1074 		      __entry->error)
1075 	    );
1076 
1077 TRACE_EVENT(afs_flock_op,
1078 	    TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1079 		     enum afs_flock_operation op),
1080 
1081 	    TP_ARGS(vnode, fl, op),
1082 
1083 	    TP_STRUCT__entry(
1084 		    __field_struct(struct afs_fid,	fid		)
1085 		    __field(loff_t,			from		)
1086 		    __field(loff_t,			len		)
1087 		    __field(enum afs_flock_operation,	op		)
1088 		    __field(unsigned char,		type		)
1089 		    __field(unsigned int,		flags		)
1090 		    __field(unsigned int,		debug_id	)
1091 			     ),
1092 
1093 	    TP_fast_assign(
1094 		    __entry->fid = vnode->fid;
1095 		    __entry->from = fl->fl_start;
1096 		    __entry->len = fl->fl_end - fl->fl_start + 1;
1097 		    __entry->op = op;
1098 		    __entry->type = fl->fl_type;
1099 		    __entry->flags = fl->fl_flags;
1100 		    __entry->debug_id = fl->fl_u.afs.debug_id;
1101 			   ),
1102 
1103 	    TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x",
1104 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1105 		      __entry->debug_id,
1106 		      __print_symbolic(__entry->op, afs_flock_operations),
1107 		      __print_symbolic(__entry->type, afs_flock_types),
1108 		      __entry->from, __entry->len, __entry->flags)
1109 	    );
1110 
1111 TRACE_EVENT(afs_reload_dir,
1112 	    TP_PROTO(struct afs_vnode *vnode),
1113 
1114 	    TP_ARGS(vnode),
1115 
1116 	    TP_STRUCT__entry(
1117 		    __field_struct(struct afs_fid,	fid		)
1118 			     ),
1119 
1120 	    TP_fast_assign(
1121 		    __entry->fid = vnode->fid;
1122 			   ),
1123 
1124 	    TP_printk("%llx:%llx:%x",
1125 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique)
1126 	    );
1127 
1128 TRACE_EVENT(afs_silly_rename,
1129 	    TP_PROTO(struct afs_vnode *vnode, bool done),
1130 
1131 	    TP_ARGS(vnode, done),
1132 
1133 	    TP_STRUCT__entry(
1134 		    __field_struct(struct afs_fid,	fid		)
1135 		    __field(bool,			done		)
1136 			     ),
1137 
1138 	    TP_fast_assign(
1139 		    __entry->fid = vnode->fid;
1140 		    __entry->done = done;
1141 			   ),
1142 
1143 	    TP_printk("%llx:%llx:%x done=%u",
1144 		      __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1145 		      __entry->done)
1146 	    );
1147 
1148 TRACE_EVENT(afs_get_tree,
1149 	    TP_PROTO(struct afs_cell *cell, struct afs_volume *volume),
1150 
1151 	    TP_ARGS(cell, volume),
1152 
1153 	    TP_STRUCT__entry(
1154 		    __field(u64,			vid		)
1155 		    __array(char,			cell, 24	)
1156 		    __array(char,			volume, 24	)
1157 			     ),
1158 
1159 	    TP_fast_assign(
1160 		    int __len;
1161 		    __entry->vid = volume->vid;
1162 		    __len = min_t(int, cell->name_len, 23);
1163 		    memcpy(__entry->cell, cell->name, __len);
1164 		    __entry->cell[__len] = 0;
1165 		    __len = min_t(int, volume->name_len, 23);
1166 		    memcpy(__entry->volume, volume->name, __len);
1167 		    __entry->volume[__len] = 0;
1168 			   ),
1169 
1170 	    TP_printk("--- MOUNT %s:%s %llx",
1171 		      __entry->cell, __entry->volume, __entry->vid)
1172 	    );
1173 
1174 #endif /* _TRACE_AFS_H */
1175 
1176 /* This part must be outside protection */
1177 #include <trace/define_trace.h>
1178