1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
8 #define TRACE_SYSTEM afs
10 #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ)
13 #include <linux/tracepoint.h>
16 * Define enums for tracing information.
18 #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
19 #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY
30 enum afs_server_trace
{
31 afs_server_trace_alloc
,
32 afs_server_trace_callback
,
33 afs_server_trace_destroy
,
34 afs_server_trace_free
,
36 afs_server_trace_get_by_addr
,
37 afs_server_trace_get_by_uuid
,
38 afs_server_trace_get_caps
,
39 afs_server_trace_get_install
,
40 afs_server_trace_get_new_cbi
,
41 afs_server_trace_get_probe
,
42 afs_server_trace_give_up_cb
,
43 afs_server_trace_purging
,
44 afs_server_trace_put_call
,
45 afs_server_trace_put_cbi
,
46 afs_server_trace_put_find_rsq
,
47 afs_server_trace_put_probe
,
48 afs_server_trace_put_slist
,
49 afs_server_trace_put_slist_isort
,
50 afs_server_trace_put_uuid_rsq
,
51 afs_server_trace_update
,
55 enum afs_volume_trace
{
56 afs_volume_trace_alloc
,
57 afs_volume_trace_free
,
58 afs_volume_trace_get_alloc_sbi
,
59 afs_volume_trace_get_cell_insert
,
60 afs_volume_trace_get_new_op
,
61 afs_volume_trace_get_query_alias
,
62 afs_volume_trace_put_cell_dup
,
63 afs_volume_trace_put_cell_root
,
64 afs_volume_trace_put_destroy_sbi
,
65 afs_volume_trace_put_free_fc
,
66 afs_volume_trace_put_put_op
,
67 afs_volume_trace_put_query_alias
,
68 afs_volume_trace_put_validate_fc
,
69 afs_volume_trace_remove
,
75 afs_cell_trace_get_queue_dns
,
76 afs_cell_trace_get_queue_manage
,
77 afs_cell_trace_get_queue_new
,
78 afs_cell_trace_get_vol
,
79 afs_cell_trace_insert
,
80 afs_cell_trace_manage
,
81 afs_cell_trace_put_candidate
,
82 afs_cell_trace_put_destroy
,
83 afs_cell_trace_put_queue_fail
,
84 afs_cell_trace_put_queue_work
,
85 afs_cell_trace_put_vol
,
86 afs_cell_trace_see_source
,
87 afs_cell_trace_see_ws
,
88 afs_cell_trace_unuse_alias
,
89 afs_cell_trace_unuse_check_alias
,
90 afs_cell_trace_unuse_delete
,
91 afs_cell_trace_unuse_fc
,
92 afs_cell_trace_unuse_lookup
,
93 afs_cell_trace_unuse_mntpt
,
94 afs_cell_trace_unuse_no_pin
,
95 afs_cell_trace_unuse_parse
,
96 afs_cell_trace_unuse_pin
,
97 afs_cell_trace_unuse_probe
,
98 afs_cell_trace_unuse_sbi
,
99 afs_cell_trace_unuse_ws
,
100 afs_cell_trace_use_alias
,
101 afs_cell_trace_use_check_alias
,
102 afs_cell_trace_use_fc
,
103 afs_cell_trace_use_fc_alias
,
104 afs_cell_trace_use_lookup
,
105 afs_cell_trace_use_mntpt
,
106 afs_cell_trace_use_pin
,
107 afs_cell_trace_use_probe
,
108 afs_cell_trace_use_sbi
,
112 enum afs_fs_operation
{
113 afs_FS_FetchData
= 130, /* AFS Fetch file data */
114 afs_FS_FetchACL
= 131, /* AFS Fetch file ACL */
115 afs_FS_FetchStatus
= 132, /* AFS Fetch file status */
116 afs_FS_StoreData
= 133, /* AFS Store file data */
117 afs_FS_StoreACL
= 134, /* AFS Store file ACL */
118 afs_FS_StoreStatus
= 135, /* AFS Store file status */
119 afs_FS_RemoveFile
= 136, /* AFS Remove a file */
120 afs_FS_CreateFile
= 137, /* AFS Create a file */
121 afs_FS_Rename
= 138, /* AFS Rename or move a file or directory */
122 afs_FS_Symlink
= 139, /* AFS Create a symbolic link */
123 afs_FS_Link
= 140, /* AFS Create a hard link */
124 afs_FS_MakeDir
= 141, /* AFS Create a directory */
125 afs_FS_RemoveDir
= 142, /* AFS Remove a directory */
126 afs_FS_GetVolumeInfo
= 148, /* AFS Get information about a volume */
127 afs_FS_GetVolumeStatus
= 149, /* AFS Get volume status information */
128 afs_FS_GetRootVolume
= 151, /* AFS Get root volume name */
129 afs_FS_SetLock
= 156, /* AFS Request a file lock */
130 afs_FS_ExtendLock
= 157, /* AFS Extend a file lock */
131 afs_FS_ReleaseLock
= 158, /* AFS Release a file lock */
132 afs_FS_Lookup
= 161, /* AFS lookup file in directory */
133 afs_FS_InlineBulkStatus
= 65536, /* AFS Fetch multiple file statuses with errors */
134 afs_FS_FetchData64
= 65537, /* AFS Fetch file data */
135 afs_FS_StoreData64
= 65538, /* AFS Store file data */
136 afs_FS_GiveUpAllCallBacks
= 65539, /* AFS Give up all our callbacks on a server */
137 afs_FS_GetCapabilities
= 65540, /* AFS Get FS server capabilities */
139 yfs_FS_FetchData
= 130, /* YFS Fetch file data */
140 yfs_FS_FetchACL
= 64131, /* YFS Fetch file ACL */
141 yfs_FS_FetchStatus
= 64132, /* YFS Fetch file status */
142 yfs_FS_StoreACL
= 64134, /* YFS Store file ACL */
143 yfs_FS_StoreStatus
= 64135, /* YFS Store file status */
144 yfs_FS_RemoveFile
= 64136, /* YFS Remove a file */
145 yfs_FS_CreateFile
= 64137, /* YFS Create a file */
146 yfs_FS_Rename
= 64138, /* YFS Rename or move a file or directory */
147 yfs_FS_Symlink
= 64139, /* YFS Create a symbolic link */
148 yfs_FS_Link
= 64140, /* YFS Create a hard link */
149 yfs_FS_MakeDir
= 64141, /* YFS Create a directory */
150 yfs_FS_RemoveDir
= 64142, /* YFS Remove a directory */
151 yfs_FS_GetVolumeStatus
= 64149, /* YFS Get volume status information */
152 yfs_FS_SetVolumeStatus
= 64150, /* YFS Set volume status information */
153 yfs_FS_SetLock
= 64156, /* YFS Request a file lock */
154 yfs_FS_ExtendLock
= 64157, /* YFS Extend a file lock */
155 yfs_FS_ReleaseLock
= 64158, /* YFS Release a file lock */
156 yfs_FS_Lookup
= 64161, /* YFS lookup file in directory */
157 yfs_FS_FlushCPS
= 64165,
158 yfs_FS_FetchOpaqueACL
= 64168,
159 yfs_FS_WhoAmI
= 64170,
160 yfs_FS_RemoveACL
= 64171,
161 yfs_FS_RemoveFile2
= 64173,
162 yfs_FS_StoreOpaqueACL2
= 64174,
163 yfs_FS_InlineBulkStatus
= 64536, /* YFS Fetch multiple file statuses with errors */
164 yfs_FS_FetchData64
= 64537, /* YFS Fetch file data */
165 yfs_FS_StoreData64
= 64538, /* YFS Store file data */
166 yfs_FS_UpdateSymlink
= 64540,
169 enum afs_vl_operation
{
170 afs_VL_GetEntryByNameU
= 527, /* AFS Get Vol Entry By Name operation ID */
171 afs_VL_GetAddrsU
= 533, /* AFS Get FS server addresses */
172 afs_YFSVL_GetEndpoints
= 64002, /* YFS Get FS & Vol server addresses */
173 afs_YFSVL_GetCellName
= 64014, /* YFS Get actual cell name */
174 afs_VL_GetCapabilities
= 65537, /* AFS Get VL server capabilities */
177 enum afs_cm_operation
{
178 afs_CB_CallBack
= 204, /* AFS break callback promises */
179 afs_CB_InitCallBackState
= 205, /* AFS initialise callback state */
180 afs_CB_Probe
= 206, /* AFS probe client */
181 afs_CB_GetLock
= 207, /* AFS get contents of CM lock table */
182 afs_CB_GetCE
= 208, /* AFS get cache file description */
183 afs_CB_GetXStatsVersion
= 209, /* AFS get version of extended statistics */
184 afs_CB_GetXStats
= 210, /* AFS get contents of extended statistics data */
185 afs_CB_InitCallBackState3
= 213, /* AFS initialise callback state, version 3 */
186 afs_CB_ProbeUuid
= 214, /* AFS check the client hasn't rebooted */
189 enum yfs_cm_operation
{
190 yfs_CB_Probe
= 206, /* YFS probe client */
191 yfs_CB_GetLock
= 207, /* YFS get contents of CM lock table */
192 yfs_CB_XStatsVersion
= 209, /* YFS get version of extended statistics */
193 yfs_CB_GetXStats
= 210, /* YFS get contents of extended statistics data */
194 yfs_CB_InitCallBackState3
= 213, /* YFS initialise callback state, version 3 */
195 yfs_CB_ProbeUuid
= 214, /* YFS check the client hasn't rebooted */
196 yfs_CB_GetServerPrefs
= 215,
197 yfs_CB_GetCellServDV
= 216,
198 yfs_CB_GetLocalCell
= 217,
199 yfs_CB_GetCacheConfig
= 218,
200 yfs_CB_GetCellByNum
= 65537,
201 yfs_CB_TellMeAboutYourself
= 65538, /* get client capabilities */
202 yfs_CB_CallBack
= 64204,
205 enum afs_edit_dir_op
{
207 afs_edit_dir_create_error
,
208 afs_edit_dir_create_inval
,
209 afs_edit_dir_create_nospc
,
211 afs_edit_dir_delete_error
,
212 afs_edit_dir_delete_inval
,
213 afs_edit_dir_delete_noent
,
216 enum afs_edit_dir_reason
{
217 afs_edit_dir_for_create
,
218 afs_edit_dir_for_link
,
219 afs_edit_dir_for_mkdir
,
220 afs_edit_dir_for_rename_0
,
221 afs_edit_dir_for_rename_1
,
222 afs_edit_dir_for_rename_2
,
223 afs_edit_dir_for_rmdir
,
224 afs_edit_dir_for_silly_0
,
225 afs_edit_dir_for_silly_1
,
226 afs_edit_dir_for_symlink
,
227 afs_edit_dir_for_unlink
,
230 enum afs_eproto_cause
{
231 afs_eproto_bad_status
,
233 afs_eproto_cb_fid_count
,
234 afs_eproto_cellname_len
,
235 afs_eproto_file_type
,
236 afs_eproto_ibulkst_cb_count
,
237 afs_eproto_ibulkst_count
,
239 afs_eproto_offline_msg_len
,
240 afs_eproto_volname_len
,
241 afs_eproto_yvl_fsendpt4_len
,
242 afs_eproto_yvl_fsendpt6_len
,
243 afs_eproto_yvl_fsendpt_num
,
244 afs_eproto_yvl_fsendpt_type
,
245 afs_eproto_yvl_vlendpt4_len
,
246 afs_eproto_yvl_vlendpt6_len
,
247 afs_eproto_yvl_vlendpt_type
,
251 afs_io_error_cm_reply
,
252 afs_io_error_extract
,
253 afs_io_error_fs_probe_fail
,
254 afs_io_error_vl_lookup_fail
,
255 afs_io_error_vl_probe_fail
,
258 enum afs_file_error
{
259 afs_file_error_dir_bad_magic
,
260 afs_file_error_dir_big
,
261 afs_file_error_dir_missing_page
,
262 afs_file_error_dir_name_too_long
,
263 afs_file_error_dir_over_end
,
264 afs_file_error_dir_small
,
265 afs_file_error_dir_unmarked_ext
,
266 afs_file_error_mntpt
,
267 afs_file_error_writeback_fail
,
270 enum afs_flock_event
{
272 afs_flock_callback_break
,
273 afs_flock_defer_unlock
,
274 afs_flock_extend_fail
,
275 afs_flock_fail_other
,
277 afs_flock_no_lockers
,
278 afs_flock_release_fail
,
279 afs_flock_silly_delete
,
281 afs_flock_try_to_lock
,
283 afs_flock_vfs_locking
,
286 afs_flock_work_extending
,
287 afs_flock_work_retry
,
288 afs_flock_work_unlocking
,
289 afs_flock_would_block
,
292 enum afs_flock_operation
{
293 afs_flock_op_copy_lock
,
297 afs_flock_op_release_lock
,
298 afs_flock_op_return_ok
,
299 afs_flock_op_return_eagain
,
300 afs_flock_op_return_edeadlk
,
301 afs_flock_op_return_error
,
302 afs_flock_op_set_lock
,
307 enum afs_cb_break_reason
{
308 afs_cb_break_no_break
,
309 afs_cb_break_for_callback
,
310 afs_cb_break_for_deleted
,
311 afs_cb_break_for_lapsed
,
312 afs_cb_break_for_unlink
,
313 afs_cb_break_for_vsbreak
,
314 afs_cb_break_for_volume_callback
,
315 afs_cb_break_for_zap
,
318 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
321 * Declare tracing information enums and their string mappings for display.
323 #define afs_call_traces \
324 EM(afs_call_trace_alloc, "ALLOC") \
325 EM(afs_call_trace_free, "FREE ") \
326 EM(afs_call_trace_get, "GET ") \
327 EM(afs_call_trace_put, "PUT ") \
328 EM(afs_call_trace_wake, "WAKE ") \
329 E_(afs_call_trace_work, "QUEUE")
331 #define afs_server_traces \
332 EM(afs_server_trace_alloc, "ALLOC ") \
333 EM(afs_server_trace_callback, "CALLBACK ") \
334 EM(afs_server_trace_destroy, "DESTROY ") \
335 EM(afs_server_trace_free, "FREE ") \
336 EM(afs_server_trace_gc, "GC ") \
337 EM(afs_server_trace_get_by_addr, "GET addr ") \
338 EM(afs_server_trace_get_by_uuid, "GET uuid ") \
339 EM(afs_server_trace_get_caps, "GET caps ") \
340 EM(afs_server_trace_get_install, "GET inst ") \
341 EM(afs_server_trace_get_new_cbi, "GET cbi ") \
342 EM(afs_server_trace_get_probe, "GET probe") \
343 EM(afs_server_trace_give_up_cb, "giveup-cb") \
344 EM(afs_server_trace_purging, "PURGE ") \
345 EM(afs_server_trace_put_call, "PUT call ") \
346 EM(afs_server_trace_put_cbi, "PUT cbi ") \
347 EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \
348 EM(afs_server_trace_put_probe, "PUT probe") \
349 EM(afs_server_trace_put_slist, "PUT slist") \
350 EM(afs_server_trace_put_slist_isort, "PUT isort") \
351 EM(afs_server_trace_put_uuid_rsq, "PUT u-req") \
352 E_(afs_server_trace_update, "UPDATE")
354 #define afs_volume_traces \
355 EM(afs_volume_trace_alloc, "ALLOC ") \
356 EM(afs_volume_trace_free, "FREE ") \
357 EM(afs_volume_trace_get_alloc_sbi, "GET sbi-alloc ") \
358 EM(afs_volume_trace_get_cell_insert, "GET cell-insrt") \
359 EM(afs_volume_trace_get_new_op, "GET op-new ") \
360 EM(afs_volume_trace_get_query_alias, "GET cell-alias") \
361 EM(afs_volume_trace_put_cell_dup, "PUT cell-dup ") \
362 EM(afs_volume_trace_put_cell_root, "PUT cell-root ") \
363 EM(afs_volume_trace_put_destroy_sbi, "PUT sbi-destry") \
364 EM(afs_volume_trace_put_free_fc, "PUT fc-free ") \
365 EM(afs_volume_trace_put_put_op, "PUT op-put ") \
366 EM(afs_volume_trace_put_query_alias, "PUT cell-alias") \
367 EM(afs_volume_trace_put_validate_fc, "PUT fc-validat") \
368 E_(afs_volume_trace_remove, "REMOVE ")
370 #define afs_cell_traces \
371 EM(afs_cell_trace_alloc, "ALLOC ") \
372 EM(afs_cell_trace_free, "FREE ") \
373 EM(afs_cell_trace_get_queue_dns, "GET q-dns ") \
374 EM(afs_cell_trace_get_queue_manage, "GET q-mng ") \
375 EM(afs_cell_trace_get_queue_new, "GET q-new ") \
376 EM(afs_cell_trace_get_vol, "GET vol ") \
377 EM(afs_cell_trace_insert, "INSERT ") \
378 EM(afs_cell_trace_manage, "MANAGE ") \
379 EM(afs_cell_trace_put_candidate, "PUT candid") \
380 EM(afs_cell_trace_put_destroy, "PUT destry") \
381 EM(afs_cell_trace_put_queue_work, "PUT q-work") \
382 EM(afs_cell_trace_put_queue_fail, "PUT q-fail") \
383 EM(afs_cell_trace_put_vol, "PUT vol ") \
384 EM(afs_cell_trace_see_source, "SEE source") \
385 EM(afs_cell_trace_see_ws, "SEE ws ") \
386 EM(afs_cell_trace_unuse_alias, "UNU alias ") \
387 EM(afs_cell_trace_unuse_check_alias, "UNU chk-al") \
388 EM(afs_cell_trace_unuse_delete, "UNU delete") \
389 EM(afs_cell_trace_unuse_fc, "UNU fc ") \
390 EM(afs_cell_trace_unuse_lookup, "UNU lookup") \
391 EM(afs_cell_trace_unuse_mntpt, "UNU mntpt ") \
392 EM(afs_cell_trace_unuse_parse, "UNU parse ") \
393 EM(afs_cell_trace_unuse_pin, "UNU pin ") \
394 EM(afs_cell_trace_unuse_probe, "UNU probe ") \
395 EM(afs_cell_trace_unuse_sbi, "UNU sbi ") \
396 EM(afs_cell_trace_unuse_ws, "UNU ws ") \
397 EM(afs_cell_trace_use_alias, "USE alias ") \
398 EM(afs_cell_trace_use_check_alias, "USE chk-al") \
399 EM(afs_cell_trace_use_fc, "USE fc ") \
400 EM(afs_cell_trace_use_fc_alias, "USE fc-al ") \
401 EM(afs_cell_trace_use_lookup, "USE lookup") \
402 EM(afs_cell_trace_use_mntpt, "USE mntpt ") \
403 EM(afs_cell_trace_use_pin, "USE pin ") \
404 EM(afs_cell_trace_use_probe, "USE probe ") \
405 EM(afs_cell_trace_use_sbi, "USE sbi ") \
406 E_(afs_cell_trace_wait, "WAIT ")
408 #define afs_fs_operations \
409 EM(afs_FS_FetchData, "FS.FetchData") \
410 EM(afs_FS_FetchStatus, "FS.FetchStatus") \
411 EM(afs_FS_StoreData, "FS.StoreData") \
412 EM(afs_FS_StoreStatus, "FS.StoreStatus") \
413 EM(afs_FS_RemoveFile, "FS.RemoveFile") \
414 EM(afs_FS_CreateFile, "FS.CreateFile") \
415 EM(afs_FS_Rename, "FS.Rename") \
416 EM(afs_FS_Symlink, "FS.Symlink") \
417 EM(afs_FS_Link, "FS.Link") \
418 EM(afs_FS_MakeDir, "FS.MakeDir") \
419 EM(afs_FS_RemoveDir, "FS.RemoveDir") \
420 EM(afs_FS_GetVolumeInfo, "FS.GetVolumeInfo") \
421 EM(afs_FS_GetVolumeStatus, "FS.GetVolumeStatus") \
422 EM(afs_FS_GetRootVolume, "FS.GetRootVolume") \
423 EM(afs_FS_SetLock, "FS.SetLock") \
424 EM(afs_FS_ExtendLock, "FS.ExtendLock") \
425 EM(afs_FS_ReleaseLock, "FS.ReleaseLock") \
426 EM(afs_FS_Lookup, "FS.Lookup") \
427 EM(afs_FS_InlineBulkStatus, "FS.InlineBulkStatus") \
428 EM(afs_FS_FetchData64, "FS.FetchData64") \
429 EM(afs_FS_StoreData64, "FS.StoreData64") \
430 EM(afs_FS_GiveUpAllCallBacks, "FS.GiveUpAllCallBacks") \
431 EM(afs_FS_GetCapabilities, "FS.GetCapabilities") \
432 EM(yfs_FS_FetchACL, "YFS.FetchACL") \
433 EM(yfs_FS_FetchStatus, "YFS.FetchStatus") \
434 EM(yfs_FS_StoreACL, "YFS.StoreACL") \
435 EM(yfs_FS_StoreStatus, "YFS.StoreStatus") \
436 EM(yfs_FS_RemoveFile, "YFS.RemoveFile") \
437 EM(yfs_FS_CreateFile, "YFS.CreateFile") \
438 EM(yfs_FS_Rename, "YFS.Rename") \
439 EM(yfs_FS_Symlink, "YFS.Symlink") \
440 EM(yfs_FS_Link, "YFS.Link") \
441 EM(yfs_FS_MakeDir, "YFS.MakeDir") \
442 EM(yfs_FS_RemoveDir, "YFS.RemoveDir") \
443 EM(yfs_FS_GetVolumeStatus, "YFS.GetVolumeStatus") \
444 EM(yfs_FS_SetVolumeStatus, "YFS.SetVolumeStatus") \
445 EM(yfs_FS_SetLock, "YFS.SetLock") \
446 EM(yfs_FS_ExtendLock, "YFS.ExtendLock") \
447 EM(yfs_FS_ReleaseLock, "YFS.ReleaseLock") \
448 EM(yfs_FS_Lookup, "YFS.Lookup") \
449 EM(yfs_FS_FlushCPS, "YFS.FlushCPS") \
450 EM(yfs_FS_FetchOpaqueACL, "YFS.FetchOpaqueACL") \
451 EM(yfs_FS_WhoAmI, "YFS.WhoAmI") \
452 EM(yfs_FS_RemoveACL, "YFS.RemoveACL") \
453 EM(yfs_FS_RemoveFile2, "YFS.RemoveFile2") \
454 EM(yfs_FS_StoreOpaqueACL2, "YFS.StoreOpaqueACL2") \
455 EM(yfs_FS_InlineBulkStatus, "YFS.InlineBulkStatus") \
456 EM(yfs_FS_FetchData64, "YFS.FetchData64") \
457 EM(yfs_FS_StoreData64, "YFS.StoreData64") \
458 E_(yfs_FS_UpdateSymlink, "YFS.UpdateSymlink")
460 #define afs_vl_operations \
461 EM(afs_VL_GetEntryByNameU, "VL.GetEntryByNameU") \
462 EM(afs_VL_GetAddrsU, "VL.GetAddrsU") \
463 EM(afs_YFSVL_GetEndpoints, "YFSVL.GetEndpoints") \
464 EM(afs_YFSVL_GetCellName, "YFSVL.GetCellName") \
465 E_(afs_VL_GetCapabilities, "VL.GetCapabilities")
467 #define afs_cm_operations \
468 EM(afs_CB_CallBack, "CB.CallBack") \
469 EM(afs_CB_InitCallBackState, "CB.InitCallBackState") \
470 EM(afs_CB_Probe, "CB.Probe") \
471 EM(afs_CB_GetLock, "CB.GetLock") \
472 EM(afs_CB_GetCE, "CB.GetCE") \
473 EM(afs_CB_GetXStatsVersion, "CB.GetXStatsVersion") \
474 EM(afs_CB_GetXStats, "CB.GetXStats") \
475 EM(afs_CB_InitCallBackState3, "CB.InitCallBackState3") \
476 E_(afs_CB_ProbeUuid, "CB.ProbeUuid")
478 #define yfs_cm_operations \
479 EM(yfs_CB_Probe, "YFSCB.Probe") \
480 EM(yfs_CB_GetLock, "YFSCB.GetLock") \
481 EM(yfs_CB_XStatsVersion, "YFSCB.XStatsVersion") \
482 EM(yfs_CB_GetXStats, "YFSCB.GetXStats") \
483 EM(yfs_CB_InitCallBackState3, "YFSCB.InitCallBackState3") \
484 EM(yfs_CB_ProbeUuid, "YFSCB.ProbeUuid") \
485 EM(yfs_CB_GetServerPrefs, "YFSCB.GetServerPrefs") \
486 EM(yfs_CB_GetCellServDV, "YFSCB.GetCellServDV") \
487 EM(yfs_CB_GetLocalCell, "YFSCB.GetLocalCell") \
488 EM(yfs_CB_GetCacheConfig, "YFSCB.GetCacheConfig") \
489 EM(yfs_CB_GetCellByNum, "YFSCB.GetCellByNum") \
490 EM(yfs_CB_TellMeAboutYourself, "YFSCB.TellMeAboutYourself") \
491 E_(yfs_CB_CallBack, "YFSCB.CallBack")
493 #define afs_edit_dir_ops \
494 EM(afs_edit_dir_create, "create") \
495 EM(afs_edit_dir_create_error, "c_fail") \
496 EM(afs_edit_dir_create_inval, "c_invl") \
497 EM(afs_edit_dir_create_nospc, "c_nspc") \
498 EM(afs_edit_dir_delete, "delete") \
499 EM(afs_edit_dir_delete_error, "d_err ") \
500 EM(afs_edit_dir_delete_inval, "d_invl") \
501 E_(afs_edit_dir_delete_noent, "d_nent")
503 #define afs_edit_dir_reasons \
504 EM(afs_edit_dir_for_create, "Create") \
505 EM(afs_edit_dir_for_link, "Link ") \
506 EM(afs_edit_dir_for_mkdir, "MkDir ") \
507 EM(afs_edit_dir_for_rename_0, "Renam0") \
508 EM(afs_edit_dir_for_rename_1, "Renam1") \
509 EM(afs_edit_dir_for_rename_2, "Renam2") \
510 EM(afs_edit_dir_for_rmdir, "RmDir ") \
511 EM(afs_edit_dir_for_silly_0, "S_Ren0") \
512 EM(afs_edit_dir_for_silly_1, "S_Ren1") \
513 EM(afs_edit_dir_for_symlink, "Symlnk") \
514 E_(afs_edit_dir_for_unlink, "Unlink")
516 #define afs_eproto_causes \
517 EM(afs_eproto_bad_status, "BadStatus") \
518 EM(afs_eproto_cb_count, "CbCount") \
519 EM(afs_eproto_cb_fid_count, "CbFidCount") \
520 EM(afs_eproto_cellname_len, "CellNameLen") \
521 EM(afs_eproto_file_type, "FileTYpe") \
522 EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \
523 EM(afs_eproto_ibulkst_count, "IBS.FidCount") \
524 EM(afs_eproto_motd_len, "MotdLen") \
525 EM(afs_eproto_offline_msg_len, "OfflineMsgLen") \
526 EM(afs_eproto_volname_len, "VolNameLen") \
527 EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \
528 EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \
529 EM(afs_eproto_yvl_fsendpt_num, "YVL.FsEndCount") \
530 EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \
531 EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \
532 EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \
533 E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType")
535 #define afs_io_errors \
536 EM(afs_io_error_cm_reply, "CM_REPLY") \
537 EM(afs_io_error_extract, "EXTRACT") \
538 EM(afs_io_error_fs_probe_fail, "FS_PROBE_FAIL") \
539 EM(afs_io_error_vl_lookup_fail, "VL_LOOKUP_FAIL") \
540 E_(afs_io_error_vl_probe_fail, "VL_PROBE_FAIL")
542 #define afs_file_errors \
543 EM(afs_file_error_dir_bad_magic, "DIR_BAD_MAGIC") \
544 EM(afs_file_error_dir_big, "DIR_BIG") \
545 EM(afs_file_error_dir_missing_page, "DIR_MISSING_PAGE") \
546 EM(afs_file_error_dir_name_too_long, "DIR_NAME_TOO_LONG") \
547 EM(afs_file_error_dir_over_end, "DIR_ENT_OVER_END") \
548 EM(afs_file_error_dir_small, "DIR_SMALL") \
549 EM(afs_file_error_dir_unmarked_ext, "DIR_UNMARKED_EXT") \
550 EM(afs_file_error_mntpt, "MNTPT_READ_FAILED") \
551 E_(afs_file_error_writeback_fail, "WRITEBACK_FAILED")
553 #define afs_flock_types \
554 EM(F_RDLCK, "RDLCK") \
555 EM(F_WRLCK, "WRLCK") \
558 #define afs_flock_states \
559 EM(AFS_VNODE_LOCK_NONE, "NONE") \
560 EM(AFS_VNODE_LOCK_WAITING_FOR_CB, "WAIT_FOR_CB") \
561 EM(AFS_VNODE_LOCK_SETTING, "SETTING") \
562 EM(AFS_VNODE_LOCK_GRANTED, "GRANTED") \
563 EM(AFS_VNODE_LOCK_EXTENDING, "EXTENDING") \
564 EM(AFS_VNODE_LOCK_NEED_UNLOCK, "NEED_UNLOCK") \
565 EM(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \
566 E_(AFS_VNODE_LOCK_DELETED, "DELETED")
568 #define afs_flock_events \
569 EM(afs_flock_acquired, "Acquired") \
570 EM(afs_flock_callback_break, "Callback") \
571 EM(afs_flock_defer_unlock, "D-Unlock") \
572 EM(afs_flock_extend_fail, "Ext_Fail") \
573 EM(afs_flock_fail_other, "ErrOther") \
574 EM(afs_flock_fail_perm, "ErrPerm ") \
575 EM(afs_flock_no_lockers, "NoLocker") \
576 EM(afs_flock_release_fail, "Rel_Fail") \
577 EM(afs_flock_silly_delete, "SillyDel") \
578 EM(afs_flock_timestamp, "Timestmp") \
579 EM(afs_flock_try_to_lock, "TryToLck") \
580 EM(afs_flock_vfs_lock, "VFSLock ") \
581 EM(afs_flock_vfs_locking, "VFSLking") \
582 EM(afs_flock_waited, "Waited ") \
583 EM(afs_flock_waiting, "Waiting ") \
584 EM(afs_flock_work_extending, "Extendng") \
585 EM(afs_flock_work_retry, "Retry ") \
586 EM(afs_flock_work_unlocking, "Unlcking") \
587 E_(afs_flock_would_block, "EWOULDBL")
589 #define afs_flock_operations \
590 EM(afs_flock_op_copy_lock, "COPY ") \
591 EM(afs_flock_op_flock, "->flock ") \
592 EM(afs_flock_op_grant, "GRANT ") \
593 EM(afs_flock_op_lock, "->lock ") \
594 EM(afs_flock_op_release_lock, "RELEASE ") \
595 EM(afs_flock_op_return_ok, "<-OK ") \
596 EM(afs_flock_op_return_edeadlk, "<-EDEADL") \
597 EM(afs_flock_op_return_eagain, "<-EAGAIN") \
598 EM(afs_flock_op_return_error, "<-ERROR ") \
599 EM(afs_flock_op_set_lock, "SET ") \
600 EM(afs_flock_op_unlock, "UNLOCK ") \
601 E_(afs_flock_op_wake, "WAKE ")
603 #define afs_cb_break_reasons \
604 EM(afs_cb_break_no_break, "no-break") \
605 EM(afs_cb_break_for_callback, "break-cb") \
606 EM(afs_cb_break_for_deleted, "break-del") \
607 EM(afs_cb_break_for_lapsed, "break-lapsed") \
608 EM(afs_cb_break_for_unlink, "break-unlink") \
609 EM(afs_cb_break_for_vsbreak, "break-vs") \
610 EM(afs_cb_break_for_volume_callback, "break-v-cb") \
611 E_(afs_cb_break_for_zap, "break-zap")
614 * Export enum symbols via userspace.
618 #define EM(a, b) TRACE_DEFINE_ENUM(a);
619 #define E_(a, b) TRACE_DEFINE_ENUM(a);
629 afs_edit_dir_reasons
;
634 afs_flock_operations
;
635 afs_cb_break_reasons
;
638 * Now redefine the EM() and E_() macros to map the enums to the strings that
639 * will be printed in the output.
643 #define EM(a, b) { a, b },
644 #define E_(a, b) { a, b }
646 TRACE_EVENT(afs_receive_data
,
647 TP_PROTO(struct afs_call
*call
, struct iov_iter
*iter
,
648 bool want_more
, int ret
),
650 TP_ARGS(call
, iter
, want_more
, ret
),
653 __field(loff_t
, remain
)
654 __field(unsigned int, call
)
655 __field(enum afs_call_state
, state
)
656 __field(unsigned short, unmarshall
)
657 __field(bool, want_more
)
662 __entry
->call
= call
->debug_id
;
663 __entry
->state
= call
->state
;
664 __entry
->unmarshall
= call
->unmarshall
;
665 __entry
->remain
= iov_iter_count(iter
);
666 __entry
->want_more
= want_more
;
670 TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
679 TRACE_EVENT(afs_notify_call
,
680 TP_PROTO(struct rxrpc_call
*rxcall
, struct afs_call
*call
),
682 TP_ARGS(rxcall
, call
),
685 __field(unsigned int, call
)
686 __field(enum afs_call_state
, state
)
687 __field(unsigned short, unmarshall
)
691 __entry
->call
= call
->debug_id
;
692 __entry
->state
= call
->state
;
693 __entry
->unmarshall
= call
->unmarshall
;
696 TP_printk("c=%08x s=%u u=%u",
698 __entry
->state
, __entry
->unmarshall
)
701 TRACE_EVENT(afs_cb_call
,
702 TP_PROTO(struct afs_call
*call
),
707 __field(unsigned int, call
)
709 __field(u16
, service_id
)
713 __entry
->call
= call
->debug_id
;
714 __entry
->op
= call
->operation_ID
;
715 __entry
->service_id
= call
->service_id
;
718 TP_printk("c=%08x %s",
720 __entry
->service_id
== 2501 ?
721 __print_symbolic(__entry
->op
, yfs_cm_operations
) :
722 __print_symbolic(__entry
->op
, afs_cm_operations
))
725 TRACE_EVENT(afs_call
,
726 TP_PROTO(struct afs_call
*call
, enum afs_call_trace op
,
727 int usage
, int outstanding
, const void *where
),
729 TP_ARGS(call
, op
, usage
, outstanding
, where
),
732 __field(unsigned int, call
)
735 __field(int, outstanding
)
736 __field(const void *, where
)
740 __entry
->call
= call
->debug_id
;
742 __entry
->usage
= usage
;
743 __entry
->outstanding
= outstanding
;
744 __entry
->where
= where
;
747 TP_printk("c=%08x %s u=%d o=%d sp=%pSR",
749 __print_symbolic(__entry
->op
, afs_call_traces
),
751 __entry
->outstanding
,
755 TRACE_EVENT(afs_make_fs_call
,
756 TP_PROTO(struct afs_call
*call
, const struct afs_fid
*fid
),
761 __field(unsigned int, call
)
762 __field(enum afs_fs_operation
, op
)
763 __field_struct(struct afs_fid
, fid
)
767 __entry
->call
= call
->debug_id
;
768 __entry
->op
= call
->operation_ID
;
772 __entry
->fid
.vid
= 0;
773 __entry
->fid
.vnode
= 0;
774 __entry
->fid
.unique
= 0;
778 TP_printk("c=%08x %06llx:%06llx:%06x %s",
783 __print_symbolic(__entry
->op
, afs_fs_operations
))
786 TRACE_EVENT(afs_make_fs_calli
,
787 TP_PROTO(struct afs_call
*call
, const struct afs_fid
*fid
,
790 TP_ARGS(call
, fid
, i
),
793 __field(unsigned int, call
)
794 __field(unsigned int, i
)
795 __field(enum afs_fs_operation
, op
)
796 __field_struct(struct afs_fid
, fid
)
800 __entry
->call
= call
->debug_id
;
802 __entry
->op
= call
->operation_ID
;
806 __entry
->fid
.vid
= 0;
807 __entry
->fid
.vnode
= 0;
808 __entry
->fid
.unique
= 0;
812 TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u",
817 __print_symbolic(__entry
->op
, afs_fs_operations
),
821 TRACE_EVENT(afs_make_fs_call1
,
822 TP_PROTO(struct afs_call
*call
, const struct afs_fid
*fid
,
823 const struct qstr
*name
),
825 TP_ARGS(call
, fid
, name
),
828 __field(unsigned int, call
)
829 __field(enum afs_fs_operation
, op
)
830 __field_struct(struct afs_fid
, fid
)
831 __array(char, name
, 24 )
835 unsigned int __len
= min_t(unsigned int, name
->len
, 23);
836 __entry
->call
= call
->debug_id
;
837 __entry
->op
= call
->operation_ID
;
841 __entry
->fid
.vid
= 0;
842 __entry
->fid
.vnode
= 0;
843 __entry
->fid
.unique
= 0;
845 memcpy(__entry
->name
, name
->name
, __len
);
846 __entry
->name
[__len
] = 0;
849 TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"",
854 __print_symbolic(__entry
->op
, afs_fs_operations
),
858 TRACE_EVENT(afs_make_fs_call2
,
859 TP_PROTO(struct afs_call
*call
, const struct afs_fid
*fid
,
860 const struct qstr
*name
, const struct qstr
*name2
),
862 TP_ARGS(call
, fid
, name
, name2
),
865 __field(unsigned int, call
)
866 __field(enum afs_fs_operation
, op
)
867 __field_struct(struct afs_fid
, fid
)
868 __array(char, name
, 24 )
869 __array(char, name2
, 24 )
873 unsigned int __len
= min_t(unsigned int, name
->len
, 23);
874 unsigned int __len2
= min_t(unsigned int, name2
->len
, 23);
875 __entry
->call
= call
->debug_id
;
876 __entry
->op
= call
->operation_ID
;
880 __entry
->fid
.vid
= 0;
881 __entry
->fid
.vnode
= 0;
882 __entry
->fid
.unique
= 0;
884 memcpy(__entry
->name
, name
->name
, __len
);
885 __entry
->name
[__len
] = 0;
886 memcpy(__entry
->name2
, name2
->name
, __len2
);
887 __entry
->name2
[__len2
] = 0;
890 TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"",
895 __print_symbolic(__entry
->op
, afs_fs_operations
),
900 TRACE_EVENT(afs_make_vl_call
,
901 TP_PROTO(struct afs_call
*call
),
906 __field(unsigned int, call
)
907 __field(enum afs_vl_operation
, op
)
911 __entry
->call
= call
->debug_id
;
912 __entry
->op
= call
->operation_ID
;
915 TP_printk("c=%08x %s",
917 __print_symbolic(__entry
->op
, afs_vl_operations
))
920 TRACE_EVENT(afs_call_done
,
921 TP_PROTO(struct afs_call
*call
),
926 __field(unsigned int, call
)
927 __field(struct rxrpc_call
*, rx_call
)
929 __field(u32
, abort_code
)
933 __entry
->call
= call
->debug_id
;
934 __entry
->rx_call
= call
->rxcall
;
935 __entry
->ret
= call
->error
;
936 __entry
->abort_code
= call
->abort_code
;
939 TP_printk(" c=%08x ret=%d ab=%d [%p]",
946 TRACE_EVENT(afs_send_data
,
947 TP_PROTO(struct afs_call
*call
, struct msghdr
*msg
),
952 __field(unsigned int, call
)
953 __field(unsigned int, flags
)
954 __field(loff_t
, offset
)
955 __field(loff_t
, count
)
959 __entry
->call
= call
->debug_id
;
960 __entry
->flags
= msg
->msg_flags
;
961 __entry
->offset
= msg
->msg_iter
.xarray_start
+ msg
->msg_iter
.iov_offset
;
962 __entry
->count
= iov_iter_count(&msg
->msg_iter
);
965 TP_printk(" c=%08x o=%llx n=%llx f=%x",
966 __entry
->call
, __entry
->offset
, __entry
->count
,
970 TRACE_EVENT(afs_sent_data
,
971 TP_PROTO(struct afs_call
*call
, struct msghdr
*msg
, int ret
),
973 TP_ARGS(call
, msg
, ret
),
976 __field(unsigned int, call
)
978 __field(loff_t
, offset
)
979 __field(loff_t
, count
)
983 __entry
->call
= call
->debug_id
;
985 __entry
->offset
= msg
->msg_iter
.xarray_start
+ msg
->msg_iter
.iov_offset
;
986 __entry
->count
= iov_iter_count(&msg
->msg_iter
);
989 TP_printk(" c=%08x o=%llx n=%llx r=%x",
990 __entry
->call
, __entry
->offset
, __entry
->count
,
994 TRACE_EVENT(afs_dir_check_failed
,
995 TP_PROTO(struct afs_vnode
*vnode
, loff_t off
, loff_t i_size
),
997 TP_ARGS(vnode
, off
, i_size
),
1000 __field(struct afs_vnode
*, vnode
)
1001 __field(loff_t
, off
)
1002 __field(loff_t
, i_size
)
1006 __entry
->vnode
= vnode
;
1008 __entry
->i_size
= i_size
;
1011 TP_printk("vn=%p %llx/%llx",
1012 __entry
->vnode
, __entry
->off
, __entry
->i_size
)
1015 TRACE_EVENT(afs_page_dirty
,
1016 TP_PROTO(struct afs_vnode
*vnode
, const char *where
, struct page
*page
),
1018 TP_ARGS(vnode
, where
, page
),
1021 __field(struct afs_vnode
*, vnode
)
1022 __field(const char *, where
)
1023 __field(pgoff_t
, page
)
1024 __field(unsigned long, from
)
1025 __field(unsigned long, to
)
1029 __entry
->vnode
= vnode
;
1030 __entry
->where
= where
;
1031 __entry
->page
= page
->index
;
1032 __entry
->from
= afs_page_dirty_from(page
, page
->private);
1033 __entry
->to
= afs_page_dirty_to(page
, page
->private);
1034 __entry
->to
|= (afs_is_page_dirty_mmapped(page
->private) ?
1035 (1UL << (BITS_PER_LONG
- 1)) : 0);
1038 TP_printk("vn=%p %lx %s %lx-%lx%s",
1039 __entry
->vnode
, __entry
->page
, __entry
->where
,
1041 __entry
->to
& ~(1UL << (BITS_PER_LONG
- 1)),
1042 __entry
->to
& (1UL << (BITS_PER_LONG
- 1)) ? " M" : "")
1045 TRACE_EVENT(afs_call_state
,
1046 TP_PROTO(struct afs_call
*call
,
1047 enum afs_call_state from
,
1048 enum afs_call_state to
,
1049 int ret
, u32 remote_abort
),
1051 TP_ARGS(call
, from
, to
, ret
, remote_abort
),
1054 __field(unsigned int, call
)
1055 __field(enum afs_call_state
, from
)
1056 __field(enum afs_call_state
, to
)
1058 __field(u32
, abort
)
1062 __entry
->call
= call
->debug_id
;
1063 __entry
->from
= from
;
1066 __entry
->abort
= remote_abort
;
1069 TP_printk("c=%08x %u->%u r=%d ab=%d",
1071 __entry
->from
, __entry
->to
,
1072 __entry
->ret
, __entry
->abort
)
1075 TRACE_EVENT(afs_lookup
,
1076 TP_PROTO(struct afs_vnode
*dvnode
, const struct qstr
*name
,
1077 struct afs_fid
*fid
),
1079 TP_ARGS(dvnode
, name
, fid
),
1082 __field_struct(struct afs_fid
, dfid
)
1083 __field_struct(struct afs_fid
, fid
)
1084 __array(char, name
, 24 )
1088 int __len
= min_t(int, name
->len
, 23);
1089 __entry
->dfid
= dvnode
->fid
;
1090 __entry
->fid
= *fid
;
1091 memcpy(__entry
->name
, name
->name
, __len
);
1092 __entry
->name
[__len
] = 0;
1095 TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x",
1096 __entry
->dfid
.vid
, __entry
->dfid
.vnode
, __entry
->dfid
.unique
,
1098 __entry
->fid
.vnode
, __entry
->fid
.unique
)
1101 TRACE_EVENT(afs_edit_dir
,
1102 TP_PROTO(struct afs_vnode
*dvnode
,
1103 enum afs_edit_dir_reason why
,
1104 enum afs_edit_dir_op op
,
1107 unsigned int f_vnode
,
1108 unsigned int f_unique
,
1111 TP_ARGS(dvnode
, why
, op
, block
, slot
, f_vnode
, f_unique
, name
),
1114 __field(unsigned int, vnode
)
1115 __field(unsigned int, unique
)
1116 __field(enum afs_edit_dir_reason
, why
)
1117 __field(enum afs_edit_dir_op
, op
)
1118 __field(unsigned int, block
)
1119 __field(unsigned short, slot
)
1120 __field(unsigned int, f_vnode
)
1121 __field(unsigned int, f_unique
)
1122 __array(char, name
, 24 )
1126 int __len
= strlen(name
);
1127 __len
= min(__len
, 23);
1128 __entry
->vnode
= dvnode
->fid
.vnode
;
1129 __entry
->unique
= dvnode
->fid
.unique
;
1132 __entry
->block
= block
;
1133 __entry
->slot
= slot
;
1134 __entry
->f_vnode
= f_vnode
;
1135 __entry
->f_unique
= f_unique
;
1136 memcpy(__entry
->name
, name
, __len
);
1137 __entry
->name
[__len
] = 0;
1140 TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"",
1141 __entry
->vnode
, __entry
->unique
,
1142 __print_symbolic(__entry
->why
, afs_edit_dir_reasons
),
1143 __print_symbolic(__entry
->op
, afs_edit_dir_ops
),
1144 __entry
->block
, __entry
->slot
,
1145 __entry
->f_vnode
, __entry
->f_unique
,
1149 TRACE_EVENT(afs_protocol_error
,
1150 TP_PROTO(struct afs_call
*call
, enum afs_eproto_cause cause
),
1152 TP_ARGS(call
, cause
),
1155 __field(unsigned int, call
)
1156 __field(enum afs_eproto_cause
, cause
)
1160 __entry
->call
= call
? call
->debug_id
: 0;
1161 __entry
->cause
= cause
;
1164 TP_printk("c=%08x %s",
1166 __print_symbolic(__entry
->cause
, afs_eproto_causes
))
1169 TRACE_EVENT(afs_io_error
,
1170 TP_PROTO(unsigned int call
, int error
, enum afs_io_error where
),
1172 TP_ARGS(call
, error
, where
),
1175 __field(unsigned int, call
)
1176 __field(int, error
)
1177 __field(enum afs_io_error
, where
)
1181 __entry
->call
= call
;
1182 __entry
->error
= error
;
1183 __entry
->where
= where
;
1186 TP_printk("c=%08x r=%d %s",
1187 __entry
->call
, __entry
->error
,
1188 __print_symbolic(__entry
->where
, afs_io_errors
))
1191 TRACE_EVENT(afs_file_error
,
1192 TP_PROTO(struct afs_vnode
*vnode
, int error
, enum afs_file_error where
),
1194 TP_ARGS(vnode
, error
, where
),
1197 __field_struct(struct afs_fid
, fid
)
1198 __field(int, error
)
1199 __field(enum afs_file_error
, where
)
1203 __entry
->fid
= vnode
->fid
;
1204 __entry
->error
= error
;
1205 __entry
->where
= where
;
1208 TP_printk("%llx:%llx:%x r=%d %s",
1209 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1211 __print_symbolic(__entry
->where
, afs_file_errors
))
1214 TRACE_EVENT(afs_cm_no_server
,
1215 TP_PROTO(struct afs_call
*call
, struct sockaddr_rxrpc
*srx
),
1220 __field(unsigned int, call
)
1221 __field(unsigned int, op_id
)
1222 __field_struct(struct sockaddr_rxrpc
, srx
)
1226 __entry
->call
= call
->debug_id
;
1227 __entry
->op_id
= call
->operation_ID
;
1228 memcpy(&__entry
->srx
, srx
, sizeof(__entry
->srx
));
1231 TP_printk("c=%08x op=%u %pISpc",
1232 __entry
->call
, __entry
->op_id
, &__entry
->srx
.transport
)
1235 TRACE_EVENT(afs_cm_no_server_u
,
1236 TP_PROTO(struct afs_call
*call
, const uuid_t
*uuid
),
1238 TP_ARGS(call
, uuid
),
1241 __field(unsigned int, call
)
1242 __field(unsigned int, op_id
)
1243 __field_struct(uuid_t
, uuid
)
1247 __entry
->call
= call
->debug_id
;
1248 __entry
->op_id
= call
->operation_ID
;
1249 memcpy(&__entry
->uuid
, uuid
, sizeof(__entry
->uuid
));
1252 TP_printk("c=%08x op=%u %pU",
1253 __entry
->call
, __entry
->op_id
, &__entry
->uuid
)
1256 TRACE_EVENT(afs_flock_ev
,
1257 TP_PROTO(struct afs_vnode
*vnode
, struct file_lock
*fl
,
1258 enum afs_flock_event event
, int error
),
1260 TP_ARGS(vnode
, fl
, event
, error
),
1263 __field_struct(struct afs_fid
, fid
)
1264 __field(enum afs_flock_event
, event
)
1265 __field(enum afs_lock_state
, state
)
1266 __field(int, error
)
1267 __field(unsigned int, debug_id
)
1271 __entry
->fid
= vnode
->fid
;
1272 __entry
->event
= event
;
1273 __entry
->state
= vnode
->lock_state
;
1274 __entry
->error
= error
;
1275 __entry
->debug_id
= fl
? fl
->fl_u
.afs
.debug_id
: 0;
1278 TP_printk("%llx:%llx:%x %04x %s s=%s e=%d",
1279 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1281 __print_symbolic(__entry
->event
, afs_flock_events
),
1282 __print_symbolic(__entry
->state
, afs_flock_states
),
1286 TRACE_EVENT(afs_flock_op
,
1287 TP_PROTO(struct afs_vnode
*vnode
, struct file_lock
*fl
,
1288 enum afs_flock_operation op
),
1290 TP_ARGS(vnode
, fl
, op
),
1293 __field_struct(struct afs_fid
, fid
)
1294 __field(loff_t
, from
)
1295 __field(loff_t
, len
)
1296 __field(enum afs_flock_operation
, op
)
1297 __field(unsigned char, type
)
1298 __field(unsigned int, flags
)
1299 __field(unsigned int, debug_id
)
1303 __entry
->fid
= vnode
->fid
;
1304 __entry
->from
= fl
->fl_start
;
1305 __entry
->len
= fl
->fl_end
- fl
->fl_start
+ 1;
1307 __entry
->type
= fl
->fl_type
;
1308 __entry
->flags
= fl
->fl_flags
;
1309 __entry
->debug_id
= fl
->fl_u
.afs
.debug_id
;
1312 TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x",
1313 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1315 __print_symbolic(__entry
->op
, afs_flock_operations
),
1316 __print_symbolic(__entry
->type
, afs_flock_types
),
1317 __entry
->from
, __entry
->len
, __entry
->flags
)
1320 TRACE_EVENT(afs_reload_dir
,
1321 TP_PROTO(struct afs_vnode
*vnode
),
1326 __field_struct(struct afs_fid
, fid
)
1330 __entry
->fid
= vnode
->fid
;
1333 TP_printk("%llx:%llx:%x",
1334 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
)
1337 TRACE_EVENT(afs_silly_rename
,
1338 TP_PROTO(struct afs_vnode
*vnode
, bool done
),
1340 TP_ARGS(vnode
, done
),
1343 __field_struct(struct afs_fid
, fid
)
1344 __field(bool, done
)
1348 __entry
->fid
= vnode
->fid
;
1349 __entry
->done
= done
;
1352 TP_printk("%llx:%llx:%x done=%u",
1353 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1357 TRACE_EVENT(afs_get_tree
,
1358 TP_PROTO(struct afs_cell
*cell
, struct afs_volume
*volume
),
1360 TP_ARGS(cell
, volume
),
1364 __array(char, cell
, 24 )
1365 __array(char, volume
, 24 )
1370 __entry
->vid
= volume
->vid
;
1371 __len
= min_t(int, cell
->name_len
, 23);
1372 memcpy(__entry
->cell
, cell
->name
, __len
);
1373 __entry
->cell
[__len
] = 0;
1374 __len
= min_t(int, volume
->name_len
, 23);
1375 memcpy(__entry
->volume
, volume
->name
, __len
);
1376 __entry
->volume
[__len
] = 0;
1379 TP_printk("--- MOUNT %s:%s %llx",
1380 __entry
->cell
, __entry
->volume
, __entry
->vid
)
1383 TRACE_EVENT(afs_cb_break
,
1384 TP_PROTO(struct afs_fid
*fid
, unsigned int cb_break
,
1385 enum afs_cb_break_reason reason
, bool skipped
),
1387 TP_ARGS(fid
, cb_break
, reason
, skipped
),
1390 __field_struct(struct afs_fid
, fid
)
1391 __field(unsigned int, cb_break
)
1392 __field(enum afs_cb_break_reason
, reason
)
1393 __field(bool, skipped
)
1397 __entry
->fid
= *fid
;
1398 __entry
->cb_break
= cb_break
;
1399 __entry
->reason
= reason
;
1400 __entry
->skipped
= skipped
;
1403 TP_printk("%llx:%llx:%x b=%x s=%u %s",
1404 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1407 __print_symbolic(__entry
->reason
, afs_cb_break_reasons
))
1410 TRACE_EVENT(afs_cb_miss
,
1411 TP_PROTO(struct afs_fid
*fid
, enum afs_cb_break_reason reason
),
1413 TP_ARGS(fid
, reason
),
1416 __field_struct(struct afs_fid
, fid
)
1417 __field(enum afs_cb_break_reason
, reason
)
1421 __entry
->fid
= *fid
;
1422 __entry
->reason
= reason
;
1425 TP_printk(" %llx:%llx:%x %s",
1426 __entry
->fid
.vid
, __entry
->fid
.vnode
, __entry
->fid
.unique
,
1427 __print_symbolic(__entry
->reason
, afs_cb_break_reasons
))
1430 TRACE_EVENT(afs_server
,
1431 TP_PROTO(struct afs_server
*server
, int ref
, int active
,
1432 enum afs_server_trace reason
),
1434 TP_ARGS(server
, ref
, active
, reason
),
1437 __field(unsigned int, server
)
1439 __field(int, active
)
1440 __field(int, reason
)
1444 __entry
->server
= server
->debug_id
;
1446 __entry
->active
= active
;
1447 __entry
->reason
= reason
;
1450 TP_printk("s=%08x %s u=%d a=%d",
1452 __print_symbolic(__entry
->reason
, afs_server_traces
),
1457 TRACE_EVENT(afs_volume
,
1458 TP_PROTO(afs_volid_t vid
, int ref
, enum afs_volume_trace reason
),
1460 TP_ARGS(vid
, ref
, reason
),
1463 __field(afs_volid_t
, vid
)
1465 __field(enum afs_volume_trace
, reason
)
1471 __entry
->reason
= reason
;
1474 TP_printk("V=%llx %s u=%d",
1476 __print_symbolic(__entry
->reason
, afs_volume_traces
),
1480 TRACE_EVENT(afs_cell
,
1481 TP_PROTO(unsigned int cell_debug_id
, int usage
, int active
,
1482 enum afs_cell_trace reason
),
1484 TP_ARGS(cell_debug_id
, usage
, active
, reason
),
1487 __field(unsigned int, cell
)
1488 __field(int, usage
)
1489 __field(int, active
)
1490 __field(int, reason
)
1494 __entry
->cell
= cell_debug_id
;
1495 __entry
->usage
= usage
;
1496 __entry
->active
= active
;
1497 __entry
->reason
= reason
;
1500 TP_printk("L=%08x %s u=%d a=%d",
1502 __print_symbolic(__entry
->reason
, afs_cell_traces
),
1507 #endif /* _TRACE_AFS_H */
1509 /* This part must be outside protection */
1510 #include <trace/define_trace.h>