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