hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/trace/events/afs.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* AFS tracepoints
23 *
34 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
45 * 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.
106 */
117 #undef TRACE_SYSTEM
128 #define TRACE_SYSTEM afs
....@@ -25,15 +21,100 @@
2521 enum afs_call_trace {
2622 afs_call_trace_alloc,
2723 afs_call_trace_free,
24
+ afs_call_trace_get,
2825 afs_call_trace_put,
2926 afs_call_trace_wake,
3027 afs_call_trace_work,
3128 };
3229
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,
35
+ afs_server_trace_gc,
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,
52
+};
53
+
54
+
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,
70
+};
71
+
72
+enum afs_cell_trace {
73
+ afs_cell_trace_alloc,
74
+ afs_cell_trace_free,
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,
109
+ afs_cell_trace_wait,
110
+};
111
+
33112 enum afs_fs_operation {
34113 afs_FS_FetchData = 130, /* AFS Fetch file data */
114
+ afs_FS_FetchACL = 131, /* AFS Fetch file ACL */
35115 afs_FS_FetchStatus = 132, /* AFS Fetch file status */
36116 afs_FS_StoreData = 133, /* AFS Store file data */
117
+ afs_FS_StoreACL = 134, /* AFS Store file ACL */
37118 afs_FS_StoreStatus = 135, /* AFS Store file status */
38119 afs_FS_RemoveFile = 136, /* AFS Remove a file */
39120 afs_FS_CreateFile = 137, /* AFS Create a file */
....@@ -54,13 +135,71 @@
54135 afs_FS_StoreData64 = 65538, /* AFS Store file data */
55136 afs_FS_GiveUpAllCallBacks = 65539, /* AFS Give up all our callbacks on a server */
56137 afs_FS_GetCapabilities = 65540, /* AFS Get FS server capabilities */
138
+
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,
57167 };
58168
59169 enum afs_vl_operation {
60170 afs_VL_GetEntryByNameU = 527, /* AFS Get Vol Entry By Name operation ID */
61171 afs_VL_GetAddrsU = 533, /* AFS Get FS server addresses */
62172 afs_YFSVL_GetEndpoints = 64002, /* YFS Get FS & Vol server addresses */
173
+ afs_YFSVL_GetCellName = 64014, /* YFS Get actual cell name */
63174 afs_VL_GetCapabilities = 65537, /* AFS Get VL server capabilities */
175
+};
176
+
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 */
187
+};
188
+
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,
64203 };
65204
66205 enum afs_edit_dir_op {
....@@ -78,10 +217,101 @@
78217 afs_edit_dir_for_create,
79218 afs_edit_dir_for_link,
80219 afs_edit_dir_for_mkdir,
81
- afs_edit_dir_for_rename,
220
+ afs_edit_dir_for_rename_0,
221
+ afs_edit_dir_for_rename_1,
222
+ afs_edit_dir_for_rename_2,
82223 afs_edit_dir_for_rmdir,
224
+ afs_edit_dir_for_silly_0,
225
+ afs_edit_dir_for_silly_1,
83226 afs_edit_dir_for_symlink,
84227 afs_edit_dir_for_unlink,
228
+};
229
+
230
+enum afs_eproto_cause {
231
+ afs_eproto_bad_status,
232
+ afs_eproto_cb_count,
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,
238
+ afs_eproto_motd_len,
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,
248
+};
249
+
250
+enum afs_io_error {
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,
256
+};
257
+
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_over_end,
263
+ afs_file_error_dir_small,
264
+ afs_file_error_dir_unmarked_ext,
265
+ afs_file_error_mntpt,
266
+ afs_file_error_writeback_fail,
267
+};
268
+
269
+enum afs_flock_event {
270
+ afs_flock_acquired,
271
+ afs_flock_callback_break,
272
+ afs_flock_defer_unlock,
273
+ afs_flock_extend_fail,
274
+ afs_flock_fail_other,
275
+ afs_flock_fail_perm,
276
+ afs_flock_no_lockers,
277
+ afs_flock_release_fail,
278
+ afs_flock_silly_delete,
279
+ afs_flock_timestamp,
280
+ afs_flock_try_to_lock,
281
+ afs_flock_vfs_lock,
282
+ afs_flock_vfs_locking,
283
+ afs_flock_waited,
284
+ afs_flock_waiting,
285
+ afs_flock_work_extending,
286
+ afs_flock_work_retry,
287
+ afs_flock_work_unlocking,
288
+ afs_flock_would_block,
289
+};
290
+
291
+enum afs_flock_operation {
292
+ afs_flock_op_copy_lock,
293
+ afs_flock_op_flock,
294
+ afs_flock_op_grant,
295
+ afs_flock_op_lock,
296
+ afs_flock_op_release_lock,
297
+ afs_flock_op_return_ok,
298
+ afs_flock_op_return_eagain,
299
+ afs_flock_op_return_edeadlk,
300
+ afs_flock_op_return_error,
301
+ afs_flock_op_set_lock,
302
+ afs_flock_op_unlock,
303
+ afs_flock_op_wake,
304
+};
305
+
306
+enum afs_cb_break_reason {
307
+ afs_cb_break_no_break,
308
+ afs_cb_break_for_callback,
309
+ afs_cb_break_for_deleted,
310
+ afs_cb_break_for_lapsed,
311
+ afs_cb_break_for_unlink,
312
+ afs_cb_break_for_vsbreak,
313
+ afs_cb_break_for_volume_callback,
314
+ afs_cb_break_for_zap,
85315 };
86316
87317 #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */
....@@ -92,9 +322,87 @@
92322 #define afs_call_traces \
93323 EM(afs_call_trace_alloc, "ALLOC") \
94324 EM(afs_call_trace_free, "FREE ") \
325
+ EM(afs_call_trace_get, "GET ") \
95326 EM(afs_call_trace_put, "PUT ") \
96327 EM(afs_call_trace_wake, "WAKE ") \
97328 E_(afs_call_trace_work, "QUEUE")
329
+
330
+#define afs_server_traces \
331
+ EM(afs_server_trace_alloc, "ALLOC ") \
332
+ EM(afs_server_trace_callback, "CALLBACK ") \
333
+ EM(afs_server_trace_destroy, "DESTROY ") \
334
+ EM(afs_server_trace_free, "FREE ") \
335
+ EM(afs_server_trace_gc, "GC ") \
336
+ EM(afs_server_trace_get_by_addr, "GET addr ") \
337
+ EM(afs_server_trace_get_by_uuid, "GET uuid ") \
338
+ EM(afs_server_trace_get_caps, "GET caps ") \
339
+ EM(afs_server_trace_get_install, "GET inst ") \
340
+ EM(afs_server_trace_get_new_cbi, "GET cbi ") \
341
+ EM(afs_server_trace_get_probe, "GET probe") \
342
+ EM(afs_server_trace_give_up_cb, "giveup-cb") \
343
+ EM(afs_server_trace_purging, "PURGE ") \
344
+ EM(afs_server_trace_put_call, "PUT call ") \
345
+ EM(afs_server_trace_put_cbi, "PUT cbi ") \
346
+ EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \
347
+ EM(afs_server_trace_put_probe, "PUT probe") \
348
+ EM(afs_server_trace_put_slist, "PUT slist") \
349
+ EM(afs_server_trace_put_slist_isort, "PUT isort") \
350
+ EM(afs_server_trace_put_uuid_rsq, "PUT u-req") \
351
+ E_(afs_server_trace_update, "UPDATE")
352
+
353
+#define afs_volume_traces \
354
+ EM(afs_volume_trace_alloc, "ALLOC ") \
355
+ EM(afs_volume_trace_free, "FREE ") \
356
+ EM(afs_volume_trace_get_alloc_sbi, "GET sbi-alloc ") \
357
+ EM(afs_volume_trace_get_cell_insert, "GET cell-insrt") \
358
+ EM(afs_volume_trace_get_new_op, "GET op-new ") \
359
+ EM(afs_volume_trace_get_query_alias, "GET cell-alias") \
360
+ EM(afs_volume_trace_put_cell_dup, "PUT cell-dup ") \
361
+ EM(afs_volume_trace_put_cell_root, "PUT cell-root ") \
362
+ EM(afs_volume_trace_put_destroy_sbi, "PUT sbi-destry") \
363
+ EM(afs_volume_trace_put_free_fc, "PUT fc-free ") \
364
+ EM(afs_volume_trace_put_put_op, "PUT op-put ") \
365
+ EM(afs_volume_trace_put_query_alias, "PUT cell-alias") \
366
+ EM(afs_volume_trace_put_validate_fc, "PUT fc-validat") \
367
+ E_(afs_volume_trace_remove, "REMOVE ")
368
+
369
+#define afs_cell_traces \
370
+ EM(afs_cell_trace_alloc, "ALLOC ") \
371
+ EM(afs_cell_trace_free, "FREE ") \
372
+ EM(afs_cell_trace_get_queue_dns, "GET q-dns ") \
373
+ EM(afs_cell_trace_get_queue_manage, "GET q-mng ") \
374
+ EM(afs_cell_trace_get_queue_new, "GET q-new ") \
375
+ EM(afs_cell_trace_get_vol, "GET vol ") \
376
+ EM(afs_cell_trace_insert, "INSERT ") \
377
+ EM(afs_cell_trace_manage, "MANAGE ") \
378
+ EM(afs_cell_trace_put_candidate, "PUT candid") \
379
+ EM(afs_cell_trace_put_destroy, "PUT destry") \
380
+ EM(afs_cell_trace_put_queue_work, "PUT q-work") \
381
+ EM(afs_cell_trace_put_queue_fail, "PUT q-fail") \
382
+ EM(afs_cell_trace_put_vol, "PUT vol ") \
383
+ EM(afs_cell_trace_see_source, "SEE source") \
384
+ EM(afs_cell_trace_see_ws, "SEE ws ") \
385
+ EM(afs_cell_trace_unuse_alias, "UNU alias ") \
386
+ EM(afs_cell_trace_unuse_check_alias, "UNU chk-al") \
387
+ EM(afs_cell_trace_unuse_delete, "UNU delete") \
388
+ EM(afs_cell_trace_unuse_fc, "UNU fc ") \
389
+ EM(afs_cell_trace_unuse_lookup, "UNU lookup") \
390
+ EM(afs_cell_trace_unuse_mntpt, "UNU mntpt ") \
391
+ EM(afs_cell_trace_unuse_parse, "UNU parse ") \
392
+ EM(afs_cell_trace_unuse_pin, "UNU pin ") \
393
+ EM(afs_cell_trace_unuse_probe, "UNU probe ") \
394
+ EM(afs_cell_trace_unuse_sbi, "UNU sbi ") \
395
+ EM(afs_cell_trace_unuse_ws, "UNU ws ") \
396
+ EM(afs_cell_trace_use_alias, "USE alias ") \
397
+ EM(afs_cell_trace_use_check_alias, "USE chk-al") \
398
+ EM(afs_cell_trace_use_fc, "USE fc ") \
399
+ EM(afs_cell_trace_use_fc_alias, "USE fc-al ") \
400
+ EM(afs_cell_trace_use_lookup, "USE lookup") \
401
+ EM(afs_cell_trace_use_mntpt, "USE mntpt ") \
402
+ EM(afs_cell_trace_use_pin, "USE pin ") \
403
+ EM(afs_cell_trace_use_probe, "USE probe ") \
404
+ EM(afs_cell_trace_use_sbi, "USE sbi ") \
405
+ E_(afs_cell_trace_wait, "WAIT ")
98406
99407 #define afs_fs_operations \
100408 EM(afs_FS_FetchData, "FS.FetchData") \
....@@ -119,13 +427,67 @@
119427 EM(afs_FS_FetchData64, "FS.FetchData64") \
120428 EM(afs_FS_StoreData64, "FS.StoreData64") \
121429 EM(afs_FS_GiveUpAllCallBacks, "FS.GiveUpAllCallBacks") \
122
- E_(afs_FS_GetCapabilities, "FS.GetCapabilities")
430
+ EM(afs_FS_GetCapabilities, "FS.GetCapabilities") \
431
+ EM(yfs_FS_FetchACL, "YFS.FetchACL") \
432
+ EM(yfs_FS_FetchStatus, "YFS.FetchStatus") \
433
+ EM(yfs_FS_StoreACL, "YFS.StoreACL") \
434
+ EM(yfs_FS_StoreStatus, "YFS.StoreStatus") \
435
+ EM(yfs_FS_RemoveFile, "YFS.RemoveFile") \
436
+ EM(yfs_FS_CreateFile, "YFS.CreateFile") \
437
+ EM(yfs_FS_Rename, "YFS.Rename") \
438
+ EM(yfs_FS_Symlink, "YFS.Symlink") \
439
+ EM(yfs_FS_Link, "YFS.Link") \
440
+ EM(yfs_FS_MakeDir, "YFS.MakeDir") \
441
+ EM(yfs_FS_RemoveDir, "YFS.RemoveDir") \
442
+ EM(yfs_FS_GetVolumeStatus, "YFS.GetVolumeStatus") \
443
+ EM(yfs_FS_SetVolumeStatus, "YFS.SetVolumeStatus") \
444
+ EM(yfs_FS_SetLock, "YFS.SetLock") \
445
+ EM(yfs_FS_ExtendLock, "YFS.ExtendLock") \
446
+ EM(yfs_FS_ReleaseLock, "YFS.ReleaseLock") \
447
+ EM(yfs_FS_Lookup, "YFS.Lookup") \
448
+ EM(yfs_FS_FlushCPS, "YFS.FlushCPS") \
449
+ EM(yfs_FS_FetchOpaqueACL, "YFS.FetchOpaqueACL") \
450
+ EM(yfs_FS_WhoAmI, "YFS.WhoAmI") \
451
+ EM(yfs_FS_RemoveACL, "YFS.RemoveACL") \
452
+ EM(yfs_FS_RemoveFile2, "YFS.RemoveFile2") \
453
+ EM(yfs_FS_StoreOpaqueACL2, "YFS.StoreOpaqueACL2") \
454
+ EM(yfs_FS_InlineBulkStatus, "YFS.InlineBulkStatus") \
455
+ EM(yfs_FS_FetchData64, "YFS.FetchData64") \
456
+ EM(yfs_FS_StoreData64, "YFS.StoreData64") \
457
+ E_(yfs_FS_UpdateSymlink, "YFS.UpdateSymlink")
123458
124459 #define afs_vl_operations \
125460 EM(afs_VL_GetEntryByNameU, "VL.GetEntryByNameU") \
126461 EM(afs_VL_GetAddrsU, "VL.GetAddrsU") \
127462 EM(afs_YFSVL_GetEndpoints, "YFSVL.GetEndpoints") \
463
+ EM(afs_YFSVL_GetCellName, "YFSVL.GetCellName") \
128464 E_(afs_VL_GetCapabilities, "VL.GetCapabilities")
465
+
466
+#define afs_cm_operations \
467
+ EM(afs_CB_CallBack, "CB.CallBack") \
468
+ EM(afs_CB_InitCallBackState, "CB.InitCallBackState") \
469
+ EM(afs_CB_Probe, "CB.Probe") \
470
+ EM(afs_CB_GetLock, "CB.GetLock") \
471
+ EM(afs_CB_GetCE, "CB.GetCE") \
472
+ EM(afs_CB_GetXStatsVersion, "CB.GetXStatsVersion") \
473
+ EM(afs_CB_GetXStats, "CB.GetXStats") \
474
+ EM(afs_CB_InitCallBackState3, "CB.InitCallBackState3") \
475
+ E_(afs_CB_ProbeUuid, "CB.ProbeUuid")
476
+
477
+#define yfs_cm_operations \
478
+ EM(yfs_CB_Probe, "YFSCB.Probe") \
479
+ EM(yfs_CB_GetLock, "YFSCB.GetLock") \
480
+ EM(yfs_CB_XStatsVersion, "YFSCB.XStatsVersion") \
481
+ EM(yfs_CB_GetXStats, "YFSCB.GetXStats") \
482
+ EM(yfs_CB_InitCallBackState3, "YFSCB.InitCallBackState3") \
483
+ EM(yfs_CB_ProbeUuid, "YFSCB.ProbeUuid") \
484
+ EM(yfs_CB_GetServerPrefs, "YFSCB.GetServerPrefs") \
485
+ EM(yfs_CB_GetCellServDV, "YFSCB.GetCellServDV") \
486
+ EM(yfs_CB_GetLocalCell, "YFSCB.GetLocalCell") \
487
+ EM(yfs_CB_GetCacheConfig, "YFSCB.GetCacheConfig") \
488
+ EM(yfs_CB_GetCellByNum, "YFSCB.GetCellByNum") \
489
+ EM(yfs_CB_TellMeAboutYourself, "YFSCB.TellMeAboutYourself") \
490
+ E_(yfs_CB_CallBack, "YFSCB.CallBack")
129491
130492 #define afs_edit_dir_ops \
131493 EM(afs_edit_dir_create, "create") \
....@@ -141,11 +503,110 @@
141503 EM(afs_edit_dir_for_create, "Create") \
142504 EM(afs_edit_dir_for_link, "Link ") \
143505 EM(afs_edit_dir_for_mkdir, "MkDir ") \
144
- EM(afs_edit_dir_for_rename, "Rename") \
506
+ EM(afs_edit_dir_for_rename_0, "Renam0") \
507
+ EM(afs_edit_dir_for_rename_1, "Renam1") \
508
+ EM(afs_edit_dir_for_rename_2, "Renam2") \
145509 EM(afs_edit_dir_for_rmdir, "RmDir ") \
510
+ EM(afs_edit_dir_for_silly_0, "S_Ren0") \
511
+ EM(afs_edit_dir_for_silly_1, "S_Ren1") \
146512 EM(afs_edit_dir_for_symlink, "Symlnk") \
147513 E_(afs_edit_dir_for_unlink, "Unlink")
148514
515
+#define afs_eproto_causes \
516
+ EM(afs_eproto_bad_status, "BadStatus") \
517
+ EM(afs_eproto_cb_count, "CbCount") \
518
+ EM(afs_eproto_cb_fid_count, "CbFidCount") \
519
+ EM(afs_eproto_cellname_len, "CellNameLen") \
520
+ EM(afs_eproto_file_type, "FileTYpe") \
521
+ EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \
522
+ EM(afs_eproto_ibulkst_count, "IBS.FidCount") \
523
+ EM(afs_eproto_motd_len, "MotdLen") \
524
+ EM(afs_eproto_offline_msg_len, "OfflineMsgLen") \
525
+ EM(afs_eproto_volname_len, "VolNameLen") \
526
+ EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \
527
+ EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \
528
+ EM(afs_eproto_yvl_fsendpt_num, "YVL.FsEndCount") \
529
+ EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \
530
+ EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \
531
+ EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \
532
+ E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType")
533
+
534
+#define afs_io_errors \
535
+ EM(afs_io_error_cm_reply, "CM_REPLY") \
536
+ EM(afs_io_error_extract, "EXTRACT") \
537
+ EM(afs_io_error_fs_probe_fail, "FS_PROBE_FAIL") \
538
+ EM(afs_io_error_vl_lookup_fail, "VL_LOOKUP_FAIL") \
539
+ E_(afs_io_error_vl_probe_fail, "VL_PROBE_FAIL")
540
+
541
+#define afs_file_errors \
542
+ EM(afs_file_error_dir_bad_magic, "DIR_BAD_MAGIC") \
543
+ EM(afs_file_error_dir_big, "DIR_BIG") \
544
+ EM(afs_file_error_dir_missing_page, "DIR_MISSING_PAGE") \
545
+ EM(afs_file_error_dir_over_end, "DIR_ENT_OVER_END") \
546
+ EM(afs_file_error_dir_small, "DIR_SMALL") \
547
+ EM(afs_file_error_dir_unmarked_ext, "DIR_UNMARKED_EXT") \
548
+ EM(afs_file_error_mntpt, "MNTPT_READ_FAILED") \
549
+ E_(afs_file_error_writeback_fail, "WRITEBACK_FAILED")
550
+
551
+#define afs_flock_types \
552
+ EM(F_RDLCK, "RDLCK") \
553
+ EM(F_WRLCK, "WRLCK") \
554
+ E_(F_UNLCK, "UNLCK")
555
+
556
+#define afs_flock_states \
557
+ EM(AFS_VNODE_LOCK_NONE, "NONE") \
558
+ EM(AFS_VNODE_LOCK_WAITING_FOR_CB, "WAIT_FOR_CB") \
559
+ EM(AFS_VNODE_LOCK_SETTING, "SETTING") \
560
+ EM(AFS_VNODE_LOCK_GRANTED, "GRANTED") \
561
+ EM(AFS_VNODE_LOCK_EXTENDING, "EXTENDING") \
562
+ EM(AFS_VNODE_LOCK_NEED_UNLOCK, "NEED_UNLOCK") \
563
+ EM(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \
564
+ E_(AFS_VNODE_LOCK_DELETED, "DELETED")
565
+
566
+#define afs_flock_events \
567
+ EM(afs_flock_acquired, "Acquired") \
568
+ EM(afs_flock_callback_break, "Callback") \
569
+ EM(afs_flock_defer_unlock, "D-Unlock") \
570
+ EM(afs_flock_extend_fail, "Ext_Fail") \
571
+ EM(afs_flock_fail_other, "ErrOther") \
572
+ EM(afs_flock_fail_perm, "ErrPerm ") \
573
+ EM(afs_flock_no_lockers, "NoLocker") \
574
+ EM(afs_flock_release_fail, "Rel_Fail") \
575
+ EM(afs_flock_silly_delete, "SillyDel") \
576
+ EM(afs_flock_timestamp, "Timestmp") \
577
+ EM(afs_flock_try_to_lock, "TryToLck") \
578
+ EM(afs_flock_vfs_lock, "VFSLock ") \
579
+ EM(afs_flock_vfs_locking, "VFSLking") \
580
+ EM(afs_flock_waited, "Waited ") \
581
+ EM(afs_flock_waiting, "Waiting ") \
582
+ EM(afs_flock_work_extending, "Extendng") \
583
+ EM(afs_flock_work_retry, "Retry ") \
584
+ EM(afs_flock_work_unlocking, "Unlcking") \
585
+ E_(afs_flock_would_block, "EWOULDBL")
586
+
587
+#define afs_flock_operations \
588
+ EM(afs_flock_op_copy_lock, "COPY ") \
589
+ EM(afs_flock_op_flock, "->flock ") \
590
+ EM(afs_flock_op_grant, "GRANT ") \
591
+ EM(afs_flock_op_lock, "->lock ") \
592
+ EM(afs_flock_op_release_lock, "RELEASE ") \
593
+ EM(afs_flock_op_return_ok, "<-OK ") \
594
+ EM(afs_flock_op_return_edeadlk, "<-EDEADL") \
595
+ EM(afs_flock_op_return_eagain, "<-EAGAIN") \
596
+ EM(afs_flock_op_return_error, "<-ERROR ") \
597
+ EM(afs_flock_op_set_lock, "SET ") \
598
+ EM(afs_flock_op_unlock, "UNLOCK ") \
599
+ E_(afs_flock_op_wake, "WAKE ")
600
+
601
+#define afs_cb_break_reasons \
602
+ EM(afs_cb_break_no_break, "no-break") \
603
+ EM(afs_cb_break_for_callback, "break-cb") \
604
+ EM(afs_cb_break_for_deleted, "break-del") \
605
+ EM(afs_cb_break_for_lapsed, "break-lapsed") \
606
+ EM(afs_cb_break_for_unlink, "break-unlink") \
607
+ EM(afs_cb_break_for_vsbreak, "break-vs") \
608
+ EM(afs_cb_break_for_volume_callback, "break-v-cb") \
609
+ E_(afs_cb_break_for_zap, "break-zap")
149610
150611 /*
151612 * Export enum symbols via userspace.
....@@ -156,10 +617,20 @@
156617 #define E_(a, b) TRACE_DEFINE_ENUM(a);
157618
158619 afs_call_traces;
620
+afs_server_traces;
621
+afs_cell_traces;
159622 afs_fs_operations;
160623 afs_vl_operations;
624
+afs_cm_operations;
625
+yfs_cm_operations;
161626 afs_edit_dir_ops;
162627 afs_edit_dir_reasons;
628
+afs_eproto_causes;
629
+afs_io_errors;
630
+afs_file_errors;
631
+afs_flock_types;
632
+afs_flock_operations;
633
+afs_cb_break_reasons;
163634
164635 /*
165636 * Now redefine the EM() and E_() macros to map the enums to the strings that
....@@ -170,17 +641,16 @@
170641 #define EM(a, b) { a, b },
171642 #define E_(a, b) { a, b }
172643
173
-TRACE_EVENT(afs_recv_data,
174
- TP_PROTO(struct afs_call *call, unsigned count, unsigned offset,
644
+TRACE_EVENT(afs_receive_data,
645
+ TP_PROTO(struct afs_call *call, struct iov_iter *iter,
175646 bool want_more, int ret),
176647
177
- TP_ARGS(call, count, offset, want_more, ret),
648
+ TP_ARGS(call, iter, want_more, ret),
178649
179650 TP_STRUCT__entry(
651
+ __field(loff_t, remain )
180652 __field(unsigned int, call )
181653 __field(enum afs_call_state, state )
182
- __field(unsigned int, count )
183
- __field(unsigned int, offset )
184654 __field(unsigned short, unmarshall )
185655 __field(bool, want_more )
186656 __field(int, ret )
....@@ -190,17 +660,18 @@
190660 __entry->call = call->debug_id;
191661 __entry->state = call->state;
192662 __entry->unmarshall = call->unmarshall;
193
- __entry->count = count;
194
- __entry->offset = offset;
663
+ __entry->remain = iov_iter_count(iter);
195664 __entry->want_more = want_more;
196665 __entry->ret = ret;
197666 ),
198667
199
- TP_printk("c=%08x s=%u u=%u %u/%u wm=%u ret=%d",
668
+ TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d",
200669 __entry->call,
201
- __entry->state, __entry->unmarshall,
202
- __entry->offset, __entry->count,
203
- __entry->want_more, __entry->ret)
670
+ __entry->remain,
671
+ __entry->unmarshall,
672
+ __entry->want_more,
673
+ __entry->state,
674
+ __entry->ret)
204675 );
205676
206677 TRACE_EVENT(afs_notify_call,
....@@ -232,20 +703,21 @@
232703
233704 TP_STRUCT__entry(
234705 __field(unsigned int, call )
235
- __field(const char *, name )
236706 __field(u32, op )
707
+ __field(u16, service_id )
237708 ),
238709
239710 TP_fast_assign(
240711 __entry->call = call->debug_id;
241
- __entry->name = call->type->name;
242712 __entry->op = call->operation_ID;
713
+ __entry->service_id = call->service_id;
243714 ),
244715
245
- TP_printk("c=%08x %s o=%u",
716
+ TP_printk("c=%08x %s",
246717 __entry->call,
247
- __entry->name,
248
- __entry->op)
718
+ __entry->service_id == 2501 ?
719
+ __print_symbolic(__entry->op, yfs_cm_operations) :
720
+ __print_symbolic(__entry->op, afs_cm_operations))
249721 );
250722
251723 TRACE_EVENT(afs_call,
....@@ -301,12 +773,126 @@
301773 }
302774 ),
303775
304
- TP_printk("c=%08x %06x:%06x:%06x %s",
776
+ TP_printk("c=%08x %06llx:%06llx:%06x %s",
305777 __entry->call,
306778 __entry->fid.vid,
307779 __entry->fid.vnode,
308780 __entry->fid.unique,
309781 __print_symbolic(__entry->op, afs_fs_operations))
782
+ );
783
+
784
+TRACE_EVENT(afs_make_fs_calli,
785
+ TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
786
+ unsigned int i),
787
+
788
+ TP_ARGS(call, fid, i),
789
+
790
+ TP_STRUCT__entry(
791
+ __field(unsigned int, call )
792
+ __field(unsigned int, i )
793
+ __field(enum afs_fs_operation, op )
794
+ __field_struct(struct afs_fid, fid )
795
+ ),
796
+
797
+ TP_fast_assign(
798
+ __entry->call = call->debug_id;
799
+ __entry->i = i;
800
+ __entry->op = call->operation_ID;
801
+ if (fid) {
802
+ __entry->fid = *fid;
803
+ } else {
804
+ __entry->fid.vid = 0;
805
+ __entry->fid.vnode = 0;
806
+ __entry->fid.unique = 0;
807
+ }
808
+ ),
809
+
810
+ TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u",
811
+ __entry->call,
812
+ __entry->fid.vid,
813
+ __entry->fid.vnode,
814
+ __entry->fid.unique,
815
+ __print_symbolic(__entry->op, afs_fs_operations),
816
+ __entry->i)
817
+ );
818
+
819
+TRACE_EVENT(afs_make_fs_call1,
820
+ TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
821
+ const struct qstr *name),
822
+
823
+ TP_ARGS(call, fid, name),
824
+
825
+ TP_STRUCT__entry(
826
+ __field(unsigned int, call )
827
+ __field(enum afs_fs_operation, op )
828
+ __field_struct(struct afs_fid, fid )
829
+ __array(char, name, 24 )
830
+ ),
831
+
832
+ TP_fast_assign(
833
+ unsigned int __len = min_t(unsigned int, name->len, 23);
834
+ __entry->call = call->debug_id;
835
+ __entry->op = call->operation_ID;
836
+ if (fid) {
837
+ __entry->fid = *fid;
838
+ } else {
839
+ __entry->fid.vid = 0;
840
+ __entry->fid.vnode = 0;
841
+ __entry->fid.unique = 0;
842
+ }
843
+ memcpy(__entry->name, name->name, __len);
844
+ __entry->name[__len] = 0;
845
+ ),
846
+
847
+ TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"",
848
+ __entry->call,
849
+ __entry->fid.vid,
850
+ __entry->fid.vnode,
851
+ __entry->fid.unique,
852
+ __print_symbolic(__entry->op, afs_fs_operations),
853
+ __entry->name)
854
+ );
855
+
856
+TRACE_EVENT(afs_make_fs_call2,
857
+ TP_PROTO(struct afs_call *call, const struct afs_fid *fid,
858
+ const struct qstr *name, const struct qstr *name2),
859
+
860
+ TP_ARGS(call, fid, name, name2),
861
+
862
+ TP_STRUCT__entry(
863
+ __field(unsigned int, call )
864
+ __field(enum afs_fs_operation, op )
865
+ __field_struct(struct afs_fid, fid )
866
+ __array(char, name, 24 )
867
+ __array(char, name2, 24 )
868
+ ),
869
+
870
+ TP_fast_assign(
871
+ unsigned int __len = min_t(unsigned int, name->len, 23);
872
+ unsigned int __len2 = min_t(unsigned int, name2->len, 23);
873
+ __entry->call = call->debug_id;
874
+ __entry->op = call->operation_ID;
875
+ if (fid) {
876
+ __entry->fid = *fid;
877
+ } else {
878
+ __entry->fid.vid = 0;
879
+ __entry->fid.vnode = 0;
880
+ __entry->fid.unique = 0;
881
+ }
882
+ memcpy(__entry->name, name->name, __len);
883
+ __entry->name[__len] = 0;
884
+ memcpy(__entry->name2, name2->name, __len2);
885
+ __entry->name2[__len2] = 0;
886
+ ),
887
+
888
+ TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"",
889
+ __entry->call,
890
+ __entry->fid.vid,
891
+ __entry->fid.vnode,
892
+ __entry->fid.unique,
893
+ __print_symbolic(__entry->op, afs_fs_operations),
894
+ __entry->name,
895
+ __entry->name2)
310896 );
311897
312898 TRACE_EVENT(afs_make_vl_call,
....@@ -437,19 +1023,6 @@
4371023 __entry->vnode, __entry->off, __entry->i_size)
4381024 );
4391025
440
-/*
441
- * We use page->private to hold the amount of the page that we've written to,
442
- * splitting the field into two parts. However, we need to represent a range
443
- * 0...PAGE_SIZE inclusive, so we can't support 64K pages on a 32-bit system.
444
- */
445
-#if PAGE_SIZE > 32768
446
-#define AFS_PRIV_MAX 0xffffffff
447
-#define AFS_PRIV_SHIFT 32
448
-#else
449
-#define AFS_PRIV_MAX 0xffff
450
-#define AFS_PRIV_SHIFT 16
451
-#endif
452
-
4531026 TRACE_EVENT(afs_page_dirty,
4541027 TP_PROTO(struct afs_vnode *vnode, const char *where,
4551028 pgoff_t page, unsigned long priv),
....@@ -470,10 +1043,11 @@
4701043 __entry->priv = priv;
4711044 ),
4721045
473
- TP_printk("vn=%p %lx %s %lu-%lu",
1046
+ TP_printk("vn=%p %lx %s %zx-%zx%s",
4741047 __entry->vnode, __entry->page, __entry->where,
475
- __entry->priv & AFS_PRIV_MAX,
476
- __entry->priv >> AFS_PRIV_SHIFT)
1048
+ afs_page_dirty_from(__entry->priv),
1049
+ afs_page_dirty_to(__entry->priv),
1050
+ afs_is_page_dirty_mmapped(__entry->priv) ? " M" : "")
4771051 );
4781052
4791053 TRACE_EVENT(afs_call_state,
....@@ -506,6 +1080,32 @@
5061080 __entry->ret, __entry->abort)
5071081 );
5081082
1083
+TRACE_EVENT(afs_lookup,
1084
+ TP_PROTO(struct afs_vnode *dvnode, const struct qstr *name,
1085
+ struct afs_fid *fid),
1086
+
1087
+ TP_ARGS(dvnode, name, fid),
1088
+
1089
+ TP_STRUCT__entry(
1090
+ __field_struct(struct afs_fid, dfid )
1091
+ __field_struct(struct afs_fid, fid )
1092
+ __array(char, name, 24 )
1093
+ ),
1094
+
1095
+ TP_fast_assign(
1096
+ int __len = min_t(int, name->len, 23);
1097
+ __entry->dfid = dvnode->fid;
1098
+ __entry->fid = *fid;
1099
+ memcpy(__entry->name, name->name, __len);
1100
+ __entry->name[__len] = 0;
1101
+ ),
1102
+
1103
+ TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x",
1104
+ __entry->dfid.vid, __entry->dfid.vnode, __entry->dfid.unique,
1105
+ __entry->name,
1106
+ __entry->fid.vnode, __entry->fid.unique)
1107
+ );
1108
+
5091109 TRACE_EVENT(afs_edit_dir,
5101110 TP_PROTO(struct afs_vnode *dvnode,
5111111 enum afs_edit_dir_reason why,
....@@ -527,12 +1127,12 @@
5271127 __field(unsigned short, slot )
5281128 __field(unsigned int, f_vnode )
5291129 __field(unsigned int, f_unique )
530
- __array(char, name, 18 )
1130
+ __array(char, name, 24 )
5311131 ),
5321132
5331133 TP_fast_assign(
5341134 int __len = strlen(name);
535
- __len = min(__len, 17);
1135
+ __len = min(__len, 23);
5361136 __entry->vnode = dvnode->fid.vnode;
5371137 __entry->unique = dvnode->fid.unique;
5381138 __entry->why = why;
....@@ -545,7 +1145,7 @@
5451145 __entry->name[__len] = 0;
5461146 ),
5471147
548
- TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x %s",
1148
+ TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"",
5491149 __entry->vnode, __entry->unique,
5501150 __print_symbolic(__entry->why, afs_edit_dir_reasons),
5511151 __print_symbolic(__entry->op, afs_edit_dir_ops),
....@@ -555,24 +1155,68 @@
5551155 );
5561156
5571157 TRACE_EVENT(afs_protocol_error,
558
- TP_PROTO(struct afs_call *call, int error, const void *where),
1158
+ TP_PROTO(struct afs_call *call, enum afs_eproto_cause cause),
1159
+
1160
+ TP_ARGS(call, cause),
1161
+
1162
+ TP_STRUCT__entry(
1163
+ __field(unsigned int, call )
1164
+ __field(enum afs_eproto_cause, cause )
1165
+ ),
1166
+
1167
+ TP_fast_assign(
1168
+ __entry->call = call ? call->debug_id : 0;
1169
+ __entry->cause = cause;
1170
+ ),
1171
+
1172
+ TP_printk("c=%08x %s",
1173
+ __entry->call,
1174
+ __print_symbolic(__entry->cause, afs_eproto_causes))
1175
+ );
1176
+
1177
+TRACE_EVENT(afs_io_error,
1178
+ TP_PROTO(unsigned int call, int error, enum afs_io_error where),
5591179
5601180 TP_ARGS(call, error, where),
5611181
5621182 TP_STRUCT__entry(
5631183 __field(unsigned int, call )
5641184 __field(int, error )
565
- __field(const void *, where )
1185
+ __field(enum afs_io_error, where )
5661186 ),
5671187
5681188 TP_fast_assign(
569
- __entry->call = call ? call->debug_id : 0;
1189
+ __entry->call = call;
5701190 __entry->error = error;
5711191 __entry->where = where;
5721192 ),
5731193
574
- TP_printk("c=%08x r=%d sp=%pSR",
575
- __entry->call, __entry->error, __entry->where)
1194
+ TP_printk("c=%08x r=%d %s",
1195
+ __entry->call, __entry->error,
1196
+ __print_symbolic(__entry->where, afs_io_errors))
1197
+ );
1198
+
1199
+TRACE_EVENT(afs_file_error,
1200
+ TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where),
1201
+
1202
+ TP_ARGS(vnode, error, where),
1203
+
1204
+ TP_STRUCT__entry(
1205
+ __field_struct(struct afs_fid, fid )
1206
+ __field(int, error )
1207
+ __field(enum afs_file_error, where )
1208
+ ),
1209
+
1210
+ TP_fast_assign(
1211
+ __entry->fid = vnode->fid;
1212
+ __entry->error = error;
1213
+ __entry->where = where;
1214
+ ),
1215
+
1216
+ TP_printk("%llx:%llx:%x r=%d %s",
1217
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1218
+ __entry->error,
1219
+ __print_symbolic(__entry->where, afs_file_errors))
5761220 );
5771221
5781222 TRACE_EVENT(afs_cm_no_server,
....@@ -617,6 +1261,257 @@
6171261 __entry->call, __entry->op_id, &__entry->uuid)
6181262 );
6191263
1264
+TRACE_EVENT(afs_flock_ev,
1265
+ TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1266
+ enum afs_flock_event event, int error),
1267
+
1268
+ TP_ARGS(vnode, fl, event, error),
1269
+
1270
+ TP_STRUCT__entry(
1271
+ __field_struct(struct afs_fid, fid )
1272
+ __field(enum afs_flock_event, event )
1273
+ __field(enum afs_lock_state, state )
1274
+ __field(int, error )
1275
+ __field(unsigned int, debug_id )
1276
+ ),
1277
+
1278
+ TP_fast_assign(
1279
+ __entry->fid = vnode->fid;
1280
+ __entry->event = event;
1281
+ __entry->state = vnode->lock_state;
1282
+ __entry->error = error;
1283
+ __entry->debug_id = fl ? fl->fl_u.afs.debug_id : 0;
1284
+ ),
1285
+
1286
+ TP_printk("%llx:%llx:%x %04x %s s=%s e=%d",
1287
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1288
+ __entry->debug_id,
1289
+ __print_symbolic(__entry->event, afs_flock_events),
1290
+ __print_symbolic(__entry->state, afs_flock_states),
1291
+ __entry->error)
1292
+ );
1293
+
1294
+TRACE_EVENT(afs_flock_op,
1295
+ TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl,
1296
+ enum afs_flock_operation op),
1297
+
1298
+ TP_ARGS(vnode, fl, op),
1299
+
1300
+ TP_STRUCT__entry(
1301
+ __field_struct(struct afs_fid, fid )
1302
+ __field(loff_t, from )
1303
+ __field(loff_t, len )
1304
+ __field(enum afs_flock_operation, op )
1305
+ __field(unsigned char, type )
1306
+ __field(unsigned int, flags )
1307
+ __field(unsigned int, debug_id )
1308
+ ),
1309
+
1310
+ TP_fast_assign(
1311
+ __entry->fid = vnode->fid;
1312
+ __entry->from = fl->fl_start;
1313
+ __entry->len = fl->fl_end - fl->fl_start + 1;
1314
+ __entry->op = op;
1315
+ __entry->type = fl->fl_type;
1316
+ __entry->flags = fl->fl_flags;
1317
+ __entry->debug_id = fl->fl_u.afs.debug_id;
1318
+ ),
1319
+
1320
+ TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x",
1321
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1322
+ __entry->debug_id,
1323
+ __print_symbolic(__entry->op, afs_flock_operations),
1324
+ __print_symbolic(__entry->type, afs_flock_types),
1325
+ __entry->from, __entry->len, __entry->flags)
1326
+ );
1327
+
1328
+TRACE_EVENT(afs_reload_dir,
1329
+ TP_PROTO(struct afs_vnode *vnode),
1330
+
1331
+ TP_ARGS(vnode),
1332
+
1333
+ TP_STRUCT__entry(
1334
+ __field_struct(struct afs_fid, fid )
1335
+ ),
1336
+
1337
+ TP_fast_assign(
1338
+ __entry->fid = vnode->fid;
1339
+ ),
1340
+
1341
+ TP_printk("%llx:%llx:%x",
1342
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique)
1343
+ );
1344
+
1345
+TRACE_EVENT(afs_silly_rename,
1346
+ TP_PROTO(struct afs_vnode *vnode, bool done),
1347
+
1348
+ TP_ARGS(vnode, done),
1349
+
1350
+ TP_STRUCT__entry(
1351
+ __field_struct(struct afs_fid, fid )
1352
+ __field(bool, done )
1353
+ ),
1354
+
1355
+ TP_fast_assign(
1356
+ __entry->fid = vnode->fid;
1357
+ __entry->done = done;
1358
+ ),
1359
+
1360
+ TP_printk("%llx:%llx:%x done=%u",
1361
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1362
+ __entry->done)
1363
+ );
1364
+
1365
+TRACE_EVENT(afs_get_tree,
1366
+ TP_PROTO(struct afs_cell *cell, struct afs_volume *volume),
1367
+
1368
+ TP_ARGS(cell, volume),
1369
+
1370
+ TP_STRUCT__entry(
1371
+ __field(u64, vid )
1372
+ __array(char, cell, 24 )
1373
+ __array(char, volume, 24 )
1374
+ ),
1375
+
1376
+ TP_fast_assign(
1377
+ int __len;
1378
+ __entry->vid = volume->vid;
1379
+ __len = min_t(int, cell->name_len, 23);
1380
+ memcpy(__entry->cell, cell->name, __len);
1381
+ __entry->cell[__len] = 0;
1382
+ __len = min_t(int, volume->name_len, 23);
1383
+ memcpy(__entry->volume, volume->name, __len);
1384
+ __entry->volume[__len] = 0;
1385
+ ),
1386
+
1387
+ TP_printk("--- MOUNT %s:%s %llx",
1388
+ __entry->cell, __entry->volume, __entry->vid)
1389
+ );
1390
+
1391
+TRACE_EVENT(afs_cb_break,
1392
+ TP_PROTO(struct afs_fid *fid, unsigned int cb_break,
1393
+ enum afs_cb_break_reason reason, bool skipped),
1394
+
1395
+ TP_ARGS(fid, cb_break, reason, skipped),
1396
+
1397
+ TP_STRUCT__entry(
1398
+ __field_struct(struct afs_fid, fid )
1399
+ __field(unsigned int, cb_break )
1400
+ __field(enum afs_cb_break_reason, reason )
1401
+ __field(bool, skipped )
1402
+ ),
1403
+
1404
+ TP_fast_assign(
1405
+ __entry->fid = *fid;
1406
+ __entry->cb_break = cb_break;
1407
+ __entry->reason = reason;
1408
+ __entry->skipped = skipped;
1409
+ ),
1410
+
1411
+ TP_printk("%llx:%llx:%x b=%x s=%u %s",
1412
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1413
+ __entry->cb_break,
1414
+ __entry->skipped,
1415
+ __print_symbolic(__entry->reason, afs_cb_break_reasons))
1416
+ );
1417
+
1418
+TRACE_EVENT(afs_cb_miss,
1419
+ TP_PROTO(struct afs_fid *fid, enum afs_cb_break_reason reason),
1420
+
1421
+ TP_ARGS(fid, reason),
1422
+
1423
+ TP_STRUCT__entry(
1424
+ __field_struct(struct afs_fid, fid )
1425
+ __field(enum afs_cb_break_reason, reason )
1426
+ ),
1427
+
1428
+ TP_fast_assign(
1429
+ __entry->fid = *fid;
1430
+ __entry->reason = reason;
1431
+ ),
1432
+
1433
+ TP_printk(" %llx:%llx:%x %s",
1434
+ __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique,
1435
+ __print_symbolic(__entry->reason, afs_cb_break_reasons))
1436
+ );
1437
+
1438
+TRACE_EVENT(afs_server,
1439
+ TP_PROTO(struct afs_server *server, int ref, int active,
1440
+ enum afs_server_trace reason),
1441
+
1442
+ TP_ARGS(server, ref, active, reason),
1443
+
1444
+ TP_STRUCT__entry(
1445
+ __field(unsigned int, server )
1446
+ __field(int, ref )
1447
+ __field(int, active )
1448
+ __field(int, reason )
1449
+ ),
1450
+
1451
+ TP_fast_assign(
1452
+ __entry->server = server->debug_id;
1453
+ __entry->ref = ref;
1454
+ __entry->active = active;
1455
+ __entry->reason = reason;
1456
+ ),
1457
+
1458
+ TP_printk("s=%08x %s u=%d a=%d",
1459
+ __entry->server,
1460
+ __print_symbolic(__entry->reason, afs_server_traces),
1461
+ __entry->ref,
1462
+ __entry->active)
1463
+ );
1464
+
1465
+TRACE_EVENT(afs_volume,
1466
+ TP_PROTO(afs_volid_t vid, int ref, enum afs_volume_trace reason),
1467
+
1468
+ TP_ARGS(vid, ref, reason),
1469
+
1470
+ TP_STRUCT__entry(
1471
+ __field(afs_volid_t, vid )
1472
+ __field(int, ref )
1473
+ __field(enum afs_volume_trace, reason )
1474
+ ),
1475
+
1476
+ TP_fast_assign(
1477
+ __entry->vid = vid;
1478
+ __entry->ref = ref;
1479
+ __entry->reason = reason;
1480
+ ),
1481
+
1482
+ TP_printk("V=%llx %s u=%d",
1483
+ __entry->vid,
1484
+ __print_symbolic(__entry->reason, afs_volume_traces),
1485
+ __entry->ref)
1486
+ );
1487
+
1488
+TRACE_EVENT(afs_cell,
1489
+ TP_PROTO(unsigned int cell_debug_id, int usage, int active,
1490
+ enum afs_cell_trace reason),
1491
+
1492
+ TP_ARGS(cell_debug_id, usage, active, reason),
1493
+
1494
+ TP_STRUCT__entry(
1495
+ __field(unsigned int, cell )
1496
+ __field(int, usage )
1497
+ __field(int, active )
1498
+ __field(int, reason )
1499
+ ),
1500
+
1501
+ TP_fast_assign(
1502
+ __entry->cell = cell_debug_id;
1503
+ __entry->usage = usage;
1504
+ __entry->active = active;
1505
+ __entry->reason = reason;
1506
+ ),
1507
+
1508
+ TP_printk("L=%08x %s u=%d a=%d",
1509
+ __entry->cell,
1510
+ __print_symbolic(__entry->reason, afs_cell_traces),
1511
+ __entry->usage,
1512
+ __entry->active)
1513
+ );
1514
+
6201515 #endif /* _TRACE_AFS_H */
6211516
6221517 /* This part must be outside protection */