1b4d0d230SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 28e8d7f13SDavid Howells /* AFS tracepoints 38e8d7f13SDavid Howells * 48e8d7f13SDavid Howells * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 58e8d7f13SDavid Howells * Written by David Howells (dhowells@redhat.com) 68e8d7f13SDavid Howells */ 78e8d7f13SDavid Howells #undef TRACE_SYSTEM 88e8d7f13SDavid Howells #define TRACE_SYSTEM afs 98e8d7f13SDavid Howells 108e8d7f13SDavid Howells #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ) 118e8d7f13SDavid Howells #define _TRACE_AFS_H 128e8d7f13SDavid Howells 138e8d7f13SDavid Howells #include <linux/tracepoint.h> 148e8d7f13SDavid Howells 15341f741fSDavid Howells /* 16341f741fSDavid Howells * Define enums for tracing information. 17341f741fSDavid Howells */ 18341f741fSDavid Howells #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 19341f741fSDavid Howells #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY 20341f741fSDavid Howells 21025db80cSDavid Howells enum afs_fs_operation { 22025db80cSDavid Howells afs_FS_FetchData = 130, /* AFS Fetch file data */ 23260f082bSDavid Howells afs_FS_FetchACL = 131, /* AFS Fetch file ACL */ 24025db80cSDavid Howells afs_FS_FetchStatus = 132, /* AFS Fetch file status */ 25025db80cSDavid Howells afs_FS_StoreData = 133, /* AFS Store file data */ 26b10494afSJoe Gorse afs_FS_StoreACL = 134, /* AFS Store file ACL */ 27025db80cSDavid Howells afs_FS_StoreStatus = 135, /* AFS Store file status */ 28025db80cSDavid Howells afs_FS_RemoveFile = 136, /* AFS Remove a file */ 29025db80cSDavid Howells afs_FS_CreateFile = 137, /* AFS Create a file */ 30025db80cSDavid Howells afs_FS_Rename = 138, /* AFS Rename or move a file or directory */ 31025db80cSDavid Howells afs_FS_Symlink = 139, /* AFS Create a symbolic link */ 32025db80cSDavid Howells afs_FS_Link = 140, /* AFS Create a hard link */ 33025db80cSDavid Howells afs_FS_MakeDir = 141, /* AFS Create a directory */ 34025db80cSDavid Howells afs_FS_RemoveDir = 142, /* AFS Remove a directory */ 35025db80cSDavid Howells afs_FS_GetVolumeInfo = 148, /* AFS Get information about a volume */ 36025db80cSDavid Howells afs_FS_GetVolumeStatus = 149, /* AFS Get volume status information */ 37025db80cSDavid Howells afs_FS_GetRootVolume = 151, /* AFS Get root volume name */ 38025db80cSDavid Howells afs_FS_SetLock = 156, /* AFS Request a file lock */ 39025db80cSDavid Howells afs_FS_ExtendLock = 157, /* AFS Extend a file lock */ 40025db80cSDavid Howells afs_FS_ReleaseLock = 158, /* AFS Release a file lock */ 41025db80cSDavid Howells afs_FS_Lookup = 161, /* AFS lookup file in directory */ 425cf9dd55SDavid Howells afs_FS_InlineBulkStatus = 65536, /* AFS Fetch multiple file statuses with errors */ 43025db80cSDavid Howells afs_FS_FetchData64 = 65537, /* AFS Fetch file data */ 44025db80cSDavid Howells afs_FS_StoreData64 = 65538, /* AFS Store file data */ 45025db80cSDavid Howells afs_FS_GiveUpAllCallBacks = 65539, /* AFS Give up all our callbacks on a server */ 46025db80cSDavid Howells afs_FS_GetCapabilities = 65540, /* AFS Get FS server capabilities */ 4730062bd1SDavid Howells 4830062bd1SDavid Howells yfs_FS_FetchData = 130, /* YFS Fetch file data */ 4930062bd1SDavid Howells yfs_FS_FetchACL = 64131, /* YFS Fetch file ACL */ 5030062bd1SDavid Howells yfs_FS_FetchStatus = 64132, /* YFS Fetch file status */ 5130062bd1SDavid Howells yfs_FS_StoreACL = 64134, /* YFS Store file ACL */ 5230062bd1SDavid Howells yfs_FS_StoreStatus = 64135, /* YFS Store file status */ 5330062bd1SDavid Howells yfs_FS_RemoveFile = 64136, /* YFS Remove a file */ 5430062bd1SDavid Howells yfs_FS_CreateFile = 64137, /* YFS Create a file */ 5530062bd1SDavid Howells yfs_FS_Rename = 64138, /* YFS Rename or move a file or directory */ 5630062bd1SDavid Howells yfs_FS_Symlink = 64139, /* YFS Create a symbolic link */ 5730062bd1SDavid Howells yfs_FS_Link = 64140, /* YFS Create a hard link */ 5830062bd1SDavid Howells yfs_FS_MakeDir = 64141, /* YFS Create a directory */ 5930062bd1SDavid Howells yfs_FS_RemoveDir = 64142, /* YFS Remove a directory */ 6030062bd1SDavid Howells yfs_FS_GetVolumeStatus = 64149, /* YFS Get volume status information */ 6130062bd1SDavid Howells yfs_FS_SetVolumeStatus = 64150, /* YFS Set volume status information */ 6230062bd1SDavid Howells yfs_FS_SetLock = 64156, /* YFS Request a file lock */ 6330062bd1SDavid Howells yfs_FS_ExtendLock = 64157, /* YFS Extend a file lock */ 6430062bd1SDavid Howells yfs_FS_ReleaseLock = 64158, /* YFS Release a file lock */ 6530062bd1SDavid Howells yfs_FS_Lookup = 64161, /* YFS lookup file in directory */ 6630062bd1SDavid Howells yfs_FS_FlushCPS = 64165, 6730062bd1SDavid Howells yfs_FS_FetchOpaqueACL = 64168, 6830062bd1SDavid Howells yfs_FS_WhoAmI = 64170, 6930062bd1SDavid Howells yfs_FS_RemoveACL = 64171, 7030062bd1SDavid Howells yfs_FS_RemoveFile2 = 64173, 7130062bd1SDavid Howells yfs_FS_StoreOpaqueACL2 = 64174, 7230062bd1SDavid Howells yfs_FS_InlineBulkStatus = 64536, /* YFS Fetch multiple file statuses with errors */ 7330062bd1SDavid Howells yfs_FS_FetchData64 = 64537, /* YFS Fetch file data */ 7430062bd1SDavid Howells yfs_FS_StoreData64 = 64538, /* YFS Store file data */ 7530062bd1SDavid Howells yfs_FS_UpdateSymlink = 64540, 76025db80cSDavid Howells }; 77025db80cSDavid Howells 78025db80cSDavid Howells enum afs_vl_operation { 79025db80cSDavid Howells afs_VL_GetEntryByNameU = 527, /* AFS Get Vol Entry By Name operation ID */ 80025db80cSDavid Howells afs_VL_GetAddrsU = 533, /* AFS Get FS server addresses */ 81025db80cSDavid Howells afs_YFSVL_GetEndpoints = 64002, /* YFS Get FS & Vol server addresses */ 82c3e9f888SDavid Howells afs_YFSVL_GetCellName = 64014, /* YFS Get actual cell name */ 83025db80cSDavid Howells afs_VL_GetCapabilities = 65537, /* AFS Get VL server capabilities */ 84025db80cSDavid Howells }; 85025db80cSDavid Howells 866c881ca0SDavid Howells enum afs_cm_operation { 876c881ca0SDavid Howells afs_CB_CallBack = 204, /* AFS break callback promises */ 886c881ca0SDavid Howells afs_CB_InitCallBackState = 205, /* AFS initialise callback state */ 896c881ca0SDavid Howells afs_CB_Probe = 206, /* AFS probe client */ 906c881ca0SDavid Howells afs_CB_GetLock = 207, /* AFS get contents of CM lock table */ 916c881ca0SDavid Howells afs_CB_GetCE = 208, /* AFS get cache file description */ 926c881ca0SDavid Howells afs_CB_GetXStatsVersion = 209, /* AFS get version of extended statistics */ 936c881ca0SDavid Howells afs_CB_GetXStats = 210, /* AFS get contents of extended statistics data */ 946c881ca0SDavid Howells afs_CB_InitCallBackState3 = 213, /* AFS initialise callback state, version 3 */ 956c881ca0SDavid Howells afs_CB_ProbeUuid = 214, /* AFS check the client hasn't rebooted */ 966c881ca0SDavid Howells }; 976c881ca0SDavid Howells 986c881ca0SDavid Howells enum yfs_cm_operation { 996c881ca0SDavid Howells yfs_CB_Probe = 206, /* YFS probe client */ 1006c881ca0SDavid Howells yfs_CB_GetLock = 207, /* YFS get contents of CM lock table */ 1016c881ca0SDavid Howells yfs_CB_XStatsVersion = 209, /* YFS get version of extended statistics */ 1026c881ca0SDavid Howells yfs_CB_GetXStats = 210, /* YFS get contents of extended statistics data */ 1036c881ca0SDavid Howells yfs_CB_InitCallBackState3 = 213, /* YFS initialise callback state, version 3 */ 1046c881ca0SDavid Howells yfs_CB_ProbeUuid = 214, /* YFS check the client hasn't rebooted */ 1056c881ca0SDavid Howells yfs_CB_GetServerPrefs = 215, 1066c881ca0SDavid Howells yfs_CB_GetCellServDV = 216, 1076c881ca0SDavid Howells yfs_CB_GetLocalCell = 217, 1086c881ca0SDavid Howells yfs_CB_GetCacheConfig = 218, 1096c881ca0SDavid Howells yfs_CB_GetCellByNum = 65537, 1106c881ca0SDavid Howells yfs_CB_TellMeAboutYourself = 65538, /* get client capabilities */ 1116c881ca0SDavid Howells yfs_CB_CallBack = 64204, 1126c881ca0SDavid Howells }; 1136c881ca0SDavid Howells 114341f741fSDavid Howells #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */ 115341f741fSDavid Howells 116341f741fSDavid Howells /* 117341f741fSDavid Howells * Declare tracing information enums and their string mappings for display. 118341f741fSDavid Howells */ 119341f741fSDavid Howells #define afs_call_traces \ 120341f741fSDavid Howells EM(afs_call_trace_alloc, "ALLOC") \ 121341f741fSDavid Howells EM(afs_call_trace_free, "FREE ") \ 12234fa4761SDavid Howells EM(afs_call_trace_get, "GET ") \ 123341f741fSDavid Howells EM(afs_call_trace_put, "PUT ") \ 124341f741fSDavid Howells EM(afs_call_trace_wake, "WAKE ") \ 1254636cf18SDavid Howells E_(afs_call_trace_work, "QUEUE") 126341f741fSDavid Howells 12745218193SDavid Howells #define afs_server_traces \ 12845218193SDavid Howells EM(afs_server_trace_alloc, "ALLOC ") \ 12945218193SDavid Howells EM(afs_server_trace_callback, "CALLBACK ") \ 13045218193SDavid Howells EM(afs_server_trace_destroy, "DESTROY ") \ 13145218193SDavid Howells EM(afs_server_trace_free, "FREE ") \ 13245218193SDavid Howells EM(afs_server_trace_gc, "GC ") \ 133977e5f8eSDavid Howells EM(afs_server_trace_get_by_addr, "GET addr ") \ 13445218193SDavid Howells EM(afs_server_trace_get_by_uuid, "GET uuid ") \ 13545218193SDavid Howells EM(afs_server_trace_get_caps, "GET caps ") \ 13645218193SDavid Howells EM(afs_server_trace_get_install, "GET inst ") \ 13745218193SDavid Howells EM(afs_server_trace_get_new_cbi, "GET cbi ") \ 138f6cbb368SDavid Howells EM(afs_server_trace_get_probe, "GET probe") \ 13945218193SDavid Howells EM(afs_server_trace_give_up_cb, "giveup-cb") \ 1407530d3ebSDavid Howells EM(afs_server_trace_purging, "PURGE ") \ 14145218193SDavid Howells EM(afs_server_trace_put_call, "PUT call ") \ 14245218193SDavid Howells EM(afs_server_trace_put_cbi, "PUT cbi ") \ 14345218193SDavid Howells EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \ 144f6cbb368SDavid Howells EM(afs_server_trace_put_probe, "PUT probe") \ 14545218193SDavid Howells EM(afs_server_trace_put_slist, "PUT slist") \ 14645218193SDavid Howells EM(afs_server_trace_put_slist_isort, "PUT isort") \ 14745218193SDavid Howells EM(afs_server_trace_put_uuid_rsq, "PUT u-req") \ 14845218193SDavid Howells E_(afs_server_trace_update, "UPDATE") 14945218193SDavid Howells 150cca37d45SDavid Howells #define afs_volume_traces \ 151cca37d45SDavid Howells EM(afs_volume_trace_alloc, "ALLOC ") \ 152cca37d45SDavid Howells EM(afs_volume_trace_free, "FREE ") \ 153cca37d45SDavid Howells EM(afs_volume_trace_get_alloc_sbi, "GET sbi-alloc ") \ 154cca37d45SDavid Howells EM(afs_volume_trace_get_cell_insert, "GET cell-insrt") \ 155cca37d45SDavid Howells EM(afs_volume_trace_get_new_op, "GET op-new ") \ 156cca37d45SDavid Howells EM(afs_volume_trace_get_query_alias, "GET cell-alias") \ 157cca37d45SDavid Howells EM(afs_volume_trace_put_cell_dup, "PUT cell-dup ") \ 158cca37d45SDavid Howells EM(afs_volume_trace_put_cell_root, "PUT cell-root ") \ 159cca37d45SDavid Howells EM(afs_volume_trace_put_destroy_sbi, "PUT sbi-destry") \ 160cca37d45SDavid Howells EM(afs_volume_trace_put_free_fc, "PUT fc-free ") \ 161cca37d45SDavid Howells EM(afs_volume_trace_put_put_op, "PUT op-put ") \ 162cca37d45SDavid Howells EM(afs_volume_trace_put_query_alias, "PUT cell-alias") \ 163cca37d45SDavid Howells EM(afs_volume_trace_put_validate_fc, "PUT fc-validat") \ 164cca37d45SDavid Howells E_(afs_volume_trace_remove, "REMOVE ") 165cca37d45SDavid Howells 166dca54a7bSDavid Howells #define afs_cell_traces \ 167dca54a7bSDavid Howells EM(afs_cell_trace_alloc, "ALLOC ") \ 168dca54a7bSDavid Howells EM(afs_cell_trace_free, "FREE ") \ 169dca54a7bSDavid Howells EM(afs_cell_trace_get_queue_dns, "GET q-dns ") \ 170dca54a7bSDavid Howells EM(afs_cell_trace_get_queue_manage, "GET q-mng ") \ 171dca54a7bSDavid Howells EM(afs_cell_trace_get_queue_new, "GET q-new ") \ 172dca54a7bSDavid Howells EM(afs_cell_trace_get_vol, "GET vol ") \ 173dca54a7bSDavid Howells EM(afs_cell_trace_insert, "INSERT ") \ 174dca54a7bSDavid Howells EM(afs_cell_trace_manage, "MANAGE ") \ 175dca54a7bSDavid Howells EM(afs_cell_trace_put_candidate, "PUT candid") \ 176dca54a7bSDavid Howells EM(afs_cell_trace_put_destroy, "PUT destry") \ 177dca54a7bSDavid Howells EM(afs_cell_trace_put_queue_work, "PUT q-work") \ 178dca54a7bSDavid Howells EM(afs_cell_trace_put_queue_fail, "PUT q-fail") \ 179dca54a7bSDavid Howells EM(afs_cell_trace_put_vol, "PUT vol ") \ 180dca54a7bSDavid Howells EM(afs_cell_trace_see_source, "SEE source") \ 181dca54a7bSDavid Howells EM(afs_cell_trace_see_ws, "SEE ws ") \ 182dca54a7bSDavid Howells EM(afs_cell_trace_unuse_alias, "UNU alias ") \ 183dca54a7bSDavid Howells EM(afs_cell_trace_unuse_check_alias, "UNU chk-al") \ 184dca54a7bSDavid Howells EM(afs_cell_trace_unuse_delete, "UNU delete") \ 185dca54a7bSDavid Howells EM(afs_cell_trace_unuse_fc, "UNU fc ") \ 186dca54a7bSDavid Howells EM(afs_cell_trace_unuse_lookup, "UNU lookup") \ 187dca54a7bSDavid Howells EM(afs_cell_trace_unuse_mntpt, "UNU mntpt ") \ 188243d2506SDavid Howells EM(afs_cell_trace_unuse_no_pin, "UNU no-pin") \ 189dca54a7bSDavid Howells EM(afs_cell_trace_unuse_parse, "UNU parse ") \ 190dca54a7bSDavid Howells EM(afs_cell_trace_unuse_pin, "UNU pin ") \ 191dca54a7bSDavid Howells EM(afs_cell_trace_unuse_probe, "UNU probe ") \ 192dca54a7bSDavid Howells EM(afs_cell_trace_unuse_sbi, "UNU sbi ") \ 193dca54a7bSDavid Howells EM(afs_cell_trace_unuse_ws, "UNU ws ") \ 194dca54a7bSDavid Howells EM(afs_cell_trace_use_alias, "USE alias ") \ 195dca54a7bSDavid Howells EM(afs_cell_trace_use_check_alias, "USE chk-al") \ 196dca54a7bSDavid Howells EM(afs_cell_trace_use_fc, "USE fc ") \ 197dca54a7bSDavid Howells EM(afs_cell_trace_use_fc_alias, "USE fc-al ") \ 198dca54a7bSDavid Howells EM(afs_cell_trace_use_lookup, "USE lookup") \ 199dca54a7bSDavid Howells EM(afs_cell_trace_use_mntpt, "USE mntpt ") \ 200dca54a7bSDavid Howells EM(afs_cell_trace_use_pin, "USE pin ") \ 201dca54a7bSDavid Howells EM(afs_cell_trace_use_probe, "USE probe ") \ 202dca54a7bSDavid Howells EM(afs_cell_trace_use_sbi, "USE sbi ") \ 203dca54a7bSDavid Howells E_(afs_cell_trace_wait, "WAIT ") 204dca54a7bSDavid Howells 205025db80cSDavid Howells #define afs_fs_operations \ 206025db80cSDavid Howells EM(afs_FS_FetchData, "FS.FetchData") \ 207025db80cSDavid Howells EM(afs_FS_FetchStatus, "FS.FetchStatus") \ 208025db80cSDavid Howells EM(afs_FS_StoreData, "FS.StoreData") \ 209025db80cSDavid Howells EM(afs_FS_StoreStatus, "FS.StoreStatus") \ 210025db80cSDavid Howells EM(afs_FS_RemoveFile, "FS.RemoveFile") \ 211025db80cSDavid Howells EM(afs_FS_CreateFile, "FS.CreateFile") \ 212025db80cSDavid Howells EM(afs_FS_Rename, "FS.Rename") \ 213025db80cSDavid Howells EM(afs_FS_Symlink, "FS.Symlink") \ 214025db80cSDavid Howells EM(afs_FS_Link, "FS.Link") \ 215025db80cSDavid Howells EM(afs_FS_MakeDir, "FS.MakeDir") \ 216025db80cSDavid Howells EM(afs_FS_RemoveDir, "FS.RemoveDir") \ 217025db80cSDavid Howells EM(afs_FS_GetVolumeInfo, "FS.GetVolumeInfo") \ 218025db80cSDavid Howells EM(afs_FS_GetVolumeStatus, "FS.GetVolumeStatus") \ 219025db80cSDavid Howells EM(afs_FS_GetRootVolume, "FS.GetRootVolume") \ 220025db80cSDavid Howells EM(afs_FS_SetLock, "FS.SetLock") \ 221025db80cSDavid Howells EM(afs_FS_ExtendLock, "FS.ExtendLock") \ 222025db80cSDavid Howells EM(afs_FS_ReleaseLock, "FS.ReleaseLock") \ 223025db80cSDavid Howells EM(afs_FS_Lookup, "FS.Lookup") \ 2245cf9dd55SDavid Howells EM(afs_FS_InlineBulkStatus, "FS.InlineBulkStatus") \ 225025db80cSDavid Howells EM(afs_FS_FetchData64, "FS.FetchData64") \ 226025db80cSDavid Howells EM(afs_FS_StoreData64, "FS.StoreData64") \ 227025db80cSDavid Howells EM(afs_FS_GiveUpAllCallBacks, "FS.GiveUpAllCallBacks") \ 22830062bd1SDavid Howells EM(afs_FS_GetCapabilities, "FS.GetCapabilities") \ 22930062bd1SDavid Howells EM(yfs_FS_FetchACL, "YFS.FetchACL") \ 23030062bd1SDavid Howells EM(yfs_FS_FetchStatus, "YFS.FetchStatus") \ 23130062bd1SDavid Howells EM(yfs_FS_StoreACL, "YFS.StoreACL") \ 23230062bd1SDavid Howells EM(yfs_FS_StoreStatus, "YFS.StoreStatus") \ 23330062bd1SDavid Howells EM(yfs_FS_RemoveFile, "YFS.RemoveFile") \ 23430062bd1SDavid Howells EM(yfs_FS_CreateFile, "YFS.CreateFile") \ 23530062bd1SDavid Howells EM(yfs_FS_Rename, "YFS.Rename") \ 23630062bd1SDavid Howells EM(yfs_FS_Symlink, "YFS.Symlink") \ 23730062bd1SDavid Howells EM(yfs_FS_Link, "YFS.Link") \ 23830062bd1SDavid Howells EM(yfs_FS_MakeDir, "YFS.MakeDir") \ 23930062bd1SDavid Howells EM(yfs_FS_RemoveDir, "YFS.RemoveDir") \ 24030062bd1SDavid Howells EM(yfs_FS_GetVolumeStatus, "YFS.GetVolumeStatus") \ 24130062bd1SDavid Howells EM(yfs_FS_SetVolumeStatus, "YFS.SetVolumeStatus") \ 24230062bd1SDavid Howells EM(yfs_FS_SetLock, "YFS.SetLock") \ 24330062bd1SDavid Howells EM(yfs_FS_ExtendLock, "YFS.ExtendLock") \ 24430062bd1SDavid Howells EM(yfs_FS_ReleaseLock, "YFS.ReleaseLock") \ 24530062bd1SDavid Howells EM(yfs_FS_Lookup, "YFS.Lookup") \ 24630062bd1SDavid Howells EM(yfs_FS_FlushCPS, "YFS.FlushCPS") \ 24730062bd1SDavid Howells EM(yfs_FS_FetchOpaqueACL, "YFS.FetchOpaqueACL") \ 24830062bd1SDavid Howells EM(yfs_FS_WhoAmI, "YFS.WhoAmI") \ 24930062bd1SDavid Howells EM(yfs_FS_RemoveACL, "YFS.RemoveACL") \ 25030062bd1SDavid Howells EM(yfs_FS_RemoveFile2, "YFS.RemoveFile2") \ 25130062bd1SDavid Howells EM(yfs_FS_StoreOpaqueACL2, "YFS.StoreOpaqueACL2") \ 25230062bd1SDavid Howells EM(yfs_FS_InlineBulkStatus, "YFS.InlineBulkStatus") \ 25330062bd1SDavid Howells EM(yfs_FS_FetchData64, "YFS.FetchData64") \ 25430062bd1SDavid Howells EM(yfs_FS_StoreData64, "YFS.StoreData64") \ 25530062bd1SDavid Howells E_(yfs_FS_UpdateSymlink, "YFS.UpdateSymlink") 256025db80cSDavid Howells 257025db80cSDavid Howells #define afs_vl_operations \ 258025db80cSDavid Howells EM(afs_VL_GetEntryByNameU, "VL.GetEntryByNameU") \ 259025db80cSDavid Howells EM(afs_VL_GetAddrsU, "VL.GetAddrsU") \ 260025db80cSDavid Howells EM(afs_YFSVL_GetEndpoints, "YFSVL.GetEndpoints") \ 261c3e9f888SDavid Howells EM(afs_YFSVL_GetCellName, "YFSVL.GetCellName") \ 262025db80cSDavid Howells E_(afs_VL_GetCapabilities, "VL.GetCapabilities") 263025db80cSDavid Howells 2646c881ca0SDavid Howells #define afs_cm_operations \ 2656c881ca0SDavid Howells EM(afs_CB_CallBack, "CB.CallBack") \ 2666c881ca0SDavid Howells EM(afs_CB_InitCallBackState, "CB.InitCallBackState") \ 2676c881ca0SDavid Howells EM(afs_CB_Probe, "CB.Probe") \ 2686c881ca0SDavid Howells EM(afs_CB_GetLock, "CB.GetLock") \ 2696c881ca0SDavid Howells EM(afs_CB_GetCE, "CB.GetCE") \ 2706c881ca0SDavid Howells EM(afs_CB_GetXStatsVersion, "CB.GetXStatsVersion") \ 2716c881ca0SDavid Howells EM(afs_CB_GetXStats, "CB.GetXStats") \ 2726c881ca0SDavid Howells EM(afs_CB_InitCallBackState3, "CB.InitCallBackState3") \ 2736c881ca0SDavid Howells E_(afs_CB_ProbeUuid, "CB.ProbeUuid") 2746c881ca0SDavid Howells 2756c881ca0SDavid Howells #define yfs_cm_operations \ 2766c881ca0SDavid Howells EM(yfs_CB_Probe, "YFSCB.Probe") \ 2776c881ca0SDavid Howells EM(yfs_CB_GetLock, "YFSCB.GetLock") \ 2786c881ca0SDavid Howells EM(yfs_CB_XStatsVersion, "YFSCB.XStatsVersion") \ 2796c881ca0SDavid Howells EM(yfs_CB_GetXStats, "YFSCB.GetXStats") \ 2806c881ca0SDavid Howells EM(yfs_CB_InitCallBackState3, "YFSCB.InitCallBackState3") \ 2816c881ca0SDavid Howells EM(yfs_CB_ProbeUuid, "YFSCB.ProbeUuid") \ 2826c881ca0SDavid Howells EM(yfs_CB_GetServerPrefs, "YFSCB.GetServerPrefs") \ 2836c881ca0SDavid Howells EM(yfs_CB_GetCellServDV, "YFSCB.GetCellServDV") \ 2846c881ca0SDavid Howells EM(yfs_CB_GetLocalCell, "YFSCB.GetLocalCell") \ 2856c881ca0SDavid Howells EM(yfs_CB_GetCacheConfig, "YFSCB.GetCacheConfig") \ 2866c881ca0SDavid Howells EM(yfs_CB_GetCellByNum, "YFSCB.GetCellByNum") \ 2876c881ca0SDavid Howells EM(yfs_CB_TellMeAboutYourself, "YFSCB.TellMeAboutYourself") \ 2886c881ca0SDavid Howells E_(yfs_CB_CallBack, "YFSCB.CallBack") 2896c881ca0SDavid Howells 29063a4681fSDavid Howells #define afs_edit_dir_ops \ 29163a4681fSDavid Howells EM(afs_edit_dir_create, "create") \ 29263a4681fSDavid Howells EM(afs_edit_dir_create_error, "c_fail") \ 29363a4681fSDavid Howells EM(afs_edit_dir_create_inval, "c_invl") \ 29463a4681fSDavid Howells EM(afs_edit_dir_create_nospc, "c_nspc") \ 29563a4681fSDavid Howells EM(afs_edit_dir_delete, "delete") \ 29663a4681fSDavid Howells EM(afs_edit_dir_delete_error, "d_err ") \ 29763a4681fSDavid Howells EM(afs_edit_dir_delete_inval, "d_invl") \ 298*790dc90bSDavid Howells EM(afs_edit_dir_delete_noent, "d_nent") \ 299*790dc90bSDavid Howells EM(afs_edit_dir_update_dd, "u_ddot") \ 300*790dc90bSDavid Howells EM(afs_edit_dir_update_error, "u_fail") \ 301*790dc90bSDavid Howells EM(afs_edit_dir_update_inval, "u_invl") \ 302*790dc90bSDavid Howells E_(afs_edit_dir_update_nodd, "u_nodd") 30363a4681fSDavid Howells 30463a4681fSDavid Howells #define afs_edit_dir_reasons \ 30563a4681fSDavid Howells EM(afs_edit_dir_for_create, "Create") \ 30663a4681fSDavid Howells EM(afs_edit_dir_for_link, "Link ") \ 30763a4681fSDavid Howells EM(afs_edit_dir_for_mkdir, "MkDir ") \ 30879ddbfa5SDavid Howells EM(afs_edit_dir_for_rename_0, "Renam0") \ 30979ddbfa5SDavid Howells EM(afs_edit_dir_for_rename_1, "Renam1") \ 31079ddbfa5SDavid Howells EM(afs_edit_dir_for_rename_2, "Renam2") \ 311*790dc90bSDavid Howells EM(afs_edit_dir_for_rename_sub, "RnmSub") \ 31263a4681fSDavid Howells EM(afs_edit_dir_for_rmdir, "RmDir ") \ 31379ddbfa5SDavid Howells EM(afs_edit_dir_for_silly_0, "S_Ren0") \ 31479ddbfa5SDavid Howells EM(afs_edit_dir_for_silly_1, "S_Ren1") \ 31563a4681fSDavid Howells EM(afs_edit_dir_for_symlink, "Symlnk") \ 31663a4681fSDavid Howells E_(afs_edit_dir_for_unlink, "Unlink") 31763a4681fSDavid Howells 318160cb957SDavid Howells #define afs_eproto_causes \ 319160cb957SDavid Howells EM(afs_eproto_bad_status, "BadStatus") \ 320160cb957SDavid Howells EM(afs_eproto_cb_count, "CbCount") \ 321160cb957SDavid Howells EM(afs_eproto_cb_fid_count, "CbFidCount") \ 322c3e9f888SDavid Howells EM(afs_eproto_cellname_len, "CellNameLen") \ 323160cb957SDavid Howells EM(afs_eproto_file_type, "FileTYpe") \ 324160cb957SDavid Howells EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \ 325160cb957SDavid Howells EM(afs_eproto_ibulkst_count, "IBS.FidCount") \ 326160cb957SDavid Howells EM(afs_eproto_motd_len, "MotdLen") \ 327160cb957SDavid Howells EM(afs_eproto_offline_msg_len, "OfflineMsgLen") \ 328160cb957SDavid Howells EM(afs_eproto_volname_len, "VolNameLen") \ 329160cb957SDavid Howells EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \ 330160cb957SDavid Howells EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \ 331160cb957SDavid Howells EM(afs_eproto_yvl_fsendpt_num, "YVL.FsEndCount") \ 332160cb957SDavid Howells EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \ 333160cb957SDavid Howells EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \ 334160cb957SDavid Howells EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \ 335160cb957SDavid Howells E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType") 336160cb957SDavid Howells 337f51375cdSDavid Howells #define afs_io_errors \ 338f51375cdSDavid Howells EM(afs_io_error_cm_reply, "CM_REPLY") \ 339f51375cdSDavid Howells EM(afs_io_error_extract, "EXTRACT") \ 340f51375cdSDavid Howells EM(afs_io_error_fs_probe_fail, "FS_PROBE_FAIL") \ 3413bf0fb6fSDavid Howells EM(afs_io_error_vl_lookup_fail, "VL_LOOKUP_FAIL") \ 3423bf0fb6fSDavid Howells E_(afs_io_error_vl_probe_fail, "VL_PROBE_FAIL") 343f51375cdSDavid Howells 344f51375cdSDavid Howells #define afs_file_errors \ 345f51375cdSDavid Howells EM(afs_file_error_dir_bad_magic, "DIR_BAD_MAGIC") \ 346f51375cdSDavid Howells EM(afs_file_error_dir_big, "DIR_BIG") \ 347f51375cdSDavid Howells EM(afs_file_error_dir_missing_page, "DIR_MISSING_PAGE") \ 348366911cdSDavid Howells EM(afs_file_error_dir_name_too_long, "DIR_NAME_TOO_LONG") \ 349f51375cdSDavid Howells EM(afs_file_error_dir_over_end, "DIR_ENT_OVER_END") \ 350f51375cdSDavid Howells EM(afs_file_error_dir_small, "DIR_SMALL") \ 351f51375cdSDavid Howells EM(afs_file_error_dir_unmarked_ext, "DIR_UNMARKED_EXT") \ 352f51375cdSDavid Howells EM(afs_file_error_mntpt, "MNTPT_READ_FAILED") \ 353f51375cdSDavid Howells E_(afs_file_error_writeback_fail, "WRITEBACK_FAILED") 354025db80cSDavid Howells 355d4696601SDavid Howells #define afs_flock_types \ 356d4696601SDavid Howells EM(F_RDLCK, "RDLCK") \ 357d4696601SDavid Howells EM(F_WRLCK, "WRLCK") \ 358d4696601SDavid Howells E_(F_UNLCK, "UNLCK") 359d4696601SDavid Howells 360d4696601SDavid Howells #define afs_flock_states \ 361d4696601SDavid Howells EM(AFS_VNODE_LOCK_NONE, "NONE") \ 362d4696601SDavid Howells EM(AFS_VNODE_LOCK_WAITING_FOR_CB, "WAIT_FOR_CB") \ 363d4696601SDavid Howells EM(AFS_VNODE_LOCK_SETTING, "SETTING") \ 364d4696601SDavid Howells EM(AFS_VNODE_LOCK_GRANTED, "GRANTED") \ 365d4696601SDavid Howells EM(AFS_VNODE_LOCK_EXTENDING, "EXTENDING") \ 366d4696601SDavid Howells EM(AFS_VNODE_LOCK_NEED_UNLOCK, "NEED_UNLOCK") \ 367cdfb26b4SDavid Howells EM(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \ 368cdfb26b4SDavid Howells E_(AFS_VNODE_LOCK_DELETED, "DELETED") 369d4696601SDavid Howells 370d4696601SDavid Howells #define afs_flock_events \ 371d4696601SDavid Howells EM(afs_flock_acquired, "Acquired") \ 372d4696601SDavid Howells EM(afs_flock_callback_break, "Callback") \ 373d4696601SDavid Howells EM(afs_flock_defer_unlock, "D-Unlock") \ 374cdfb26b4SDavid Howells EM(afs_flock_extend_fail, "Ext_Fail") \ 375d4696601SDavid Howells EM(afs_flock_fail_other, "ErrOther") \ 376d4696601SDavid Howells EM(afs_flock_fail_perm, "ErrPerm ") \ 377d4696601SDavid Howells EM(afs_flock_no_lockers, "NoLocker") \ 378cdfb26b4SDavid Howells EM(afs_flock_release_fail, "Rel_Fail") \ 37979ddbfa5SDavid Howells EM(afs_flock_silly_delete, "SillyDel") \ 380d4696601SDavid Howells EM(afs_flock_timestamp, "Timestmp") \ 381d4696601SDavid Howells EM(afs_flock_try_to_lock, "TryToLck") \ 382d4696601SDavid Howells EM(afs_flock_vfs_lock, "VFSLock ") \ 383d4696601SDavid Howells EM(afs_flock_vfs_locking, "VFSLking") \ 384d4696601SDavid Howells EM(afs_flock_waited, "Waited ") \ 385d4696601SDavid Howells EM(afs_flock_waiting, "Waiting ") \ 386d4696601SDavid Howells EM(afs_flock_work_extending, "Extendng") \ 387d4696601SDavid Howells EM(afs_flock_work_retry, "Retry ") \ 388d4696601SDavid Howells EM(afs_flock_work_unlocking, "Unlcking") \ 389d4696601SDavid Howells E_(afs_flock_would_block, "EWOULDBL") 390d4696601SDavid Howells 391d4696601SDavid Howells #define afs_flock_operations \ 392d4696601SDavid Howells EM(afs_flock_op_copy_lock, "COPY ") \ 393d4696601SDavid Howells EM(afs_flock_op_flock, "->flock ") \ 394d4696601SDavid Howells EM(afs_flock_op_grant, "GRANT ") \ 395d4696601SDavid Howells EM(afs_flock_op_lock, "->lock ") \ 396d4696601SDavid Howells EM(afs_flock_op_release_lock, "RELEASE ") \ 397d4696601SDavid Howells EM(afs_flock_op_return_ok, "<-OK ") \ 398d4696601SDavid Howells EM(afs_flock_op_return_edeadlk, "<-EDEADL") \ 399d4696601SDavid Howells EM(afs_flock_op_return_eagain, "<-EAGAIN") \ 400d4696601SDavid Howells EM(afs_flock_op_return_error, "<-ERROR ") \ 401d4696601SDavid Howells EM(afs_flock_op_set_lock, "SET ") \ 402d4696601SDavid Howells EM(afs_flock_op_unlock, "UNLOCK ") \ 403d4696601SDavid Howells E_(afs_flock_op_wake, "WAKE ") 404d4696601SDavid Howells 405051d2525SDavid Howells #define afs_cb_break_reasons \ 406051d2525SDavid Howells EM(afs_cb_break_no_break, "no-break") \ 4074fe6a946SDavid Howells EM(afs_cb_break_no_promise, "no-promise") \ 408051d2525SDavid Howells EM(afs_cb_break_for_callback, "break-cb") \ 409051d2525SDavid Howells EM(afs_cb_break_for_deleted, "break-del") \ 410051d2525SDavid Howells EM(afs_cb_break_for_lapsed, "break-lapsed") \ 4114fe6a946SDavid Howells EM(afs_cb_break_for_s_reinit, "s-reinit") \ 412051d2525SDavid Howells EM(afs_cb_break_for_unlink, "break-unlink") \ 4134fe6a946SDavid Howells EM(afs_cb_break_for_v_break, "break-v") \ 414051d2525SDavid Howells EM(afs_cb_break_for_volume_callback, "break-v-cb") \ 415051d2525SDavid Howells E_(afs_cb_break_for_zap, "break-zap") 416051d2525SDavid Howells 417341f741fSDavid Howells /* 418243d2506SDavid Howells * Generate enums for tracing information. 419243d2506SDavid Howells */ 420243d2506SDavid Howells #ifndef __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY 421243d2506SDavid Howells #define __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY 422243d2506SDavid Howells 423243d2506SDavid Howells #undef EM 424243d2506SDavid Howells #undef E_ 425243d2506SDavid Howells #define EM(a, b) a, 426243d2506SDavid Howells #define E_(a, b) a 427243d2506SDavid Howells 428243d2506SDavid Howells enum afs_call_trace { afs_call_traces } __mode(byte); 429243d2506SDavid Howells enum afs_cb_break_reason { afs_cb_break_reasons } __mode(byte); 430243d2506SDavid Howells enum afs_cell_trace { afs_cell_traces } __mode(byte); 431243d2506SDavid Howells enum afs_edit_dir_op { afs_edit_dir_ops } __mode(byte); 432243d2506SDavid Howells enum afs_edit_dir_reason { afs_edit_dir_reasons } __mode(byte); 433243d2506SDavid Howells enum afs_eproto_cause { afs_eproto_causes } __mode(byte); 434243d2506SDavid Howells enum afs_file_error { afs_file_errors } __mode(byte); 435243d2506SDavid Howells enum afs_flock_event { afs_flock_events } __mode(byte); 436243d2506SDavid Howells enum afs_flock_operation { afs_flock_operations } __mode(byte); 437243d2506SDavid Howells enum afs_io_error { afs_io_errors } __mode(byte); 438243d2506SDavid Howells enum afs_server_trace { afs_server_traces } __mode(byte); 439243d2506SDavid Howells enum afs_volume_trace { afs_volume_traces } __mode(byte); 440243d2506SDavid Howells 441243d2506SDavid Howells #endif /* end __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY */ 442243d2506SDavid Howells 443243d2506SDavid Howells /* 444341f741fSDavid Howells * Export enum symbols via userspace. 445341f741fSDavid Howells */ 446341f741fSDavid Howells #undef EM 447341f741fSDavid Howells #undef E_ 448341f741fSDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a); 449341f741fSDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a); 450341f741fSDavid Howells 451341f741fSDavid Howells afs_call_traces; 45245218193SDavid Howells afs_server_traces; 453dca54a7bSDavid Howells afs_cell_traces; 454025db80cSDavid Howells afs_fs_operations; 455025db80cSDavid Howells afs_vl_operations; 4566c881ca0SDavid Howells afs_cm_operations; 4576c881ca0SDavid Howells yfs_cm_operations; 45863a4681fSDavid Howells afs_edit_dir_ops; 45963a4681fSDavid Howells afs_edit_dir_reasons; 460f51375cdSDavid Howells afs_eproto_causes; 461f51375cdSDavid Howells afs_io_errors; 462f51375cdSDavid Howells afs_file_errors; 463d4696601SDavid Howells afs_flock_types; 464d4696601SDavid Howells afs_flock_operations; 465051d2525SDavid Howells afs_cb_break_reasons; 466341f741fSDavid Howells 467341f741fSDavid Howells /* 468341f741fSDavid Howells * Now redefine the EM() and E_() macros to map the enums to the strings that 469341f741fSDavid Howells * will be printed in the output. 470341f741fSDavid Howells */ 471341f741fSDavid Howells #undef EM 472341f741fSDavid Howells #undef E_ 473341f741fSDavid Howells #define EM(a, b) { a, b }, 474341f741fSDavid Howells #define E_(a, b) { a, b } 475341f741fSDavid Howells 47612bdcf33SDavid Howells TRACE_EVENT(afs_receive_data, 47712bdcf33SDavid Howells TP_PROTO(struct afs_call *call, struct iov_iter *iter, 4788e8d7f13SDavid Howells bool want_more, int ret), 4798e8d7f13SDavid Howells 48012bdcf33SDavid Howells TP_ARGS(call, iter, want_more, ret), 4818e8d7f13SDavid Howells 4828e8d7f13SDavid Howells TP_STRUCT__entry( 48312bdcf33SDavid Howells __field(loff_t, remain ) 484a25e21f0SDavid Howells __field(unsigned int, call ) 4858e8d7f13SDavid Howells __field(enum afs_call_state, state ) 4868e8d7f13SDavid Howells __field(unsigned short, unmarshall ) 4878e8d7f13SDavid Howells __field(bool, want_more ) 4888e8d7f13SDavid Howells __field(int, ret ) 4898e8d7f13SDavid Howells ), 4908e8d7f13SDavid Howells 4918e8d7f13SDavid Howells TP_fast_assign( 492a25e21f0SDavid Howells __entry->call = call->debug_id; 4938e8d7f13SDavid Howells __entry->state = call->state; 4948e8d7f13SDavid Howells __entry->unmarshall = call->unmarshall; 49512bdcf33SDavid Howells __entry->remain = iov_iter_count(iter); 4968e8d7f13SDavid Howells __entry->want_more = want_more; 4978e8d7f13SDavid Howells __entry->ret = ret; 4988e8d7f13SDavid Howells ), 4998e8d7f13SDavid Howells 50012bdcf33SDavid Howells TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d", 5018e8d7f13SDavid Howells __entry->call, 50212bdcf33SDavid Howells __entry->remain, 50312bdcf33SDavid Howells __entry->unmarshall, 50412bdcf33SDavid Howells __entry->want_more, 50512bdcf33SDavid Howells __entry->state, 50612bdcf33SDavid Howells __entry->ret) 5078e8d7f13SDavid Howells ); 5088e8d7f13SDavid Howells 5098e8d7f13SDavid Howells TRACE_EVENT(afs_notify_call, 5108e8d7f13SDavid Howells TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call), 5118e8d7f13SDavid Howells 5128e8d7f13SDavid Howells TP_ARGS(rxcall, call), 5138e8d7f13SDavid Howells 5148e8d7f13SDavid Howells TP_STRUCT__entry( 515a25e21f0SDavid Howells __field(unsigned int, call ) 5168e8d7f13SDavid Howells __field(enum afs_call_state, state ) 5178e8d7f13SDavid Howells __field(unsigned short, unmarshall ) 5188e8d7f13SDavid Howells ), 5198e8d7f13SDavid Howells 5208e8d7f13SDavid Howells TP_fast_assign( 521a25e21f0SDavid Howells __entry->call = call->debug_id; 5228e8d7f13SDavid Howells __entry->state = call->state; 5238e8d7f13SDavid Howells __entry->unmarshall = call->unmarshall; 5248e8d7f13SDavid Howells ), 5258e8d7f13SDavid Howells 526a25e21f0SDavid Howells TP_printk("c=%08x s=%u u=%u", 5278e8d7f13SDavid Howells __entry->call, 5288e8d7f13SDavid Howells __entry->state, __entry->unmarshall) 5298e8d7f13SDavid Howells ); 5308e8d7f13SDavid Howells 5318e8d7f13SDavid Howells TRACE_EVENT(afs_cb_call, 5328e8d7f13SDavid Howells TP_PROTO(struct afs_call *call), 5338e8d7f13SDavid Howells 5348e8d7f13SDavid Howells TP_ARGS(call), 5358e8d7f13SDavid Howells 5368e8d7f13SDavid Howells TP_STRUCT__entry( 537a25e21f0SDavid Howells __field(unsigned int, call ) 5388e8d7f13SDavid Howells __field(u32, op ) 5396c881ca0SDavid Howells __field(u16, service_id ) 5408e8d7f13SDavid Howells ), 5418e8d7f13SDavid Howells 5428e8d7f13SDavid Howells TP_fast_assign( 543a25e21f0SDavid Howells __entry->call = call->debug_id; 5448e8d7f13SDavid Howells __entry->op = call->operation_ID; 5456c881ca0SDavid Howells __entry->service_id = call->service_id; 5468e8d7f13SDavid Howells ), 5478e8d7f13SDavid Howells 5486c881ca0SDavid Howells TP_printk("c=%08x %s", 5498e8d7f13SDavid Howells __entry->call, 5506c881ca0SDavid Howells __entry->service_id == 2501 ? 5516c881ca0SDavid Howells __print_symbolic(__entry->op, yfs_cm_operations) : 5526c881ca0SDavid Howells __print_symbolic(__entry->op, afs_cm_operations)) 5538e8d7f13SDavid Howells ); 5548e8d7f13SDavid Howells 555341f741fSDavid Howells TRACE_EVENT(afs_call, 5562757a4dcSDavid Howells TP_PROTO(unsigned int call_debug_id, enum afs_call_trace op, 557c56f9ec8SDavid Howells int ref, int outstanding, const void *where), 558341f741fSDavid Howells 5592757a4dcSDavid Howells TP_ARGS(call_debug_id, op, ref, outstanding, where), 560341f741fSDavid Howells 561341f741fSDavid Howells TP_STRUCT__entry( 562a25e21f0SDavid Howells __field(unsigned int, call ) 563341f741fSDavid Howells __field(int, op ) 564c56f9ec8SDavid Howells __field(int, ref ) 565341f741fSDavid Howells __field(int, outstanding ) 566341f741fSDavid Howells __field(const void *, where ) 567341f741fSDavid Howells ), 568341f741fSDavid Howells 569341f741fSDavid Howells TP_fast_assign( 5702757a4dcSDavid Howells __entry->call = call_debug_id; 571341f741fSDavid Howells __entry->op = op; 572c56f9ec8SDavid Howells __entry->ref = ref; 573341f741fSDavid Howells __entry->outstanding = outstanding; 574341f741fSDavid Howells __entry->where = where; 575341f741fSDavid Howells ), 576341f741fSDavid Howells 577c56f9ec8SDavid Howells TP_printk("c=%08x %s r=%d o=%d sp=%pSR", 578341f741fSDavid Howells __entry->call, 579341f741fSDavid Howells __print_symbolic(__entry->op, afs_call_traces), 580c56f9ec8SDavid Howells __entry->ref, 581341f741fSDavid Howells __entry->outstanding, 582341f741fSDavid Howells __entry->where) 583341f741fSDavid Howells ); 584341f741fSDavid Howells 585025db80cSDavid Howells TRACE_EVENT(afs_make_fs_call, 586025db80cSDavid Howells TP_PROTO(struct afs_call *call, const struct afs_fid *fid), 587025db80cSDavid Howells 588025db80cSDavid Howells TP_ARGS(call, fid), 589025db80cSDavid Howells 590025db80cSDavid Howells TP_STRUCT__entry( 591a25e21f0SDavid Howells __field(unsigned int, call ) 592025db80cSDavid Howells __field(enum afs_fs_operation, op ) 593025db80cSDavid Howells __field_struct(struct afs_fid, fid ) 594025db80cSDavid Howells ), 595025db80cSDavid Howells 596025db80cSDavid Howells TP_fast_assign( 597a25e21f0SDavid Howells __entry->call = call->debug_id; 598025db80cSDavid Howells __entry->op = call->operation_ID; 599025db80cSDavid Howells if (fid) { 600025db80cSDavid Howells __entry->fid = *fid; 601025db80cSDavid Howells } else { 602025db80cSDavid Howells __entry->fid.vid = 0; 603025db80cSDavid Howells __entry->fid.vnode = 0; 604025db80cSDavid Howells __entry->fid.unique = 0; 605025db80cSDavid Howells } 606025db80cSDavid Howells ), 607025db80cSDavid Howells 6083b6492dfSDavid Howells TP_printk("c=%08x %06llx:%06llx:%06x %s", 609025db80cSDavid Howells __entry->call, 610025db80cSDavid Howells __entry->fid.vid, 611025db80cSDavid Howells __entry->fid.vnode, 612025db80cSDavid Howells __entry->fid.unique, 613025db80cSDavid Howells __print_symbolic(__entry->op, afs_fs_operations)) 614025db80cSDavid Howells ); 615025db80cSDavid Howells 6166c6c1d63SDavid Howells TRACE_EVENT(afs_make_fs_calli, 6176c6c1d63SDavid Howells TP_PROTO(struct afs_call *call, const struct afs_fid *fid, 6186c6c1d63SDavid Howells unsigned int i), 6196c6c1d63SDavid Howells 6206c6c1d63SDavid Howells TP_ARGS(call, fid, i), 6216c6c1d63SDavid Howells 6226c6c1d63SDavid Howells TP_STRUCT__entry( 6236c6c1d63SDavid Howells __field(unsigned int, call ) 6246c6c1d63SDavid Howells __field(unsigned int, i ) 6256c6c1d63SDavid Howells __field(enum afs_fs_operation, op ) 6266c6c1d63SDavid Howells __field_struct(struct afs_fid, fid ) 6276c6c1d63SDavid Howells ), 6286c6c1d63SDavid Howells 6296c6c1d63SDavid Howells TP_fast_assign( 6306c6c1d63SDavid Howells __entry->call = call->debug_id; 6316c6c1d63SDavid Howells __entry->i = i; 6326c6c1d63SDavid Howells __entry->op = call->operation_ID; 6336c6c1d63SDavid Howells if (fid) { 6346c6c1d63SDavid Howells __entry->fid = *fid; 6356c6c1d63SDavid Howells } else { 6366c6c1d63SDavid Howells __entry->fid.vid = 0; 6376c6c1d63SDavid Howells __entry->fid.vnode = 0; 6386c6c1d63SDavid Howells __entry->fid.unique = 0; 6396c6c1d63SDavid Howells } 6406c6c1d63SDavid Howells ), 6416c6c1d63SDavid Howells 6426c6c1d63SDavid Howells TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u", 6436c6c1d63SDavid Howells __entry->call, 6446c6c1d63SDavid Howells __entry->fid.vid, 6456c6c1d63SDavid Howells __entry->fid.vnode, 6466c6c1d63SDavid Howells __entry->fid.unique, 6476c6c1d63SDavid Howells __print_symbolic(__entry->op, afs_fs_operations), 6486c6c1d63SDavid Howells __entry->i) 6496c6c1d63SDavid Howells ); 6506c6c1d63SDavid Howells 65180548b03SDavid Howells TRACE_EVENT(afs_make_fs_call1, 65280548b03SDavid Howells TP_PROTO(struct afs_call *call, const struct afs_fid *fid, 653e49c7b2fSDavid Howells const struct qstr *name), 65480548b03SDavid Howells 65580548b03SDavid Howells TP_ARGS(call, fid, name), 65680548b03SDavid Howells 65780548b03SDavid Howells TP_STRUCT__entry( 65880548b03SDavid Howells __field(unsigned int, call ) 65980548b03SDavid Howells __field(enum afs_fs_operation, op ) 66080548b03SDavid Howells __field_struct(struct afs_fid, fid ) 66180548b03SDavid Howells __array(char, name, 24 ) 66280548b03SDavid Howells ), 66380548b03SDavid Howells 66480548b03SDavid Howells TP_fast_assign( 665e49c7b2fSDavid Howells unsigned int __len = min_t(unsigned int, name->len, 23); 66680548b03SDavid Howells __entry->call = call->debug_id; 66780548b03SDavid Howells __entry->op = call->operation_ID; 66880548b03SDavid Howells if (fid) { 66980548b03SDavid Howells __entry->fid = *fid; 67080548b03SDavid Howells } else { 67180548b03SDavid Howells __entry->fid.vid = 0; 67280548b03SDavid Howells __entry->fid.vnode = 0; 67380548b03SDavid Howells __entry->fid.unique = 0; 67480548b03SDavid Howells } 675e49c7b2fSDavid Howells memcpy(__entry->name, name->name, __len); 67680548b03SDavid Howells __entry->name[__len] = 0; 67780548b03SDavid Howells ), 67880548b03SDavid Howells 67980548b03SDavid Howells TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"", 68080548b03SDavid Howells __entry->call, 68180548b03SDavid Howells __entry->fid.vid, 68280548b03SDavid Howells __entry->fid.vnode, 68380548b03SDavid Howells __entry->fid.unique, 68480548b03SDavid Howells __print_symbolic(__entry->op, afs_fs_operations), 68580548b03SDavid Howells __entry->name) 68680548b03SDavid Howells ); 68780548b03SDavid Howells 68880548b03SDavid Howells TRACE_EVENT(afs_make_fs_call2, 68980548b03SDavid Howells TP_PROTO(struct afs_call *call, const struct afs_fid *fid, 690e49c7b2fSDavid Howells const struct qstr *name, const struct qstr *name2), 69180548b03SDavid Howells 69280548b03SDavid Howells TP_ARGS(call, fid, name, name2), 69380548b03SDavid Howells 69480548b03SDavid Howells TP_STRUCT__entry( 69580548b03SDavid Howells __field(unsigned int, call ) 69680548b03SDavid Howells __field(enum afs_fs_operation, op ) 69780548b03SDavid Howells __field_struct(struct afs_fid, fid ) 69880548b03SDavid Howells __array(char, name, 24 ) 69980548b03SDavid Howells __array(char, name2, 24 ) 70080548b03SDavid Howells ), 70180548b03SDavid Howells 70280548b03SDavid Howells TP_fast_assign( 703e49c7b2fSDavid Howells unsigned int __len = min_t(unsigned int, name->len, 23); 704e49c7b2fSDavid Howells unsigned int __len2 = min_t(unsigned int, name2->len, 23); 70580548b03SDavid Howells __entry->call = call->debug_id; 70680548b03SDavid Howells __entry->op = call->operation_ID; 70780548b03SDavid Howells if (fid) { 70880548b03SDavid Howells __entry->fid = *fid; 70980548b03SDavid Howells } else { 71080548b03SDavid Howells __entry->fid.vid = 0; 71180548b03SDavid Howells __entry->fid.vnode = 0; 71280548b03SDavid Howells __entry->fid.unique = 0; 71380548b03SDavid Howells } 714e49c7b2fSDavid Howells memcpy(__entry->name, name->name, __len); 71580548b03SDavid Howells __entry->name[__len] = 0; 716e49c7b2fSDavid Howells memcpy(__entry->name2, name2->name, __len2); 71780548b03SDavid Howells __entry->name2[__len2] = 0; 71880548b03SDavid Howells ), 71980548b03SDavid Howells 72080548b03SDavid Howells TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"", 72180548b03SDavid Howells __entry->call, 72280548b03SDavid Howells __entry->fid.vid, 72380548b03SDavid Howells __entry->fid.vnode, 72480548b03SDavid Howells __entry->fid.unique, 72580548b03SDavid Howells __print_symbolic(__entry->op, afs_fs_operations), 72680548b03SDavid Howells __entry->name, 72780548b03SDavid Howells __entry->name2) 72880548b03SDavid Howells ); 72980548b03SDavid Howells 730025db80cSDavid Howells TRACE_EVENT(afs_make_vl_call, 731025db80cSDavid Howells TP_PROTO(struct afs_call *call), 732025db80cSDavid Howells 733025db80cSDavid Howells TP_ARGS(call), 734025db80cSDavid Howells 735025db80cSDavid Howells TP_STRUCT__entry( 736a25e21f0SDavid Howells __field(unsigned int, call ) 737025db80cSDavid Howells __field(enum afs_vl_operation, op ) 738025db80cSDavid Howells ), 739025db80cSDavid Howells 740025db80cSDavid Howells TP_fast_assign( 741a25e21f0SDavid Howells __entry->call = call->debug_id; 742025db80cSDavid Howells __entry->op = call->operation_ID; 743025db80cSDavid Howells ), 744025db80cSDavid Howells 745a25e21f0SDavid Howells TP_printk("c=%08x %s", 746025db80cSDavid Howells __entry->call, 747025db80cSDavid Howells __print_symbolic(__entry->op, afs_vl_operations)) 748025db80cSDavid Howells ); 749025db80cSDavid Howells 750025db80cSDavid Howells TRACE_EVENT(afs_call_done, 751025db80cSDavid Howells TP_PROTO(struct afs_call *call), 752025db80cSDavid Howells 753025db80cSDavid Howells TP_ARGS(call), 754025db80cSDavid Howells 755025db80cSDavid Howells TP_STRUCT__entry( 756a25e21f0SDavid Howells __field(unsigned int, call ) 757025db80cSDavid Howells __field(struct rxrpc_call *, rx_call ) 758025db80cSDavid Howells __field(int, ret ) 759025db80cSDavid Howells __field(u32, abort_code ) 760025db80cSDavid Howells ), 761025db80cSDavid Howells 762025db80cSDavid Howells TP_fast_assign( 763a25e21f0SDavid Howells __entry->call = call->debug_id; 764025db80cSDavid Howells __entry->rx_call = call->rxcall; 765025db80cSDavid Howells __entry->ret = call->error; 766025db80cSDavid Howells __entry->abort_code = call->abort_code; 767025db80cSDavid Howells ), 768025db80cSDavid Howells 769a25e21f0SDavid Howells TP_printk(" c=%08x ret=%d ab=%d [%p]", 770025db80cSDavid Howells __entry->call, 771025db80cSDavid Howells __entry->ret, 772025db80cSDavid Howells __entry->abort_code, 773025db80cSDavid Howells __entry->rx_call) 774025db80cSDavid Howells ); 775025db80cSDavid Howells 776bd80d8a8SDavid Howells TRACE_EVENT(afs_send_data, 777bd80d8a8SDavid Howells TP_PROTO(struct afs_call *call, struct msghdr *msg), 7782c099014SDavid Howells 779bd80d8a8SDavid Howells TP_ARGS(call, msg), 7802c099014SDavid Howells 7812c099014SDavid Howells TP_STRUCT__entry( 782a25e21f0SDavid Howells __field(unsigned int, call ) 7832c099014SDavid Howells __field(unsigned int, flags ) 784bd80d8a8SDavid Howells __field(loff_t, offset ) 785bd80d8a8SDavid Howells __field(loff_t, count ) 7862c099014SDavid Howells ), 7872c099014SDavid Howells 7882c099014SDavid Howells TP_fast_assign( 789a25e21f0SDavid Howells __entry->call = call->debug_id; 7902c099014SDavid Howells __entry->flags = msg->msg_flags; 791bd80d8a8SDavid Howells __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset; 792bd80d8a8SDavid Howells __entry->count = iov_iter_count(&msg->msg_iter); 7932c099014SDavid Howells ), 7942c099014SDavid Howells 795bd80d8a8SDavid Howells TP_printk(" c=%08x o=%llx n=%llx f=%x", 796bd80d8a8SDavid Howells __entry->call, __entry->offset, __entry->count, 7972c099014SDavid Howells __entry->flags) 7982c099014SDavid Howells ); 7992c099014SDavid Howells 800bd80d8a8SDavid Howells TRACE_EVENT(afs_sent_data, 801bd80d8a8SDavid Howells TP_PROTO(struct afs_call *call, struct msghdr *msg, int ret), 8022c099014SDavid Howells 803bd80d8a8SDavid Howells TP_ARGS(call, msg, ret), 8042c099014SDavid Howells 8052c099014SDavid Howells TP_STRUCT__entry( 806a25e21f0SDavid Howells __field(unsigned int, call ) 8072c099014SDavid Howells __field(int, ret ) 808bd80d8a8SDavid Howells __field(loff_t, offset ) 809bd80d8a8SDavid Howells __field(loff_t, count ) 8102c099014SDavid Howells ), 8112c099014SDavid Howells 8122c099014SDavid Howells TP_fast_assign( 813a25e21f0SDavid Howells __entry->call = call->debug_id; 8142c099014SDavid Howells __entry->ret = ret; 815bd80d8a8SDavid Howells __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset; 816bd80d8a8SDavid Howells __entry->count = iov_iter_count(&msg->msg_iter); 8172c099014SDavid Howells ), 8182c099014SDavid Howells 819bd80d8a8SDavid Howells TP_printk(" c=%08x o=%llx n=%llx r=%x", 820bd80d8a8SDavid Howells __entry->call, __entry->offset, __entry->count, 821bd80d8a8SDavid Howells __entry->ret) 8222c099014SDavid Howells ); 8232c099014SDavid Howells 824dab17c1aSDavid Howells TRACE_EVENT(afs_dir_check_failed, 825dab17c1aSDavid Howells TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size), 826dab17c1aSDavid Howells 827dab17c1aSDavid Howells TP_ARGS(vnode, off, i_size), 828dab17c1aSDavid Howells 829dab17c1aSDavid Howells TP_STRUCT__entry( 830dab17c1aSDavid Howells __field(struct afs_vnode *, vnode ) 831dab17c1aSDavid Howells __field(loff_t, off ) 832dab17c1aSDavid Howells __field(loff_t, i_size ) 833dab17c1aSDavid Howells ), 834dab17c1aSDavid Howells 835dab17c1aSDavid Howells TP_fast_assign( 836dab17c1aSDavid Howells __entry->vnode = vnode; 837dab17c1aSDavid Howells __entry->off = off; 838dab17c1aSDavid Howells __entry->i_size = i_size; 839dab17c1aSDavid Howells ), 840dab17c1aSDavid Howells 841dab17c1aSDavid Howells TP_printk("vn=%p %llx/%llx", 842dab17c1aSDavid Howells __entry->vnode, __entry->off, __entry->i_size) 843dab17c1aSDavid Howells ); 844dab17c1aSDavid Howells 84578525c74SDavid Howells TRACE_EVENT(afs_folio_dirty, 84678525c74SDavid Howells TP_PROTO(struct afs_vnode *vnode, const char *where, struct folio *folio), 84713524ab3SDavid Howells 84878525c74SDavid Howells TP_ARGS(vnode, where, folio), 84913524ab3SDavid Howells 85013524ab3SDavid Howells TP_STRUCT__entry( 85113524ab3SDavid Howells __field(struct afs_vnode *, vnode ) 85213524ab3SDavid Howells __field(const char *, where ) 85378525c74SDavid Howells __field(pgoff_t, index ) 85467d78a6fSDavid Howells __field(unsigned long, from ) 85567d78a6fSDavid Howells __field(unsigned long, to ) 85613524ab3SDavid Howells ), 85713524ab3SDavid Howells 85813524ab3SDavid Howells TP_fast_assign( 85978525c74SDavid Howells unsigned long priv = (unsigned long)folio_get_private(folio); 86013524ab3SDavid Howells __entry->vnode = vnode; 86113524ab3SDavid Howells __entry->where = where; 86278525c74SDavid Howells __entry->index = folio_index(folio); 86378525c74SDavid Howells __entry->from = afs_folio_dirty_from(folio, priv); 86478525c74SDavid Howells __entry->to = afs_folio_dirty_to(folio, priv); 86578525c74SDavid Howells __entry->to |= (afs_is_folio_dirty_mmapped(priv) ? 86667d78a6fSDavid Howells (1UL << (BITS_PER_LONG - 1)) : 0); 86713524ab3SDavid Howells ), 86813524ab3SDavid Howells 86967d78a6fSDavid Howells TP_printk("vn=%p %lx %s %lx-%lx%s", 87078525c74SDavid Howells __entry->vnode, __entry->index, __entry->where, 87167d78a6fSDavid Howells __entry->from, 87267d78a6fSDavid Howells __entry->to & ~(1UL << (BITS_PER_LONG - 1)), 87367d78a6fSDavid Howells __entry->to & (1UL << (BITS_PER_LONG - 1)) ? " M" : "") 87413524ab3SDavid Howells ); 87513524ab3SDavid Howells 87698bf40cdSDavid Howells TRACE_EVENT(afs_call_state, 87798bf40cdSDavid Howells TP_PROTO(struct afs_call *call, 87898bf40cdSDavid Howells enum afs_call_state from, 87998bf40cdSDavid Howells enum afs_call_state to, 88098bf40cdSDavid Howells int ret, u32 remote_abort), 88198bf40cdSDavid Howells 88298bf40cdSDavid Howells TP_ARGS(call, from, to, ret, remote_abort), 88398bf40cdSDavid Howells 88498bf40cdSDavid Howells TP_STRUCT__entry( 885a25e21f0SDavid Howells __field(unsigned int, call ) 88698bf40cdSDavid Howells __field(enum afs_call_state, from ) 88798bf40cdSDavid Howells __field(enum afs_call_state, to ) 88898bf40cdSDavid Howells __field(int, ret ) 88998bf40cdSDavid Howells __field(u32, abort ) 89098bf40cdSDavid Howells ), 89198bf40cdSDavid Howells 89298bf40cdSDavid Howells TP_fast_assign( 893a25e21f0SDavid Howells __entry->call = call->debug_id; 89498bf40cdSDavid Howells __entry->from = from; 89598bf40cdSDavid Howells __entry->to = to; 89698bf40cdSDavid Howells __entry->ret = ret; 89798bf40cdSDavid Howells __entry->abort = remote_abort; 89898bf40cdSDavid Howells ), 89998bf40cdSDavid Howells 900a25e21f0SDavid Howells TP_printk("c=%08x %u->%u r=%d ab=%d", 90198bf40cdSDavid Howells __entry->call, 90298bf40cdSDavid Howells __entry->from, __entry->to, 90398bf40cdSDavid Howells __entry->ret, __entry->abort) 90498bf40cdSDavid Howells ); 90598bf40cdSDavid Howells 90680548b03SDavid Howells TRACE_EVENT(afs_lookup, 90780548b03SDavid Howells TP_PROTO(struct afs_vnode *dvnode, const struct qstr *name, 90840a708bdSDavid Howells struct afs_fid *fid), 90980548b03SDavid Howells 91040a708bdSDavid Howells TP_ARGS(dvnode, name, fid), 91180548b03SDavid Howells 91280548b03SDavid Howells TP_STRUCT__entry( 91380548b03SDavid Howells __field_struct(struct afs_fid, dfid ) 91480548b03SDavid Howells __field_struct(struct afs_fid, fid ) 91580548b03SDavid Howells __array(char, name, 24 ) 91680548b03SDavid Howells ), 91780548b03SDavid Howells 91880548b03SDavid Howells TP_fast_assign( 91980548b03SDavid Howells int __len = min_t(int, name->len, 23); 92080548b03SDavid Howells __entry->dfid = dvnode->fid; 92140a708bdSDavid Howells __entry->fid = *fid; 92280548b03SDavid Howells memcpy(__entry->name, name->name, __len); 92380548b03SDavid Howells __entry->name[__len] = 0; 92480548b03SDavid Howells ), 92580548b03SDavid Howells 92680548b03SDavid Howells TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x", 92780548b03SDavid Howells __entry->dfid.vid, __entry->dfid.vnode, __entry->dfid.unique, 92880548b03SDavid Howells __entry->name, 92980548b03SDavid Howells __entry->fid.vnode, __entry->fid.unique) 93080548b03SDavid Howells ); 93180548b03SDavid Howells 93263a4681fSDavid Howells TRACE_EVENT(afs_edit_dir, 93363a4681fSDavid Howells TP_PROTO(struct afs_vnode *dvnode, 93463a4681fSDavid Howells enum afs_edit_dir_reason why, 93563a4681fSDavid Howells enum afs_edit_dir_op op, 93663a4681fSDavid Howells unsigned int block, 93763a4681fSDavid Howells unsigned int slot, 93863a4681fSDavid Howells unsigned int f_vnode, 93963a4681fSDavid Howells unsigned int f_unique, 94063a4681fSDavid Howells const char *name), 94163a4681fSDavid Howells 94263a4681fSDavid Howells TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name), 94363a4681fSDavid Howells 94463a4681fSDavid Howells TP_STRUCT__entry( 94563a4681fSDavid Howells __field(unsigned int, vnode ) 94663a4681fSDavid Howells __field(unsigned int, unique ) 94763a4681fSDavid Howells __field(enum afs_edit_dir_reason, why ) 94863a4681fSDavid Howells __field(enum afs_edit_dir_op, op ) 94963a4681fSDavid Howells __field(unsigned int, block ) 95063a4681fSDavid Howells __field(unsigned short, slot ) 95163a4681fSDavid Howells __field(unsigned int, f_vnode ) 95263a4681fSDavid Howells __field(unsigned int, f_unique ) 95380548b03SDavid Howells __array(char, name, 24 ) 95463a4681fSDavid Howells ), 95563a4681fSDavid Howells 95663a4681fSDavid Howells TP_fast_assign( 95763a4681fSDavid Howells int __len = strlen(name); 95880548b03SDavid Howells __len = min(__len, 23); 95963a4681fSDavid Howells __entry->vnode = dvnode->fid.vnode; 96063a4681fSDavid Howells __entry->unique = dvnode->fid.unique; 96163a4681fSDavid Howells __entry->why = why; 96263a4681fSDavid Howells __entry->op = op; 96363a4681fSDavid Howells __entry->block = block; 96463a4681fSDavid Howells __entry->slot = slot; 96563a4681fSDavid Howells __entry->f_vnode = f_vnode; 96663a4681fSDavid Howells __entry->f_unique = f_unique; 96763a4681fSDavid Howells memcpy(__entry->name, name, __len); 96863a4681fSDavid Howells __entry->name[__len] = 0; 96963a4681fSDavid Howells ), 97063a4681fSDavid Howells 97180548b03SDavid Howells TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"", 97263a4681fSDavid Howells __entry->vnode, __entry->unique, 97363a4681fSDavid Howells __print_symbolic(__entry->why, afs_edit_dir_reasons), 97463a4681fSDavid Howells __print_symbolic(__entry->op, afs_edit_dir_ops), 97563a4681fSDavid Howells __entry->block, __entry->slot, 97663a4681fSDavid Howells __entry->f_vnode, __entry->f_unique, 97763a4681fSDavid Howells __entry->name) 97863a4681fSDavid Howells ); 97963a4681fSDavid Howells 9805f702c8eSDavid Howells TRACE_EVENT(afs_protocol_error, 9817126ead9SDavid Howells TP_PROTO(struct afs_call *call, enum afs_eproto_cause cause), 9825f702c8eSDavid Howells 9837126ead9SDavid Howells TP_ARGS(call, cause), 9845f702c8eSDavid Howells 9855f702c8eSDavid Howells TP_STRUCT__entry( 9865f702c8eSDavid Howells __field(unsigned int, call ) 987160cb957SDavid Howells __field(enum afs_eproto_cause, cause ) 9885f702c8eSDavid Howells ), 9895f702c8eSDavid Howells 9905f702c8eSDavid Howells TP_fast_assign( 9915f702c8eSDavid Howells __entry->call = call ? call->debug_id : 0; 992160cb957SDavid Howells __entry->cause = cause; 9935f702c8eSDavid Howells ), 9945f702c8eSDavid Howells 9957126ead9SDavid Howells TP_printk("c=%08x %s", 9967126ead9SDavid Howells __entry->call, 997160cb957SDavid Howells __print_symbolic(__entry->cause, afs_eproto_causes)) 9985f702c8eSDavid Howells ); 9995f702c8eSDavid Howells 1000f51375cdSDavid Howells TRACE_EVENT(afs_io_error, 1001f51375cdSDavid Howells TP_PROTO(unsigned int call, int error, enum afs_io_error where), 1002f51375cdSDavid Howells 1003f51375cdSDavid Howells TP_ARGS(call, error, where), 1004f51375cdSDavid Howells 1005f51375cdSDavid Howells TP_STRUCT__entry( 1006f51375cdSDavid Howells __field(unsigned int, call ) 1007f51375cdSDavid Howells __field(int, error ) 1008f51375cdSDavid Howells __field(enum afs_io_error, where ) 1009f51375cdSDavid Howells ), 1010f51375cdSDavid Howells 1011f51375cdSDavid Howells TP_fast_assign( 1012f51375cdSDavid Howells __entry->call = call; 1013f51375cdSDavid Howells __entry->error = error; 1014f51375cdSDavid Howells __entry->where = where; 1015f51375cdSDavid Howells ), 1016f51375cdSDavid Howells 1017f51375cdSDavid Howells TP_printk("c=%08x r=%d %s", 1018f51375cdSDavid Howells __entry->call, __entry->error, 1019f51375cdSDavid Howells __print_symbolic(__entry->where, afs_io_errors)) 1020f51375cdSDavid Howells ); 1021f51375cdSDavid Howells 1022f51375cdSDavid Howells TRACE_EVENT(afs_file_error, 1023f51375cdSDavid Howells TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where), 1024f51375cdSDavid Howells 1025f51375cdSDavid Howells TP_ARGS(vnode, error, where), 1026f51375cdSDavid Howells 1027f51375cdSDavid Howells TP_STRUCT__entry( 1028f51375cdSDavid Howells __field_struct(struct afs_fid, fid ) 1029f51375cdSDavid Howells __field(int, error ) 1030f51375cdSDavid Howells __field(enum afs_file_error, where ) 1031f51375cdSDavid Howells ), 1032f51375cdSDavid Howells 1033f51375cdSDavid Howells TP_fast_assign( 1034f51375cdSDavid Howells __entry->fid = vnode->fid; 1035f51375cdSDavid Howells __entry->error = error; 1036f51375cdSDavid Howells __entry->where = where; 1037f51375cdSDavid Howells ), 1038f51375cdSDavid Howells 10393b6492dfSDavid Howells TP_printk("%llx:%llx:%x r=%d %s", 1040f51375cdSDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 1041f51375cdSDavid Howells __entry->error, 1042f51375cdSDavid Howells __print_symbolic(__entry->where, afs_file_errors)) 1043f51375cdSDavid Howells ); 1044f51375cdSDavid Howells 10453709a399SDavid Howells TRACE_EVENT(afs_cm_no_server, 10463709a399SDavid Howells TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx), 10473709a399SDavid Howells 10483709a399SDavid Howells TP_ARGS(call, srx), 10493709a399SDavid Howells 10503709a399SDavid Howells TP_STRUCT__entry( 10513709a399SDavid Howells __field(unsigned int, call ) 10523709a399SDavid Howells __field(unsigned int, op_id ) 10533709a399SDavid Howells __field_struct(struct sockaddr_rxrpc, srx ) 10543709a399SDavid Howells ), 10553709a399SDavid Howells 10563709a399SDavid Howells TP_fast_assign( 10573709a399SDavid Howells __entry->call = call->debug_id; 10583709a399SDavid Howells __entry->op_id = call->operation_ID; 10593709a399SDavid Howells memcpy(&__entry->srx, srx, sizeof(__entry->srx)); 10603709a399SDavid Howells ), 10613709a399SDavid Howells 10623709a399SDavid Howells TP_printk("c=%08x op=%u %pISpc", 10633709a399SDavid Howells __entry->call, __entry->op_id, &__entry->srx.transport) 10643709a399SDavid Howells ); 10653709a399SDavid Howells 10663709a399SDavid Howells TRACE_EVENT(afs_cm_no_server_u, 10673709a399SDavid Howells TP_PROTO(struct afs_call *call, const uuid_t *uuid), 10683709a399SDavid Howells 10693709a399SDavid Howells TP_ARGS(call, uuid), 10703709a399SDavid Howells 10713709a399SDavid Howells TP_STRUCT__entry( 10723709a399SDavid Howells __field(unsigned int, call ) 10733709a399SDavid Howells __field(unsigned int, op_id ) 10743709a399SDavid Howells __field_struct(uuid_t, uuid ) 10753709a399SDavid Howells ), 10763709a399SDavid Howells 10773709a399SDavid Howells TP_fast_assign( 10783709a399SDavid Howells __entry->call = call->debug_id; 10793709a399SDavid Howells __entry->op_id = call->operation_ID; 10803709a399SDavid Howells memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid)); 10813709a399SDavid Howells ), 10823709a399SDavid Howells 10833709a399SDavid Howells TP_printk("c=%08x op=%u %pU", 10843709a399SDavid Howells __entry->call, __entry->op_id, &__entry->uuid) 10853709a399SDavid Howells ); 10863709a399SDavid Howells 1087d4696601SDavid Howells TRACE_EVENT(afs_flock_ev, 1088d4696601SDavid Howells TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl, 1089d4696601SDavid Howells enum afs_flock_event event, int error), 1090d4696601SDavid Howells 1091d4696601SDavid Howells TP_ARGS(vnode, fl, event, error), 1092d4696601SDavid Howells 1093d4696601SDavid Howells TP_STRUCT__entry( 1094d4696601SDavid Howells __field_struct(struct afs_fid, fid ) 1095d4696601SDavid Howells __field(enum afs_flock_event, event ) 1096d4696601SDavid Howells __field(enum afs_lock_state, state ) 1097d4696601SDavid Howells __field(int, error ) 1098d4696601SDavid Howells __field(unsigned int, debug_id ) 1099d4696601SDavid Howells ), 1100d4696601SDavid Howells 1101d4696601SDavid Howells TP_fast_assign( 1102d4696601SDavid Howells __entry->fid = vnode->fid; 1103d4696601SDavid Howells __entry->event = event; 1104d4696601SDavid Howells __entry->state = vnode->lock_state; 1105d4696601SDavid Howells __entry->error = error; 1106d4696601SDavid Howells __entry->debug_id = fl ? fl->fl_u.afs.debug_id : 0; 1107d4696601SDavid Howells ), 1108d4696601SDavid Howells 1109d4696601SDavid Howells TP_printk("%llx:%llx:%x %04x %s s=%s e=%d", 1110d4696601SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 1111d4696601SDavid Howells __entry->debug_id, 1112d4696601SDavid Howells __print_symbolic(__entry->event, afs_flock_events), 1113d4696601SDavid Howells __print_symbolic(__entry->state, afs_flock_states), 1114d4696601SDavid Howells __entry->error) 1115d4696601SDavid Howells ); 1116d4696601SDavid Howells 1117d4696601SDavid Howells TRACE_EVENT(afs_flock_op, 1118d4696601SDavid Howells TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl, 1119d4696601SDavid Howells enum afs_flock_operation op), 1120d4696601SDavid Howells 1121d4696601SDavid Howells TP_ARGS(vnode, fl, op), 1122d4696601SDavid Howells 1123d4696601SDavid Howells TP_STRUCT__entry( 1124d4696601SDavid Howells __field_struct(struct afs_fid, fid ) 1125d4696601SDavid Howells __field(loff_t, from ) 1126d4696601SDavid Howells __field(loff_t, len ) 1127d4696601SDavid Howells __field(enum afs_flock_operation, op ) 1128d4696601SDavid Howells __field(unsigned char, type ) 1129d4696601SDavid Howells __field(unsigned int, flags ) 1130d4696601SDavid Howells __field(unsigned int, debug_id ) 1131d4696601SDavid Howells ), 1132d4696601SDavid Howells 1133d4696601SDavid Howells TP_fast_assign( 1134d4696601SDavid Howells __entry->fid = vnode->fid; 1135d4696601SDavid Howells __entry->from = fl->fl_start; 1136d4696601SDavid Howells __entry->len = fl->fl_end - fl->fl_start + 1; 1137d4696601SDavid Howells __entry->op = op; 1138d4696601SDavid Howells __entry->type = fl->fl_type; 1139d4696601SDavid Howells __entry->flags = fl->fl_flags; 1140d4696601SDavid Howells __entry->debug_id = fl->fl_u.afs.debug_id; 1141d4696601SDavid Howells ), 1142d4696601SDavid Howells 1143d4696601SDavid Howells TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x", 1144d4696601SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 1145d4696601SDavid Howells __entry->debug_id, 1146d4696601SDavid Howells __print_symbolic(__entry->op, afs_flock_operations), 1147d4696601SDavid Howells __print_symbolic(__entry->type, afs_flock_types), 1148d4696601SDavid Howells __entry->from, __entry->len, __entry->flags) 1149d4696601SDavid Howells ); 1150d4696601SDavid Howells 115199987c56SDavid Howells TRACE_EVENT(afs_reload_dir, 115299987c56SDavid Howells TP_PROTO(struct afs_vnode *vnode), 115399987c56SDavid Howells 115499987c56SDavid Howells TP_ARGS(vnode), 115599987c56SDavid Howells 115699987c56SDavid Howells TP_STRUCT__entry( 115799987c56SDavid Howells __field_struct(struct afs_fid, fid ) 115899987c56SDavid Howells ), 115999987c56SDavid Howells 116099987c56SDavid Howells TP_fast_assign( 116199987c56SDavid Howells __entry->fid = vnode->fid; 116299987c56SDavid Howells ), 116399987c56SDavid Howells 116499987c56SDavid Howells TP_printk("%llx:%llx:%x", 116599987c56SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique) 116699987c56SDavid Howells ); 116799987c56SDavid Howells 116879ddbfa5SDavid Howells TRACE_EVENT(afs_silly_rename, 116979ddbfa5SDavid Howells TP_PROTO(struct afs_vnode *vnode, bool done), 117079ddbfa5SDavid Howells 117179ddbfa5SDavid Howells TP_ARGS(vnode, done), 117279ddbfa5SDavid Howells 117379ddbfa5SDavid Howells TP_STRUCT__entry( 117479ddbfa5SDavid Howells __field_struct(struct afs_fid, fid ) 117579ddbfa5SDavid Howells __field(bool, done ) 117679ddbfa5SDavid Howells ), 117779ddbfa5SDavid Howells 117879ddbfa5SDavid Howells TP_fast_assign( 117979ddbfa5SDavid Howells __entry->fid = vnode->fid; 118079ddbfa5SDavid Howells __entry->done = done; 118179ddbfa5SDavid Howells ), 118279ddbfa5SDavid Howells 118379ddbfa5SDavid Howells TP_printk("%llx:%llx:%x done=%u", 118479ddbfa5SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 118579ddbfa5SDavid Howells __entry->done) 118679ddbfa5SDavid Howells ); 118779ddbfa5SDavid Howells 118880548b03SDavid Howells TRACE_EVENT(afs_get_tree, 118980548b03SDavid Howells TP_PROTO(struct afs_cell *cell, struct afs_volume *volume), 119080548b03SDavid Howells 119180548b03SDavid Howells TP_ARGS(cell, volume), 119280548b03SDavid Howells 119380548b03SDavid Howells TP_STRUCT__entry( 119480548b03SDavid Howells __field(u64, vid ) 119580548b03SDavid Howells __array(char, cell, 24 ) 119680548b03SDavid Howells __array(char, volume, 24 ) 119780548b03SDavid Howells ), 119880548b03SDavid Howells 119980548b03SDavid Howells TP_fast_assign( 120080548b03SDavid Howells int __len; 120180548b03SDavid Howells __entry->vid = volume->vid; 120280548b03SDavid Howells __len = min_t(int, cell->name_len, 23); 120380548b03SDavid Howells memcpy(__entry->cell, cell->name, __len); 120480548b03SDavid Howells __entry->cell[__len] = 0; 120580548b03SDavid Howells __len = min_t(int, volume->name_len, 23); 120680548b03SDavid Howells memcpy(__entry->volume, volume->name, __len); 120780548b03SDavid Howells __entry->volume[__len] = 0; 120880548b03SDavid Howells ), 120980548b03SDavid Howells 121080548b03SDavid Howells TP_printk("--- MOUNT %s:%s %llx", 121180548b03SDavid Howells __entry->cell, __entry->volume, __entry->vid) 121280548b03SDavid Howells ); 121380548b03SDavid Howells 1214051d2525SDavid Howells TRACE_EVENT(afs_cb_break, 1215051d2525SDavid Howells TP_PROTO(struct afs_fid *fid, unsigned int cb_break, 1216051d2525SDavid Howells enum afs_cb_break_reason reason, bool skipped), 1217051d2525SDavid Howells 1218051d2525SDavid Howells TP_ARGS(fid, cb_break, reason, skipped), 1219051d2525SDavid Howells 1220051d2525SDavid Howells TP_STRUCT__entry( 1221051d2525SDavid Howells __field_struct(struct afs_fid, fid ) 1222051d2525SDavid Howells __field(unsigned int, cb_break ) 1223051d2525SDavid Howells __field(enum afs_cb_break_reason, reason ) 1224051d2525SDavid Howells __field(bool, skipped ) 1225051d2525SDavid Howells ), 1226051d2525SDavid Howells 1227051d2525SDavid Howells TP_fast_assign( 1228051d2525SDavid Howells __entry->fid = *fid; 1229051d2525SDavid Howells __entry->cb_break = cb_break; 1230051d2525SDavid Howells __entry->reason = reason; 1231051d2525SDavid Howells __entry->skipped = skipped; 1232051d2525SDavid Howells ), 1233051d2525SDavid Howells 1234051d2525SDavid Howells TP_printk("%llx:%llx:%x b=%x s=%u %s", 1235051d2525SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 1236051d2525SDavid Howells __entry->cb_break, 1237051d2525SDavid Howells __entry->skipped, 1238051d2525SDavid Howells __print_symbolic(__entry->reason, afs_cb_break_reasons)) 1239051d2525SDavid Howells ); 1240051d2525SDavid Howells 1241051d2525SDavid Howells TRACE_EVENT(afs_cb_miss, 1242051d2525SDavid Howells TP_PROTO(struct afs_fid *fid, enum afs_cb_break_reason reason), 1243051d2525SDavid Howells 1244051d2525SDavid Howells TP_ARGS(fid, reason), 1245051d2525SDavid Howells 1246051d2525SDavid Howells TP_STRUCT__entry( 1247051d2525SDavid Howells __field_struct(struct afs_fid, fid ) 1248051d2525SDavid Howells __field(enum afs_cb_break_reason, reason ) 1249051d2525SDavid Howells ), 1250051d2525SDavid Howells 1251051d2525SDavid Howells TP_fast_assign( 1252051d2525SDavid Howells __entry->fid = *fid; 1253051d2525SDavid Howells __entry->reason = reason; 1254051d2525SDavid Howells ), 1255051d2525SDavid Howells 1256051d2525SDavid Howells TP_printk(" %llx:%llx:%x %s", 1257051d2525SDavid Howells __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, 1258051d2525SDavid Howells __print_symbolic(__entry->reason, afs_cb_break_reasons)) 1259051d2525SDavid Howells ); 1260051d2525SDavid Howells 126145218193SDavid Howells TRACE_EVENT(afs_server, 12622757a4dcSDavid Howells TP_PROTO(unsigned int server_debug_id, int ref, int active, 1263977e5f8eSDavid Howells enum afs_server_trace reason), 126445218193SDavid Howells 12652757a4dcSDavid Howells TP_ARGS(server_debug_id, ref, active, reason), 126645218193SDavid Howells 126745218193SDavid Howells TP_STRUCT__entry( 126845218193SDavid Howells __field(unsigned int, server ) 1269977e5f8eSDavid Howells __field(int, ref ) 1270977e5f8eSDavid Howells __field(int, active ) 127145218193SDavid Howells __field(int, reason ) 127245218193SDavid Howells ), 127345218193SDavid Howells 127445218193SDavid Howells TP_fast_assign( 12752757a4dcSDavid Howells __entry->server = server_debug_id; 1276977e5f8eSDavid Howells __entry->ref = ref; 1277977e5f8eSDavid Howells __entry->active = active; 127845218193SDavid Howells __entry->reason = reason; 127945218193SDavid Howells ), 128045218193SDavid Howells 1281977e5f8eSDavid Howells TP_printk("s=%08x %s u=%d a=%d", 128245218193SDavid Howells __entry->server, 128345218193SDavid Howells __print_symbolic(__entry->reason, afs_server_traces), 1284977e5f8eSDavid Howells __entry->ref, 1285977e5f8eSDavid Howells __entry->active) 128645218193SDavid Howells ); 128745218193SDavid Howells 1288cca37d45SDavid Howells TRACE_EVENT(afs_volume, 1289cca37d45SDavid Howells TP_PROTO(afs_volid_t vid, int ref, enum afs_volume_trace reason), 1290cca37d45SDavid Howells 1291cca37d45SDavid Howells TP_ARGS(vid, ref, reason), 1292cca37d45SDavid Howells 1293cca37d45SDavid Howells TP_STRUCT__entry( 1294cca37d45SDavid Howells __field(afs_volid_t, vid ) 1295cca37d45SDavid Howells __field(int, ref ) 1296cca37d45SDavid Howells __field(enum afs_volume_trace, reason ) 1297cca37d45SDavid Howells ), 1298cca37d45SDavid Howells 1299cca37d45SDavid Howells TP_fast_assign( 1300cca37d45SDavid Howells __entry->vid = vid; 1301cca37d45SDavid Howells __entry->ref = ref; 1302cca37d45SDavid Howells __entry->reason = reason; 1303cca37d45SDavid Howells ), 1304cca37d45SDavid Howells 1305c56f9ec8SDavid Howells TP_printk("V=%llx %s ur=%d", 1306cca37d45SDavid Howells __entry->vid, 1307cca37d45SDavid Howells __print_symbolic(__entry->reason, afs_volume_traces), 1308cca37d45SDavid Howells __entry->ref) 1309cca37d45SDavid Howells ); 1310cca37d45SDavid Howells 1311dca54a7bSDavid Howells TRACE_EVENT(afs_cell, 1312c56f9ec8SDavid Howells TP_PROTO(unsigned int cell_debug_id, int ref, int active, 1313dca54a7bSDavid Howells enum afs_cell_trace reason), 1314dca54a7bSDavid Howells 1315c56f9ec8SDavid Howells TP_ARGS(cell_debug_id, ref, active, reason), 1316dca54a7bSDavid Howells 1317dca54a7bSDavid Howells TP_STRUCT__entry( 1318dca54a7bSDavid Howells __field(unsigned int, cell ) 1319c56f9ec8SDavid Howells __field(int, ref ) 1320dca54a7bSDavid Howells __field(int, active ) 1321dca54a7bSDavid Howells __field(int, reason ) 1322dca54a7bSDavid Howells ), 1323dca54a7bSDavid Howells 1324dca54a7bSDavid Howells TP_fast_assign( 1325dca54a7bSDavid Howells __entry->cell = cell_debug_id; 1326c56f9ec8SDavid Howells __entry->ref = ref; 1327dca54a7bSDavid Howells __entry->active = active; 1328dca54a7bSDavid Howells __entry->reason = reason; 1329dca54a7bSDavid Howells ), 1330dca54a7bSDavid Howells 1331c56f9ec8SDavid Howells TP_printk("L=%08x %s r=%d a=%d", 1332dca54a7bSDavid Howells __entry->cell, 1333dca54a7bSDavid Howells __print_symbolic(__entry->reason, afs_cell_traces), 1334c56f9ec8SDavid Howells __entry->ref, 1335dca54a7bSDavid Howells __entry->active) 1336dca54a7bSDavid Howells ); 1337dca54a7bSDavid Howells 13388e8d7f13SDavid Howells #endif /* _TRACE_AFS_H */ 13398e8d7f13SDavid Howells 13408e8d7f13SDavid Howells /* This part must be outside protection */ 13418e8d7f13SDavid Howells #include <trace/define_trace.h> 1342