nfs4trace.h 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581
  1. /*
  2. * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  3. */
  4. #undef TRACE_SYSTEM
  5. #define TRACE_SYSTEM nfs4
  6. #if !defined(_TRACE_NFS4_H) || defined(TRACE_HEADER_MULTI_READ)
  7. #define _TRACE_NFS4_H
  8. #include <linux/tracepoint.h>
  9. #define show_nfsv4_errors(error) \
  10. __print_symbolic(error, \
  11. { NFS4_OK, "OK" }, \
  12. /* Mapped by nfs4_stat_to_errno() */ \
  13. { -EPERM, "EPERM" }, \
  14. { -ENOENT, "ENOENT" }, \
  15. { -EIO, "EIO" }, \
  16. { -ENXIO, "ENXIO" }, \
  17. { -EACCES, "EACCES" }, \
  18. { -EEXIST, "EEXIST" }, \
  19. { -EXDEV, "EXDEV" }, \
  20. { -ENOTDIR, "ENOTDIR" }, \
  21. { -EISDIR, "EISDIR" }, \
  22. { -EFBIG, "EFBIG" }, \
  23. { -ENOSPC, "ENOSPC" }, \
  24. { -EROFS, "EROFS" }, \
  25. { -EMLINK, "EMLINK" }, \
  26. { -ENAMETOOLONG, "ENAMETOOLONG" }, \
  27. { -ENOTEMPTY, "ENOTEMPTY" }, \
  28. { -EDQUOT, "EDQUOT" }, \
  29. { -ESTALE, "ESTALE" }, \
  30. { -EBADHANDLE, "EBADHANDLE" }, \
  31. { -EBADCOOKIE, "EBADCOOKIE" }, \
  32. { -ENOTSUPP, "ENOTSUPP" }, \
  33. { -ETOOSMALL, "ETOOSMALL" }, \
  34. { -EREMOTEIO, "EREMOTEIO" }, \
  35. { -EBADTYPE, "EBADTYPE" }, \
  36. { -EAGAIN, "EAGAIN" }, \
  37. { -ELOOP, "ELOOP" }, \
  38. { -EOPNOTSUPP, "EOPNOTSUPP" }, \
  39. { -EDEADLK, "EDEADLK" }, \
  40. /* RPC errors */ \
  41. { -ENOMEM, "ENOMEM" }, \
  42. { -EKEYEXPIRED, "EKEYEXPIRED" }, \
  43. { -ETIMEDOUT, "ETIMEDOUT" }, \
  44. { -ERESTARTSYS, "ERESTARTSYS" }, \
  45. { -ECONNREFUSED, "ECONNREFUSED" }, \
  46. { -ECONNRESET, "ECONNRESET" }, \
  47. { -ENETUNREACH, "ENETUNREACH" }, \
  48. { -EHOSTUNREACH, "EHOSTUNREACH" }, \
  49. { -EHOSTDOWN, "EHOSTDOWN" }, \
  50. { -EPIPE, "EPIPE" }, \
  51. { -EPFNOSUPPORT, "EPFNOSUPPORT" }, \
  52. { -EPROTONOSUPPORT, "EPROTONOSUPPORT" }, \
  53. /* NFSv4 native errors */ \
  54. { -NFS4ERR_ACCESS, "ACCESS" }, \
  55. { -NFS4ERR_ATTRNOTSUPP, "ATTRNOTSUPP" }, \
  56. { -NFS4ERR_ADMIN_REVOKED, "ADMIN_REVOKED" }, \
  57. { -NFS4ERR_BACK_CHAN_BUSY, "BACK_CHAN_BUSY" }, \
  58. { -NFS4ERR_BADCHAR, "BADCHAR" }, \
  59. { -NFS4ERR_BADHANDLE, "BADHANDLE" }, \
  60. { -NFS4ERR_BADIOMODE, "BADIOMODE" }, \
  61. { -NFS4ERR_BADLAYOUT, "BADLAYOUT" }, \
  62. { -NFS4ERR_BADLABEL, "BADLABEL" }, \
  63. { -NFS4ERR_BADNAME, "BADNAME" }, \
  64. { -NFS4ERR_BADOWNER, "BADOWNER" }, \
  65. { -NFS4ERR_BADSESSION, "BADSESSION" }, \
  66. { -NFS4ERR_BADSLOT, "BADSLOT" }, \
  67. { -NFS4ERR_BADTYPE, "BADTYPE" }, \
  68. { -NFS4ERR_BADXDR, "BADXDR" }, \
  69. { -NFS4ERR_BAD_COOKIE, "BAD_COOKIE" }, \
  70. { -NFS4ERR_BAD_HIGH_SLOT, "BAD_HIGH_SLOT" }, \
  71. { -NFS4ERR_BAD_RANGE, "BAD_RANGE" }, \
  72. { -NFS4ERR_BAD_SEQID, "BAD_SEQID" }, \
  73. { -NFS4ERR_BAD_SESSION_DIGEST, "BAD_SESSION_DIGEST" }, \
  74. { -NFS4ERR_BAD_STATEID, "BAD_STATEID" }, \
  75. { -NFS4ERR_CB_PATH_DOWN, "CB_PATH_DOWN" }, \
  76. { -NFS4ERR_CLID_INUSE, "CLID_INUSE" }, \
  77. { -NFS4ERR_CLIENTID_BUSY, "CLIENTID_BUSY" }, \
  78. { -NFS4ERR_COMPLETE_ALREADY, "COMPLETE_ALREADY" }, \
  79. { -NFS4ERR_CONN_NOT_BOUND_TO_SESSION, \
  80. "CONN_NOT_BOUND_TO_SESSION" }, \
  81. { -NFS4ERR_DEADLOCK, "DEADLOCK" }, \
  82. { -NFS4ERR_DEADSESSION, "DEAD_SESSION" }, \
  83. { -NFS4ERR_DELAY, "DELAY" }, \
  84. { -NFS4ERR_DELEG_ALREADY_WANTED, \
  85. "DELEG_ALREADY_WANTED" }, \
  86. { -NFS4ERR_DELEG_REVOKED, "DELEG_REVOKED" }, \
  87. { -NFS4ERR_DENIED, "DENIED" }, \
  88. { -NFS4ERR_DIRDELEG_UNAVAIL, "DIRDELEG_UNAVAIL" }, \
  89. { -NFS4ERR_DQUOT, "DQUOT" }, \
  90. { -NFS4ERR_ENCR_ALG_UNSUPP, "ENCR_ALG_UNSUPP" }, \
  91. { -NFS4ERR_EXIST, "EXIST" }, \
  92. { -NFS4ERR_EXPIRED, "EXPIRED" }, \
  93. { -NFS4ERR_FBIG, "FBIG" }, \
  94. { -NFS4ERR_FHEXPIRED, "FHEXPIRED" }, \
  95. { -NFS4ERR_FILE_OPEN, "FILE_OPEN" }, \
  96. { -NFS4ERR_GRACE, "GRACE" }, \
  97. { -NFS4ERR_HASH_ALG_UNSUPP, "HASH_ALG_UNSUPP" }, \
  98. { -NFS4ERR_INVAL, "INVAL" }, \
  99. { -NFS4ERR_IO, "IO" }, \
  100. { -NFS4ERR_ISDIR, "ISDIR" }, \
  101. { -NFS4ERR_LAYOUTTRYLATER, "LAYOUTTRYLATER" }, \
  102. { -NFS4ERR_LAYOUTUNAVAILABLE, "LAYOUTUNAVAILABLE" }, \
  103. { -NFS4ERR_LEASE_MOVED, "LEASE_MOVED" }, \
  104. { -NFS4ERR_LOCKED, "LOCKED" }, \
  105. { -NFS4ERR_LOCKS_HELD, "LOCKS_HELD" }, \
  106. { -NFS4ERR_LOCK_RANGE, "LOCK_RANGE" }, \
  107. { -NFS4ERR_MINOR_VERS_MISMATCH, "MINOR_VERS_MISMATCH" }, \
  108. { -NFS4ERR_MLINK, "MLINK" }, \
  109. { -NFS4ERR_MOVED, "MOVED" }, \
  110. { -NFS4ERR_NAMETOOLONG, "NAMETOOLONG" }, \
  111. { -NFS4ERR_NOENT, "NOENT" }, \
  112. { -NFS4ERR_NOFILEHANDLE, "NOFILEHANDLE" }, \
  113. { -NFS4ERR_NOMATCHING_LAYOUT, "NOMATCHING_LAYOUT" }, \
  114. { -NFS4ERR_NOSPC, "NOSPC" }, \
  115. { -NFS4ERR_NOTDIR, "NOTDIR" }, \
  116. { -NFS4ERR_NOTEMPTY, "NOTEMPTY" }, \
  117. { -NFS4ERR_NOTSUPP, "NOTSUPP" }, \
  118. { -NFS4ERR_NOT_ONLY_OP, "NOT_ONLY_OP" }, \
  119. { -NFS4ERR_NOT_SAME, "NOT_SAME" }, \
  120. { -NFS4ERR_NO_GRACE, "NO_GRACE" }, \
  121. { -NFS4ERR_NXIO, "NXIO" }, \
  122. { -NFS4ERR_OLD_STATEID, "OLD_STATEID" }, \
  123. { -NFS4ERR_OPENMODE, "OPENMODE" }, \
  124. { -NFS4ERR_OP_ILLEGAL, "OP_ILLEGAL" }, \
  125. { -NFS4ERR_OP_NOT_IN_SESSION, "OP_NOT_IN_SESSION" }, \
  126. { -NFS4ERR_PERM, "PERM" }, \
  127. { -NFS4ERR_PNFS_IO_HOLE, "PNFS_IO_HOLE" }, \
  128. { -NFS4ERR_PNFS_NO_LAYOUT, "PNFS_NO_LAYOUT" }, \
  129. { -NFS4ERR_RECALLCONFLICT, "RECALLCONFLICT" }, \
  130. { -NFS4ERR_RECLAIM_BAD, "RECLAIM_BAD" }, \
  131. { -NFS4ERR_RECLAIM_CONFLICT, "RECLAIM_CONFLICT" }, \
  132. { -NFS4ERR_REJECT_DELEG, "REJECT_DELEG" }, \
  133. { -NFS4ERR_REP_TOO_BIG, "REP_TOO_BIG" }, \
  134. { -NFS4ERR_REP_TOO_BIG_TO_CACHE, \
  135. "REP_TOO_BIG_TO_CACHE" }, \
  136. { -NFS4ERR_REQ_TOO_BIG, "REQ_TOO_BIG" }, \
  137. { -NFS4ERR_RESOURCE, "RESOURCE" }, \
  138. { -NFS4ERR_RESTOREFH, "RESTOREFH" }, \
  139. { -NFS4ERR_RETRY_UNCACHED_REP, "RETRY_UNCACHED_REP" }, \
  140. { -NFS4ERR_RETURNCONFLICT, "RETURNCONFLICT" }, \
  141. { -NFS4ERR_ROFS, "ROFS" }, \
  142. { -NFS4ERR_SAME, "SAME" }, \
  143. { -NFS4ERR_SHARE_DENIED, "SHARE_DENIED" }, \
  144. { -NFS4ERR_SEQUENCE_POS, "SEQUENCE_POS" }, \
  145. { -NFS4ERR_SEQ_FALSE_RETRY, "SEQ_FALSE_RETRY" }, \
  146. { -NFS4ERR_SEQ_MISORDERED, "SEQ_MISORDERED" }, \
  147. { -NFS4ERR_SERVERFAULT, "SERVERFAULT" }, \
  148. { -NFS4ERR_STALE, "STALE" }, \
  149. { -NFS4ERR_STALE_CLIENTID, "STALE_CLIENTID" }, \
  150. { -NFS4ERR_STALE_STATEID, "STALE_STATEID" }, \
  151. { -NFS4ERR_SYMLINK, "SYMLINK" }, \
  152. { -NFS4ERR_TOOSMALL, "TOOSMALL" }, \
  153. { -NFS4ERR_TOO_MANY_OPS, "TOO_MANY_OPS" }, \
  154. { -NFS4ERR_UNKNOWN_LAYOUTTYPE, "UNKNOWN_LAYOUTTYPE" }, \
  155. { -NFS4ERR_UNSAFE_COMPOUND, "UNSAFE_COMPOUND" }, \
  156. { -NFS4ERR_WRONGSEC, "WRONGSEC" }, \
  157. { -NFS4ERR_WRONG_CRED, "WRONG_CRED" }, \
  158. { -NFS4ERR_WRONG_TYPE, "WRONG_TYPE" }, \
  159. { -NFS4ERR_XDEV, "XDEV" })
  160. #define show_open_flags(flags) \
  161. __print_flags(flags, "|", \
  162. { O_CREAT, "O_CREAT" }, \
  163. { O_EXCL, "O_EXCL" }, \
  164. { O_TRUNC, "O_TRUNC" }, \
  165. { O_DIRECT, "O_DIRECT" })
  166. #define show_fmode_flags(mode) \
  167. __print_flags(mode, "|", \
  168. { ((__force unsigned long)FMODE_READ), "READ" }, \
  169. { ((__force unsigned long)FMODE_WRITE), "WRITE" }, \
  170. { ((__force unsigned long)FMODE_EXEC), "EXEC" })
  171. #define show_nfs_fattr_flags(valid) \
  172. __print_flags((unsigned long)valid, "|", \
  173. { NFS_ATTR_FATTR_TYPE, "TYPE" }, \
  174. { NFS_ATTR_FATTR_MODE, "MODE" }, \
  175. { NFS_ATTR_FATTR_NLINK, "NLINK" }, \
  176. { NFS_ATTR_FATTR_OWNER, "OWNER" }, \
  177. { NFS_ATTR_FATTR_GROUP, "GROUP" }, \
  178. { NFS_ATTR_FATTR_RDEV, "RDEV" }, \
  179. { NFS_ATTR_FATTR_SIZE, "SIZE" }, \
  180. { NFS_ATTR_FATTR_FSID, "FSID" }, \
  181. { NFS_ATTR_FATTR_FILEID, "FILEID" }, \
  182. { NFS_ATTR_FATTR_ATIME, "ATIME" }, \
  183. { NFS_ATTR_FATTR_MTIME, "MTIME" }, \
  184. { NFS_ATTR_FATTR_CTIME, "CTIME" }, \
  185. { NFS_ATTR_FATTR_CHANGE, "CHANGE" }, \
  186. { NFS_ATTR_FATTR_OWNER_NAME, "OWNER_NAME" }, \
  187. { NFS_ATTR_FATTR_GROUP_NAME, "GROUP_NAME" })
  188. DECLARE_EVENT_CLASS(nfs4_clientid_event,
  189. TP_PROTO(
  190. const struct nfs_client *clp,
  191. int error
  192. ),
  193. TP_ARGS(clp, error),
  194. TP_STRUCT__entry(
  195. __string(dstaddr, clp->cl_hostname)
  196. __field(int, error)
  197. ),
  198. TP_fast_assign(
  199. __entry->error = error;
  200. __assign_str(dstaddr, clp->cl_hostname);
  201. ),
  202. TP_printk(
  203. "error=%d (%s) dstaddr=%s",
  204. __entry->error,
  205. show_nfsv4_errors(__entry->error),
  206. __get_str(dstaddr)
  207. )
  208. );
  209. #define DEFINE_NFS4_CLIENTID_EVENT(name) \
  210. DEFINE_EVENT(nfs4_clientid_event, name, \
  211. TP_PROTO( \
  212. const struct nfs_client *clp, \
  213. int error \
  214. ), \
  215. TP_ARGS(clp, error))
  216. DEFINE_NFS4_CLIENTID_EVENT(nfs4_setclientid);
  217. DEFINE_NFS4_CLIENTID_EVENT(nfs4_setclientid_confirm);
  218. DEFINE_NFS4_CLIENTID_EVENT(nfs4_renew);
  219. DEFINE_NFS4_CLIENTID_EVENT(nfs4_renew_async);
  220. #ifdef CONFIG_NFS_V4_1
  221. DEFINE_NFS4_CLIENTID_EVENT(nfs4_exchange_id);
  222. DEFINE_NFS4_CLIENTID_EVENT(nfs4_create_session);
  223. DEFINE_NFS4_CLIENTID_EVENT(nfs4_destroy_session);
  224. DEFINE_NFS4_CLIENTID_EVENT(nfs4_destroy_clientid);
  225. DEFINE_NFS4_CLIENTID_EVENT(nfs4_bind_conn_to_session);
  226. DEFINE_NFS4_CLIENTID_EVENT(nfs4_sequence);
  227. DEFINE_NFS4_CLIENTID_EVENT(nfs4_reclaim_complete);
  228. TRACE_EVENT(nfs4_setup_sequence,
  229. TP_PROTO(
  230. const struct nfs4_session *session,
  231. const struct nfs4_sequence_args *args
  232. ),
  233. TP_ARGS(session, args),
  234. TP_STRUCT__entry(
  235. __field(unsigned int, session)
  236. __field(unsigned int, slot_nr)
  237. __field(unsigned int, seq_nr)
  238. __field(unsigned int, highest_used_slotid)
  239. ),
  240. TP_fast_assign(
  241. const struct nfs4_slot *sa_slot = args->sa_slot;
  242. __entry->session = nfs_session_id_hash(&session->sess_id);
  243. __entry->slot_nr = sa_slot->slot_nr;
  244. __entry->seq_nr = sa_slot->seq_nr;
  245. __entry->highest_used_slotid =
  246. sa_slot->table->highest_used_slotid;
  247. ),
  248. TP_printk(
  249. "session=0x%08x slot_nr=%u seq_nr=%u "
  250. "highest_used_slotid=%u",
  251. __entry->session,
  252. __entry->slot_nr,
  253. __entry->seq_nr,
  254. __entry->highest_used_slotid
  255. )
  256. );
  257. #define show_nfs4_sequence_status_flags(status) \
  258. __print_flags((unsigned long)status, "|", \
  259. { SEQ4_STATUS_CB_PATH_DOWN, "CB_PATH_DOWN" }, \
  260. { SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING, \
  261. "CB_GSS_CONTEXTS_EXPIRING" }, \
  262. { SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED, \
  263. "CB_GSS_CONTEXTS_EXPIRED" }, \
  264. { SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED, \
  265. "EXPIRED_ALL_STATE_REVOKED" }, \
  266. { SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, \
  267. "EXPIRED_SOME_STATE_REVOKED" }, \
  268. { SEQ4_STATUS_ADMIN_STATE_REVOKED, \
  269. "ADMIN_STATE_REVOKED" }, \
  270. { SEQ4_STATUS_RECALLABLE_STATE_REVOKED, \
  271. "RECALLABLE_STATE_REVOKED" }, \
  272. { SEQ4_STATUS_LEASE_MOVED, "LEASE_MOVED" }, \
  273. { SEQ4_STATUS_RESTART_RECLAIM_NEEDED, \
  274. "RESTART_RECLAIM_NEEDED" }, \
  275. { SEQ4_STATUS_CB_PATH_DOWN_SESSION, \
  276. "CB_PATH_DOWN_SESSION" }, \
  277. { SEQ4_STATUS_BACKCHANNEL_FAULT, \
  278. "BACKCHANNEL_FAULT" })
  279. TRACE_EVENT(nfs4_sequence_done,
  280. TP_PROTO(
  281. const struct nfs4_session *session,
  282. const struct nfs4_sequence_res *res
  283. ),
  284. TP_ARGS(session, res),
  285. TP_STRUCT__entry(
  286. __field(unsigned int, session)
  287. __field(unsigned int, slot_nr)
  288. __field(unsigned int, seq_nr)
  289. __field(unsigned int, highest_slotid)
  290. __field(unsigned int, target_highest_slotid)
  291. __field(unsigned int, status_flags)
  292. __field(int, error)
  293. ),
  294. TP_fast_assign(
  295. const struct nfs4_slot *sr_slot = res->sr_slot;
  296. __entry->session = nfs_session_id_hash(&session->sess_id);
  297. __entry->slot_nr = sr_slot->slot_nr;
  298. __entry->seq_nr = sr_slot->seq_nr;
  299. __entry->highest_slotid = res->sr_highest_slotid;
  300. __entry->target_highest_slotid =
  301. res->sr_target_highest_slotid;
  302. __entry->status_flags = res->sr_status_flags;
  303. __entry->error = res->sr_status;
  304. ),
  305. TP_printk(
  306. "error=%d (%s) session=0x%08x slot_nr=%u seq_nr=%u "
  307. "highest_slotid=%u target_highest_slotid=%u "
  308. "status_flags=%u (%s)",
  309. __entry->error,
  310. show_nfsv4_errors(__entry->error),
  311. __entry->session,
  312. __entry->slot_nr,
  313. __entry->seq_nr,
  314. __entry->highest_slotid,
  315. __entry->target_highest_slotid,
  316. __entry->status_flags,
  317. show_nfs4_sequence_status_flags(__entry->status_flags)
  318. )
  319. );
  320. struct cb_sequenceargs;
  321. struct cb_sequenceres;
  322. TRACE_EVENT(nfs4_cb_sequence,
  323. TP_PROTO(
  324. const struct cb_sequenceargs *args,
  325. const struct cb_sequenceres *res,
  326. __be32 status
  327. ),
  328. TP_ARGS(args, res, status),
  329. TP_STRUCT__entry(
  330. __field(unsigned int, session)
  331. __field(unsigned int, slot_nr)
  332. __field(unsigned int, seq_nr)
  333. __field(unsigned int, highest_slotid)
  334. __field(unsigned int, cachethis)
  335. __field(int, error)
  336. ),
  337. TP_fast_assign(
  338. __entry->session = nfs_session_id_hash(&args->csa_sessionid);
  339. __entry->slot_nr = args->csa_slotid;
  340. __entry->seq_nr = args->csa_sequenceid;
  341. __entry->highest_slotid = args->csa_highestslotid;
  342. __entry->cachethis = args->csa_cachethis;
  343. __entry->error = -be32_to_cpu(status);
  344. ),
  345. TP_printk(
  346. "error=%d (%s) session=0x%08x slot_nr=%u seq_nr=%u "
  347. "highest_slotid=%u",
  348. __entry->error,
  349. show_nfsv4_errors(__entry->error),
  350. __entry->session,
  351. __entry->slot_nr,
  352. __entry->seq_nr,
  353. __entry->highest_slotid
  354. )
  355. );
  356. #endif /* CONFIG_NFS_V4_1 */
  357. DECLARE_EVENT_CLASS(nfs4_open_event,
  358. TP_PROTO(
  359. const struct nfs_open_context *ctx,
  360. int flags,
  361. int error
  362. ),
  363. TP_ARGS(ctx, flags, error),
  364. TP_STRUCT__entry(
  365. __field(int, error)
  366. __field(unsigned int, flags)
  367. __field(unsigned int, fmode)
  368. __field(dev_t, dev)
  369. __field(u32, fhandle)
  370. __field(u64, fileid)
  371. __field(u64, dir)
  372. __string(name, ctx->dentry->d_name.name)
  373. __field(int, stateid_seq)
  374. __field(u32, stateid_hash)
  375. __field(int, openstateid_seq)
  376. __field(u32, openstateid_hash)
  377. ),
  378. TP_fast_assign(
  379. const struct nfs4_state *state = ctx->state;
  380. const struct inode *inode = NULL;
  381. __entry->error = error;
  382. __entry->flags = flags;
  383. __entry->fmode = (__force unsigned int)ctx->mode;
  384. __entry->dev = ctx->dentry->d_sb->s_dev;
  385. if (!IS_ERR_OR_NULL(state)) {
  386. inode = state->inode;
  387. __entry->stateid_seq =
  388. be32_to_cpu(state->stateid.seqid);
  389. __entry->stateid_hash =
  390. nfs_stateid_hash(&state->stateid);
  391. __entry->openstateid_seq =
  392. be32_to_cpu(state->open_stateid.seqid);
  393. __entry->openstateid_hash =
  394. nfs_stateid_hash(&state->open_stateid);
  395. } else {
  396. __entry->stateid_seq = 0;
  397. __entry->stateid_hash = 0;
  398. __entry->openstateid_seq = 0;
  399. __entry->openstateid_hash = 0;
  400. }
  401. if (inode != NULL) {
  402. __entry->fileid = NFS_FILEID(inode);
  403. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  404. } else {
  405. __entry->fileid = 0;
  406. __entry->fhandle = 0;
  407. }
  408. __entry->dir = NFS_FILEID(d_inode(ctx->dentry->d_parent));
  409. __assign_str(name, ctx->dentry->d_name.name);
  410. ),
  411. TP_printk(
  412. "error=%d (%s) flags=%d (%s) fmode=%s "
  413. "fileid=%02x:%02x:%llu fhandle=0x%08x "
  414. "name=%02x:%02x:%llu/%s stateid=%d:0x%08x "
  415. "openstateid=%d:0x%08x",
  416. __entry->error,
  417. show_nfsv4_errors(__entry->error),
  418. __entry->flags,
  419. show_open_flags(__entry->flags),
  420. show_fmode_flags(__entry->fmode),
  421. MAJOR(__entry->dev), MINOR(__entry->dev),
  422. (unsigned long long)__entry->fileid,
  423. __entry->fhandle,
  424. MAJOR(__entry->dev), MINOR(__entry->dev),
  425. (unsigned long long)__entry->dir,
  426. __get_str(name),
  427. __entry->stateid_seq, __entry->stateid_hash,
  428. __entry->openstateid_seq, __entry->openstateid_hash
  429. )
  430. );
  431. #define DEFINE_NFS4_OPEN_EVENT(name) \
  432. DEFINE_EVENT(nfs4_open_event, name, \
  433. TP_PROTO( \
  434. const struct nfs_open_context *ctx, \
  435. int flags, \
  436. int error \
  437. ), \
  438. TP_ARGS(ctx, flags, error))
  439. DEFINE_NFS4_OPEN_EVENT(nfs4_open_reclaim);
  440. DEFINE_NFS4_OPEN_EVENT(nfs4_open_expired);
  441. DEFINE_NFS4_OPEN_EVENT(nfs4_open_file);
  442. TRACE_EVENT(nfs4_cached_open,
  443. TP_PROTO(
  444. const struct nfs4_state *state
  445. ),
  446. TP_ARGS(state),
  447. TP_STRUCT__entry(
  448. __field(dev_t, dev)
  449. __field(u32, fhandle)
  450. __field(u64, fileid)
  451. __field(unsigned int, fmode)
  452. __field(int, stateid_seq)
  453. __field(u32, stateid_hash)
  454. ),
  455. TP_fast_assign(
  456. const struct inode *inode = state->inode;
  457. __entry->dev = inode->i_sb->s_dev;
  458. __entry->fileid = NFS_FILEID(inode);
  459. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  460. __entry->fmode = (__force unsigned int)state->state;
  461. __entry->stateid_seq =
  462. be32_to_cpu(state->stateid.seqid);
  463. __entry->stateid_hash =
  464. nfs_stateid_hash(&state->stateid);
  465. ),
  466. TP_printk(
  467. "fmode=%s fileid=%02x:%02x:%llu "
  468. "fhandle=0x%08x stateid=%d:0x%08x",
  469. __entry->fmode ? show_fmode_flags(__entry->fmode) :
  470. "closed",
  471. MAJOR(__entry->dev), MINOR(__entry->dev),
  472. (unsigned long long)__entry->fileid,
  473. __entry->fhandle,
  474. __entry->stateid_seq, __entry->stateid_hash
  475. )
  476. );
  477. TRACE_EVENT(nfs4_close,
  478. TP_PROTO(
  479. const struct nfs4_state *state,
  480. const struct nfs_closeargs *args,
  481. const struct nfs_closeres *res,
  482. int error
  483. ),
  484. TP_ARGS(state, args, res, error),
  485. TP_STRUCT__entry(
  486. __field(dev_t, dev)
  487. __field(u32, fhandle)
  488. __field(u64, fileid)
  489. __field(unsigned int, fmode)
  490. __field(int, error)
  491. __field(int, stateid_seq)
  492. __field(u32, stateid_hash)
  493. ),
  494. TP_fast_assign(
  495. const struct inode *inode = state->inode;
  496. __entry->dev = inode->i_sb->s_dev;
  497. __entry->fileid = NFS_FILEID(inode);
  498. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  499. __entry->fmode = (__force unsigned int)state->state;
  500. __entry->error = error;
  501. __entry->stateid_seq =
  502. be32_to_cpu(args->stateid.seqid);
  503. __entry->stateid_hash =
  504. nfs_stateid_hash(&args->stateid);
  505. ),
  506. TP_printk(
  507. "error=%d (%s) fmode=%s fileid=%02x:%02x:%llu "
  508. "fhandle=0x%08x openstateid=%d:0x%08x",
  509. __entry->error,
  510. show_nfsv4_errors(__entry->error),
  511. __entry->fmode ? show_fmode_flags(__entry->fmode) :
  512. "closed",
  513. MAJOR(__entry->dev), MINOR(__entry->dev),
  514. (unsigned long long)__entry->fileid,
  515. __entry->fhandle,
  516. __entry->stateid_seq, __entry->stateid_hash
  517. )
  518. );
  519. #define show_lock_cmd(type) \
  520. __print_symbolic((int)type, \
  521. { F_GETLK, "GETLK" }, \
  522. { F_SETLK, "SETLK" }, \
  523. { F_SETLKW, "SETLKW" })
  524. #define show_lock_type(type) \
  525. __print_symbolic((int)type, \
  526. { F_RDLCK, "RDLCK" }, \
  527. { F_WRLCK, "WRLCK" }, \
  528. { F_UNLCK, "UNLCK" })
  529. DECLARE_EVENT_CLASS(nfs4_lock_event,
  530. TP_PROTO(
  531. const struct file_lock *request,
  532. const struct nfs4_state *state,
  533. int cmd,
  534. int error
  535. ),
  536. TP_ARGS(request, state, cmd, error),
  537. TP_STRUCT__entry(
  538. __field(int, error)
  539. __field(int, cmd)
  540. __field(char, type)
  541. __field(loff_t, start)
  542. __field(loff_t, end)
  543. __field(dev_t, dev)
  544. __field(u32, fhandle)
  545. __field(u64, fileid)
  546. __field(int, stateid_seq)
  547. __field(u32, stateid_hash)
  548. ),
  549. TP_fast_assign(
  550. const struct inode *inode = state->inode;
  551. __entry->error = error;
  552. __entry->cmd = cmd;
  553. __entry->type = request->fl_type;
  554. __entry->start = request->fl_start;
  555. __entry->end = request->fl_end;
  556. __entry->dev = inode->i_sb->s_dev;
  557. __entry->fileid = NFS_FILEID(inode);
  558. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  559. __entry->stateid_seq =
  560. be32_to_cpu(state->stateid.seqid);
  561. __entry->stateid_hash =
  562. nfs_stateid_hash(&state->stateid);
  563. ),
  564. TP_printk(
  565. "error=%d (%s) cmd=%s:%s range=%lld:%lld "
  566. "fileid=%02x:%02x:%llu fhandle=0x%08x "
  567. "stateid=%d:0x%08x",
  568. __entry->error,
  569. show_nfsv4_errors(__entry->error),
  570. show_lock_cmd(__entry->cmd),
  571. show_lock_type(__entry->type),
  572. (long long)__entry->start,
  573. (long long)__entry->end,
  574. MAJOR(__entry->dev), MINOR(__entry->dev),
  575. (unsigned long long)__entry->fileid,
  576. __entry->fhandle,
  577. __entry->stateid_seq, __entry->stateid_hash
  578. )
  579. );
  580. #define DEFINE_NFS4_LOCK_EVENT(name) \
  581. DEFINE_EVENT(nfs4_lock_event, name, \
  582. TP_PROTO( \
  583. const struct file_lock *request, \
  584. const struct nfs4_state *state, \
  585. int cmd, \
  586. int error \
  587. ), \
  588. TP_ARGS(request, state, cmd, error))
  589. DEFINE_NFS4_LOCK_EVENT(nfs4_get_lock);
  590. DEFINE_NFS4_LOCK_EVENT(nfs4_unlock);
  591. TRACE_EVENT(nfs4_set_lock,
  592. TP_PROTO(
  593. const struct file_lock *request,
  594. const struct nfs4_state *state,
  595. const nfs4_stateid *lockstateid,
  596. int cmd,
  597. int error
  598. ),
  599. TP_ARGS(request, state, lockstateid, cmd, error),
  600. TP_STRUCT__entry(
  601. __field(int, error)
  602. __field(int, cmd)
  603. __field(char, type)
  604. __field(loff_t, start)
  605. __field(loff_t, end)
  606. __field(dev_t, dev)
  607. __field(u32, fhandle)
  608. __field(u64, fileid)
  609. __field(int, stateid_seq)
  610. __field(u32, stateid_hash)
  611. __field(int, lockstateid_seq)
  612. __field(u32, lockstateid_hash)
  613. ),
  614. TP_fast_assign(
  615. const struct inode *inode = state->inode;
  616. __entry->error = error;
  617. __entry->cmd = cmd;
  618. __entry->type = request->fl_type;
  619. __entry->start = request->fl_start;
  620. __entry->end = request->fl_end;
  621. __entry->dev = inode->i_sb->s_dev;
  622. __entry->fileid = NFS_FILEID(inode);
  623. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  624. __entry->stateid_seq =
  625. be32_to_cpu(state->stateid.seqid);
  626. __entry->stateid_hash =
  627. nfs_stateid_hash(&state->stateid);
  628. __entry->lockstateid_seq =
  629. be32_to_cpu(lockstateid->seqid);
  630. __entry->lockstateid_hash =
  631. nfs_stateid_hash(lockstateid);
  632. ),
  633. TP_printk(
  634. "error=%d (%s) cmd=%s:%s range=%lld:%lld "
  635. "fileid=%02x:%02x:%llu fhandle=0x%08x "
  636. "stateid=%d:0x%08x lockstateid=%d:0x%08x",
  637. __entry->error,
  638. show_nfsv4_errors(__entry->error),
  639. show_lock_cmd(__entry->cmd),
  640. show_lock_type(__entry->type),
  641. (long long)__entry->start,
  642. (long long)__entry->end,
  643. MAJOR(__entry->dev), MINOR(__entry->dev),
  644. (unsigned long long)__entry->fileid,
  645. __entry->fhandle,
  646. __entry->stateid_seq, __entry->stateid_hash,
  647. __entry->lockstateid_seq, __entry->lockstateid_hash
  648. )
  649. );
  650. DECLARE_EVENT_CLASS(nfs4_set_delegation_event,
  651. TP_PROTO(
  652. const struct inode *inode,
  653. fmode_t fmode
  654. ),
  655. TP_ARGS(inode, fmode),
  656. TP_STRUCT__entry(
  657. __field(dev_t, dev)
  658. __field(u32, fhandle)
  659. __field(u64, fileid)
  660. __field(unsigned int, fmode)
  661. ),
  662. TP_fast_assign(
  663. __entry->dev = inode->i_sb->s_dev;
  664. __entry->fileid = NFS_FILEID(inode);
  665. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  666. __entry->fmode = (__force unsigned int)fmode;
  667. ),
  668. TP_printk(
  669. "fmode=%s fileid=%02x:%02x:%llu fhandle=0x%08x",
  670. show_fmode_flags(__entry->fmode),
  671. MAJOR(__entry->dev), MINOR(__entry->dev),
  672. (unsigned long long)__entry->fileid,
  673. __entry->fhandle
  674. )
  675. );
  676. #define DEFINE_NFS4_SET_DELEGATION_EVENT(name) \
  677. DEFINE_EVENT(nfs4_set_delegation_event, name, \
  678. TP_PROTO( \
  679. const struct inode *inode, \
  680. fmode_t fmode \
  681. ), \
  682. TP_ARGS(inode, fmode))
  683. DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_set_delegation);
  684. DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_reclaim_delegation);
  685. TRACE_EVENT(nfs4_delegreturn_exit,
  686. TP_PROTO(
  687. const struct nfs4_delegreturnargs *args,
  688. const struct nfs4_delegreturnres *res,
  689. int error
  690. ),
  691. TP_ARGS(args, res, error),
  692. TP_STRUCT__entry(
  693. __field(dev_t, dev)
  694. __field(u32, fhandle)
  695. __field(int, error)
  696. __field(int, stateid_seq)
  697. __field(u32, stateid_hash)
  698. ),
  699. TP_fast_assign(
  700. __entry->dev = res->server->s_dev;
  701. __entry->fhandle = nfs_fhandle_hash(args->fhandle);
  702. __entry->error = error;
  703. __entry->stateid_seq =
  704. be32_to_cpu(args->stateid->seqid);
  705. __entry->stateid_hash =
  706. nfs_stateid_hash(args->stateid);
  707. ),
  708. TP_printk(
  709. "error=%d (%s) dev=%02x:%02x fhandle=0x%08x "
  710. "stateid=%d:0x%08x",
  711. __entry->error,
  712. show_nfsv4_errors(__entry->error),
  713. MAJOR(__entry->dev), MINOR(__entry->dev),
  714. __entry->fhandle,
  715. __entry->stateid_seq, __entry->stateid_hash
  716. )
  717. );
  718. #ifdef CONFIG_NFS_V4_1
  719. DECLARE_EVENT_CLASS(nfs4_test_stateid_event,
  720. TP_PROTO(
  721. const struct nfs4_state *state,
  722. const struct nfs4_lock_state *lsp,
  723. int error
  724. ),
  725. TP_ARGS(state, lsp, error),
  726. TP_STRUCT__entry(
  727. __field(int, error)
  728. __field(dev_t, dev)
  729. __field(u32, fhandle)
  730. __field(u64, fileid)
  731. __field(int, stateid_seq)
  732. __field(u32, stateid_hash)
  733. ),
  734. TP_fast_assign(
  735. const struct inode *inode = state->inode;
  736. __entry->error = error;
  737. __entry->dev = inode->i_sb->s_dev;
  738. __entry->fileid = NFS_FILEID(inode);
  739. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  740. __entry->stateid_seq =
  741. be32_to_cpu(state->stateid.seqid);
  742. __entry->stateid_hash =
  743. nfs_stateid_hash(&state->stateid);
  744. ),
  745. TP_printk(
  746. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  747. "stateid=%d:0x%08x",
  748. __entry->error,
  749. show_nfsv4_errors(__entry->error),
  750. MAJOR(__entry->dev), MINOR(__entry->dev),
  751. (unsigned long long)__entry->fileid,
  752. __entry->fhandle,
  753. __entry->stateid_seq, __entry->stateid_hash
  754. )
  755. );
  756. #define DEFINE_NFS4_TEST_STATEID_EVENT(name) \
  757. DEFINE_EVENT(nfs4_test_stateid_event, name, \
  758. TP_PROTO( \
  759. const struct nfs4_state *state, \
  760. const struct nfs4_lock_state *lsp, \
  761. int error \
  762. ), \
  763. TP_ARGS(state, lsp, error))
  764. DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_delegation_stateid);
  765. DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_open_stateid);
  766. DEFINE_NFS4_TEST_STATEID_EVENT(nfs4_test_lock_stateid);
  767. #endif /* CONFIG_NFS_V4_1 */
  768. DECLARE_EVENT_CLASS(nfs4_lookup_event,
  769. TP_PROTO(
  770. const struct inode *dir,
  771. const struct qstr *name,
  772. int error
  773. ),
  774. TP_ARGS(dir, name, error),
  775. TP_STRUCT__entry(
  776. __field(dev_t, dev)
  777. __field(int, error)
  778. __field(u64, dir)
  779. __string(name, name->name)
  780. ),
  781. TP_fast_assign(
  782. __entry->dev = dir->i_sb->s_dev;
  783. __entry->dir = NFS_FILEID(dir);
  784. __entry->error = error;
  785. __assign_str(name, name->name);
  786. ),
  787. TP_printk(
  788. "error=%d (%s) name=%02x:%02x:%llu/%s",
  789. __entry->error,
  790. show_nfsv4_errors(__entry->error),
  791. MAJOR(__entry->dev), MINOR(__entry->dev),
  792. (unsigned long long)__entry->dir,
  793. __get_str(name)
  794. )
  795. );
  796. #define DEFINE_NFS4_LOOKUP_EVENT(name) \
  797. DEFINE_EVENT(nfs4_lookup_event, name, \
  798. TP_PROTO( \
  799. const struct inode *dir, \
  800. const struct qstr *name, \
  801. int error \
  802. ), \
  803. TP_ARGS(dir, name, error))
  804. DEFINE_NFS4_LOOKUP_EVENT(nfs4_lookup);
  805. DEFINE_NFS4_LOOKUP_EVENT(nfs4_symlink);
  806. DEFINE_NFS4_LOOKUP_EVENT(nfs4_mkdir);
  807. DEFINE_NFS4_LOOKUP_EVENT(nfs4_mknod);
  808. DEFINE_NFS4_LOOKUP_EVENT(nfs4_remove);
  809. DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations);
  810. DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo);
  811. TRACE_EVENT(nfs4_rename,
  812. TP_PROTO(
  813. const struct inode *olddir,
  814. const struct qstr *oldname,
  815. const struct inode *newdir,
  816. const struct qstr *newname,
  817. int error
  818. ),
  819. TP_ARGS(olddir, oldname, newdir, newname, error),
  820. TP_STRUCT__entry(
  821. __field(dev_t, dev)
  822. __field(int, error)
  823. __field(u64, olddir)
  824. __string(oldname, oldname->name)
  825. __field(u64, newdir)
  826. __string(newname, newname->name)
  827. ),
  828. TP_fast_assign(
  829. __entry->dev = olddir->i_sb->s_dev;
  830. __entry->olddir = NFS_FILEID(olddir);
  831. __entry->newdir = NFS_FILEID(newdir);
  832. __entry->error = error;
  833. __assign_str(oldname, oldname->name);
  834. __assign_str(newname, newname->name);
  835. ),
  836. TP_printk(
  837. "error=%d (%s) oldname=%02x:%02x:%llu/%s "
  838. "newname=%02x:%02x:%llu/%s",
  839. __entry->error,
  840. show_nfsv4_errors(__entry->error),
  841. MAJOR(__entry->dev), MINOR(__entry->dev),
  842. (unsigned long long)__entry->olddir,
  843. __get_str(oldname),
  844. MAJOR(__entry->dev), MINOR(__entry->dev),
  845. (unsigned long long)__entry->newdir,
  846. __get_str(newname)
  847. )
  848. );
  849. DECLARE_EVENT_CLASS(nfs4_inode_event,
  850. TP_PROTO(
  851. const struct inode *inode,
  852. int error
  853. ),
  854. TP_ARGS(inode, error),
  855. TP_STRUCT__entry(
  856. __field(dev_t, dev)
  857. __field(u32, fhandle)
  858. __field(u64, fileid)
  859. __field(int, error)
  860. ),
  861. TP_fast_assign(
  862. __entry->dev = inode->i_sb->s_dev;
  863. __entry->fileid = NFS_FILEID(inode);
  864. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  865. __entry->error = error;
  866. ),
  867. TP_printk(
  868. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x",
  869. __entry->error,
  870. show_nfsv4_errors(__entry->error),
  871. MAJOR(__entry->dev), MINOR(__entry->dev),
  872. (unsigned long long)__entry->fileid,
  873. __entry->fhandle
  874. )
  875. );
  876. #define DEFINE_NFS4_INODE_EVENT(name) \
  877. DEFINE_EVENT(nfs4_inode_event, name, \
  878. TP_PROTO( \
  879. const struct inode *inode, \
  880. int error \
  881. ), \
  882. TP_ARGS(inode, error))
  883. DEFINE_NFS4_INODE_EVENT(nfs4_access);
  884. DEFINE_NFS4_INODE_EVENT(nfs4_readlink);
  885. DEFINE_NFS4_INODE_EVENT(nfs4_readdir);
  886. DEFINE_NFS4_INODE_EVENT(nfs4_get_acl);
  887. DEFINE_NFS4_INODE_EVENT(nfs4_set_acl);
  888. #ifdef CONFIG_NFS_V4_SECURITY_LABEL
  889. DEFINE_NFS4_INODE_EVENT(nfs4_get_security_label);
  890. DEFINE_NFS4_INODE_EVENT(nfs4_set_security_label);
  891. #endif /* CONFIG_NFS_V4_SECURITY_LABEL */
  892. DECLARE_EVENT_CLASS(nfs4_inode_stateid_event,
  893. TP_PROTO(
  894. const struct inode *inode,
  895. const nfs4_stateid *stateid,
  896. int error
  897. ),
  898. TP_ARGS(inode, stateid, error),
  899. TP_STRUCT__entry(
  900. __field(dev_t, dev)
  901. __field(u32, fhandle)
  902. __field(u64, fileid)
  903. __field(int, error)
  904. __field(int, stateid_seq)
  905. __field(u32, stateid_hash)
  906. ),
  907. TP_fast_assign(
  908. __entry->dev = inode->i_sb->s_dev;
  909. __entry->fileid = NFS_FILEID(inode);
  910. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  911. __entry->error = error;
  912. __entry->stateid_seq =
  913. be32_to_cpu(stateid->seqid);
  914. __entry->stateid_hash =
  915. nfs_stateid_hash(stateid);
  916. ),
  917. TP_printk(
  918. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  919. "stateid=%d:0x%08x",
  920. __entry->error,
  921. show_nfsv4_errors(__entry->error),
  922. MAJOR(__entry->dev), MINOR(__entry->dev),
  923. (unsigned long long)__entry->fileid,
  924. __entry->fhandle,
  925. __entry->stateid_seq, __entry->stateid_hash
  926. )
  927. );
  928. #define DEFINE_NFS4_INODE_STATEID_EVENT(name) \
  929. DEFINE_EVENT(nfs4_inode_stateid_event, name, \
  930. TP_PROTO( \
  931. const struct inode *inode, \
  932. const nfs4_stateid *stateid, \
  933. int error \
  934. ), \
  935. TP_ARGS(inode, stateid, error))
  936. DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_setattr);
  937. DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_delegreturn);
  938. DECLARE_EVENT_CLASS(nfs4_getattr_event,
  939. TP_PROTO(
  940. const struct nfs_server *server,
  941. const struct nfs_fh *fhandle,
  942. const struct nfs_fattr *fattr,
  943. int error
  944. ),
  945. TP_ARGS(server, fhandle, fattr, error),
  946. TP_STRUCT__entry(
  947. __field(dev_t, dev)
  948. __field(u32, fhandle)
  949. __field(u64, fileid)
  950. __field(unsigned int, valid)
  951. __field(int, error)
  952. ),
  953. TP_fast_assign(
  954. __entry->dev = server->s_dev;
  955. __entry->valid = fattr->valid;
  956. __entry->fhandle = nfs_fhandle_hash(fhandle);
  957. __entry->fileid = (fattr->valid & NFS_ATTR_FATTR_FILEID) ? fattr->fileid : 0;
  958. __entry->error = error;
  959. ),
  960. TP_printk(
  961. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  962. "valid=%s",
  963. __entry->error,
  964. show_nfsv4_errors(__entry->error),
  965. MAJOR(__entry->dev), MINOR(__entry->dev),
  966. (unsigned long long)__entry->fileid,
  967. __entry->fhandle,
  968. show_nfs_fattr_flags(__entry->valid)
  969. )
  970. );
  971. #define DEFINE_NFS4_GETATTR_EVENT(name) \
  972. DEFINE_EVENT(nfs4_getattr_event, name, \
  973. TP_PROTO( \
  974. const struct nfs_server *server, \
  975. const struct nfs_fh *fhandle, \
  976. const struct nfs_fattr *fattr, \
  977. int error \
  978. ), \
  979. TP_ARGS(server, fhandle, fattr, error))
  980. DEFINE_NFS4_GETATTR_EVENT(nfs4_getattr);
  981. DEFINE_NFS4_GETATTR_EVENT(nfs4_lookup_root);
  982. DEFINE_NFS4_GETATTR_EVENT(nfs4_fsinfo);
  983. DECLARE_EVENT_CLASS(nfs4_inode_callback_event,
  984. TP_PROTO(
  985. const struct nfs_client *clp,
  986. const struct nfs_fh *fhandle,
  987. const struct inode *inode,
  988. int error
  989. ),
  990. TP_ARGS(clp, fhandle, inode, error),
  991. TP_STRUCT__entry(
  992. __field(int, error)
  993. __field(dev_t, dev)
  994. __field(u32, fhandle)
  995. __field(u64, fileid)
  996. __string(dstaddr, clp ? clp->cl_hostname : "unknown")
  997. ),
  998. TP_fast_assign(
  999. __entry->error = error;
  1000. __entry->fhandle = nfs_fhandle_hash(fhandle);
  1001. if (inode != NULL) {
  1002. __entry->fileid = NFS_FILEID(inode);
  1003. __entry->dev = inode->i_sb->s_dev;
  1004. } else {
  1005. __entry->fileid = 0;
  1006. __entry->dev = 0;
  1007. }
  1008. __assign_str(dstaddr, clp ? clp->cl_hostname : "unknown")
  1009. ),
  1010. TP_printk(
  1011. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1012. "dstaddr=%s",
  1013. __entry->error,
  1014. show_nfsv4_errors(__entry->error),
  1015. MAJOR(__entry->dev), MINOR(__entry->dev),
  1016. (unsigned long long)__entry->fileid,
  1017. __entry->fhandle,
  1018. __get_str(dstaddr)
  1019. )
  1020. );
  1021. #define DEFINE_NFS4_INODE_CALLBACK_EVENT(name) \
  1022. DEFINE_EVENT(nfs4_inode_callback_event, name, \
  1023. TP_PROTO( \
  1024. const struct nfs_client *clp, \
  1025. const struct nfs_fh *fhandle, \
  1026. const struct inode *inode, \
  1027. int error \
  1028. ), \
  1029. TP_ARGS(clp, fhandle, inode, error))
  1030. DEFINE_NFS4_INODE_CALLBACK_EVENT(nfs4_cb_getattr);
  1031. DECLARE_EVENT_CLASS(nfs4_inode_stateid_callback_event,
  1032. TP_PROTO(
  1033. const struct nfs_client *clp,
  1034. const struct nfs_fh *fhandle,
  1035. const struct inode *inode,
  1036. const nfs4_stateid *stateid,
  1037. int error
  1038. ),
  1039. TP_ARGS(clp, fhandle, inode, stateid, error),
  1040. TP_STRUCT__entry(
  1041. __field(int, error)
  1042. __field(dev_t, dev)
  1043. __field(u32, fhandle)
  1044. __field(u64, fileid)
  1045. __string(dstaddr, clp ? clp->cl_hostname : "unknown")
  1046. __field(int, stateid_seq)
  1047. __field(u32, stateid_hash)
  1048. ),
  1049. TP_fast_assign(
  1050. __entry->error = error;
  1051. __entry->fhandle = nfs_fhandle_hash(fhandle);
  1052. if (inode != NULL) {
  1053. __entry->fileid = NFS_FILEID(inode);
  1054. __entry->dev = inode->i_sb->s_dev;
  1055. } else {
  1056. __entry->fileid = 0;
  1057. __entry->dev = 0;
  1058. }
  1059. __assign_str(dstaddr, clp ? clp->cl_hostname : "unknown")
  1060. __entry->stateid_seq =
  1061. be32_to_cpu(stateid->seqid);
  1062. __entry->stateid_hash =
  1063. nfs_stateid_hash(stateid);
  1064. ),
  1065. TP_printk(
  1066. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1067. "stateid=%d:0x%08x dstaddr=%s",
  1068. __entry->error,
  1069. show_nfsv4_errors(__entry->error),
  1070. MAJOR(__entry->dev), MINOR(__entry->dev),
  1071. (unsigned long long)__entry->fileid,
  1072. __entry->fhandle,
  1073. __entry->stateid_seq, __entry->stateid_hash,
  1074. __get_str(dstaddr)
  1075. )
  1076. );
  1077. #define DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(name) \
  1078. DEFINE_EVENT(nfs4_inode_stateid_callback_event, name, \
  1079. TP_PROTO( \
  1080. const struct nfs_client *clp, \
  1081. const struct nfs_fh *fhandle, \
  1082. const struct inode *inode, \
  1083. const nfs4_stateid *stateid, \
  1084. int error \
  1085. ), \
  1086. TP_ARGS(clp, fhandle, inode, stateid, error))
  1087. DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_recall);
  1088. DEFINE_NFS4_INODE_STATEID_CALLBACK_EVENT(nfs4_cb_layoutrecall_file);
  1089. DECLARE_EVENT_CLASS(nfs4_idmap_event,
  1090. TP_PROTO(
  1091. const char *name,
  1092. int len,
  1093. u32 id,
  1094. int error
  1095. ),
  1096. TP_ARGS(name, len, id, error),
  1097. TP_STRUCT__entry(
  1098. __field(int, error)
  1099. __field(u32, id)
  1100. __dynamic_array(char, name, len > 0 ? len + 1 : 1)
  1101. ),
  1102. TP_fast_assign(
  1103. if (len < 0)
  1104. len = 0;
  1105. __entry->error = error < 0 ? error : 0;
  1106. __entry->id = id;
  1107. memcpy(__get_str(name), name, len);
  1108. __get_str(name)[len] = 0;
  1109. ),
  1110. TP_printk(
  1111. "error=%d id=%u name=%s",
  1112. __entry->error,
  1113. __entry->id,
  1114. __get_str(name)
  1115. )
  1116. );
  1117. #define DEFINE_NFS4_IDMAP_EVENT(name) \
  1118. DEFINE_EVENT(nfs4_idmap_event, name, \
  1119. TP_PROTO( \
  1120. const char *name, \
  1121. int len, \
  1122. u32 id, \
  1123. int error \
  1124. ), \
  1125. TP_ARGS(name, len, id, error))
  1126. DEFINE_NFS4_IDMAP_EVENT(nfs4_map_name_to_uid);
  1127. DEFINE_NFS4_IDMAP_EVENT(nfs4_map_group_to_gid);
  1128. DEFINE_NFS4_IDMAP_EVENT(nfs4_map_uid_to_name);
  1129. DEFINE_NFS4_IDMAP_EVENT(nfs4_map_gid_to_group);
  1130. DECLARE_EVENT_CLASS(nfs4_read_event,
  1131. TP_PROTO(
  1132. const struct nfs_pgio_header *hdr,
  1133. int error
  1134. ),
  1135. TP_ARGS(hdr, error),
  1136. TP_STRUCT__entry(
  1137. __field(dev_t, dev)
  1138. __field(u32, fhandle)
  1139. __field(u64, fileid)
  1140. __field(loff_t, offset)
  1141. __field(size_t, count)
  1142. __field(int, error)
  1143. __field(int, stateid_seq)
  1144. __field(u32, stateid_hash)
  1145. ),
  1146. TP_fast_assign(
  1147. const struct inode *inode = hdr->inode;
  1148. const struct nfs4_state *state =
  1149. hdr->args.context->state;
  1150. __entry->dev = inode->i_sb->s_dev;
  1151. __entry->fileid = NFS_FILEID(inode);
  1152. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  1153. __entry->offset = hdr->args.offset;
  1154. __entry->count = hdr->args.count;
  1155. __entry->error = error;
  1156. __entry->stateid_seq =
  1157. be32_to_cpu(state->stateid.seqid);
  1158. __entry->stateid_hash =
  1159. nfs_stateid_hash(&state->stateid);
  1160. ),
  1161. TP_printk(
  1162. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1163. "offset=%lld count=%zu stateid=%d:0x%08x",
  1164. __entry->error,
  1165. show_nfsv4_errors(__entry->error),
  1166. MAJOR(__entry->dev), MINOR(__entry->dev),
  1167. (unsigned long long)__entry->fileid,
  1168. __entry->fhandle,
  1169. (long long)__entry->offset,
  1170. __entry->count,
  1171. __entry->stateid_seq, __entry->stateid_hash
  1172. )
  1173. );
  1174. #define DEFINE_NFS4_READ_EVENT(name) \
  1175. DEFINE_EVENT(nfs4_read_event, name, \
  1176. TP_PROTO( \
  1177. const struct nfs_pgio_header *hdr, \
  1178. int error \
  1179. ), \
  1180. TP_ARGS(hdr, error))
  1181. DEFINE_NFS4_READ_EVENT(nfs4_read);
  1182. #ifdef CONFIG_NFS_V4_1
  1183. DEFINE_NFS4_READ_EVENT(nfs4_pnfs_read);
  1184. #endif /* CONFIG_NFS_V4_1 */
  1185. DECLARE_EVENT_CLASS(nfs4_write_event,
  1186. TP_PROTO(
  1187. const struct nfs_pgio_header *hdr,
  1188. int error
  1189. ),
  1190. TP_ARGS(hdr, error),
  1191. TP_STRUCT__entry(
  1192. __field(dev_t, dev)
  1193. __field(u32, fhandle)
  1194. __field(u64, fileid)
  1195. __field(loff_t, offset)
  1196. __field(size_t, count)
  1197. __field(int, error)
  1198. __field(int, stateid_seq)
  1199. __field(u32, stateid_hash)
  1200. ),
  1201. TP_fast_assign(
  1202. const struct inode *inode = hdr->inode;
  1203. const struct nfs4_state *state =
  1204. hdr->args.context->state;
  1205. __entry->dev = inode->i_sb->s_dev;
  1206. __entry->fileid = NFS_FILEID(inode);
  1207. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  1208. __entry->offset = hdr->args.offset;
  1209. __entry->count = hdr->args.count;
  1210. __entry->error = error;
  1211. __entry->stateid_seq =
  1212. be32_to_cpu(state->stateid.seqid);
  1213. __entry->stateid_hash =
  1214. nfs_stateid_hash(&state->stateid);
  1215. ),
  1216. TP_printk(
  1217. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1218. "offset=%lld count=%zu stateid=%d:0x%08x",
  1219. __entry->error,
  1220. show_nfsv4_errors(__entry->error),
  1221. MAJOR(__entry->dev), MINOR(__entry->dev),
  1222. (unsigned long long)__entry->fileid,
  1223. __entry->fhandle,
  1224. (long long)__entry->offset,
  1225. __entry->count,
  1226. __entry->stateid_seq, __entry->stateid_hash
  1227. )
  1228. );
  1229. #define DEFINE_NFS4_WRITE_EVENT(name) \
  1230. DEFINE_EVENT(nfs4_write_event, name, \
  1231. TP_PROTO( \
  1232. const struct nfs_pgio_header *hdr, \
  1233. int error \
  1234. ), \
  1235. TP_ARGS(hdr, error))
  1236. DEFINE_NFS4_WRITE_EVENT(nfs4_write);
  1237. #ifdef CONFIG_NFS_V4_1
  1238. DEFINE_NFS4_WRITE_EVENT(nfs4_pnfs_write);
  1239. #endif /* CONFIG_NFS_V4_1 */
  1240. DECLARE_EVENT_CLASS(nfs4_commit_event,
  1241. TP_PROTO(
  1242. const struct nfs_commit_data *data,
  1243. int error
  1244. ),
  1245. TP_ARGS(data, error),
  1246. TP_STRUCT__entry(
  1247. __field(dev_t, dev)
  1248. __field(u32, fhandle)
  1249. __field(u64, fileid)
  1250. __field(loff_t, offset)
  1251. __field(size_t, count)
  1252. __field(int, error)
  1253. ),
  1254. TP_fast_assign(
  1255. const struct inode *inode = data->inode;
  1256. __entry->dev = inode->i_sb->s_dev;
  1257. __entry->fileid = NFS_FILEID(inode);
  1258. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  1259. __entry->offset = data->args.offset;
  1260. __entry->count = data->args.count;
  1261. __entry->error = error;
  1262. ),
  1263. TP_printk(
  1264. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1265. "offset=%lld count=%zu",
  1266. __entry->error,
  1267. show_nfsv4_errors(__entry->error),
  1268. MAJOR(__entry->dev), MINOR(__entry->dev),
  1269. (unsigned long long)__entry->fileid,
  1270. __entry->fhandle,
  1271. (long long)__entry->offset,
  1272. __entry->count
  1273. )
  1274. );
  1275. #define DEFINE_NFS4_COMMIT_EVENT(name) \
  1276. DEFINE_EVENT(nfs4_commit_event, name, \
  1277. TP_PROTO( \
  1278. const struct nfs_commit_data *data, \
  1279. int error \
  1280. ), \
  1281. TP_ARGS(data, error))
  1282. DEFINE_NFS4_COMMIT_EVENT(nfs4_commit);
  1283. #ifdef CONFIG_NFS_V4_1
  1284. DEFINE_NFS4_COMMIT_EVENT(nfs4_pnfs_commit_ds);
  1285. #define show_pnfs_iomode(iomode) \
  1286. __print_symbolic(iomode, \
  1287. { IOMODE_READ, "READ" }, \
  1288. { IOMODE_RW, "RW" }, \
  1289. { IOMODE_ANY, "ANY" })
  1290. TRACE_EVENT(nfs4_layoutget,
  1291. TP_PROTO(
  1292. const struct nfs_open_context *ctx,
  1293. const struct pnfs_layout_range *args,
  1294. const struct pnfs_layout_range *res,
  1295. const nfs4_stateid *layout_stateid,
  1296. int error
  1297. ),
  1298. TP_ARGS(ctx, args, res, layout_stateid, error),
  1299. TP_STRUCT__entry(
  1300. __field(dev_t, dev)
  1301. __field(u32, fhandle)
  1302. __field(u64, fileid)
  1303. __field(u32, iomode)
  1304. __field(u64, offset)
  1305. __field(u64, count)
  1306. __field(int, error)
  1307. __field(int, stateid_seq)
  1308. __field(u32, stateid_hash)
  1309. __field(int, layoutstateid_seq)
  1310. __field(u32, layoutstateid_hash)
  1311. ),
  1312. TP_fast_assign(
  1313. const struct inode *inode = d_inode(ctx->dentry);
  1314. const struct nfs4_state *state = ctx->state;
  1315. __entry->dev = inode->i_sb->s_dev;
  1316. __entry->fileid = NFS_FILEID(inode);
  1317. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  1318. __entry->iomode = args->iomode;
  1319. __entry->offset = args->offset;
  1320. __entry->count = args->length;
  1321. __entry->error = error;
  1322. __entry->stateid_seq =
  1323. be32_to_cpu(state->stateid.seqid);
  1324. __entry->stateid_hash =
  1325. nfs_stateid_hash(&state->stateid);
  1326. if (!error) {
  1327. __entry->layoutstateid_seq =
  1328. be32_to_cpu(layout_stateid->seqid);
  1329. __entry->layoutstateid_hash =
  1330. nfs_stateid_hash(layout_stateid);
  1331. } else {
  1332. __entry->layoutstateid_seq = 0;
  1333. __entry->layoutstateid_hash = 0;
  1334. }
  1335. ),
  1336. TP_printk(
  1337. "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
  1338. "iomode=%s offset=%llu count=%llu stateid=%d:0x%08x "
  1339. "layoutstateid=%d:0x%08x",
  1340. __entry->error,
  1341. show_nfsv4_errors(__entry->error),
  1342. MAJOR(__entry->dev), MINOR(__entry->dev),
  1343. (unsigned long long)__entry->fileid,
  1344. __entry->fhandle,
  1345. show_pnfs_iomode(__entry->iomode),
  1346. (unsigned long long)__entry->offset,
  1347. (unsigned long long)__entry->count,
  1348. __entry->stateid_seq, __entry->stateid_hash,
  1349. __entry->layoutstateid_seq, __entry->layoutstateid_hash
  1350. )
  1351. );
  1352. DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutcommit);
  1353. DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_layoutreturn);
  1354. DEFINE_NFS4_INODE_EVENT(nfs4_layoutreturn_on_close);
  1355. #define show_pnfs_update_layout_reason(reason) \
  1356. __print_symbolic(reason, \
  1357. { PNFS_UPDATE_LAYOUT_UNKNOWN, "unknown" }, \
  1358. { PNFS_UPDATE_LAYOUT_NO_PNFS, "no pnfs" }, \
  1359. { PNFS_UPDATE_LAYOUT_RD_ZEROLEN, "read+zerolen" }, \
  1360. { PNFS_UPDATE_LAYOUT_MDSTHRESH, "mdsthresh" }, \
  1361. { PNFS_UPDATE_LAYOUT_NOMEM, "nomem" }, \
  1362. { PNFS_UPDATE_LAYOUT_BULK_RECALL, "bulk recall" }, \
  1363. { PNFS_UPDATE_LAYOUT_IO_TEST_FAIL, "io test fail" }, \
  1364. { PNFS_UPDATE_LAYOUT_FOUND_CACHED, "found cached" }, \
  1365. { PNFS_UPDATE_LAYOUT_RETURN, "layoutreturn" }, \
  1366. { PNFS_UPDATE_LAYOUT_BLOCKED, "layouts blocked" }, \
  1367. { PNFS_UPDATE_LAYOUT_INVALID_OPEN, "invalid open" }, \
  1368. { PNFS_UPDATE_LAYOUT_RETRY, "retrying" }, \
  1369. { PNFS_UPDATE_LAYOUT_SEND_LAYOUTGET, "sent layoutget" })
  1370. TRACE_EVENT(pnfs_update_layout,
  1371. TP_PROTO(struct inode *inode,
  1372. loff_t pos,
  1373. u64 count,
  1374. enum pnfs_iomode iomode,
  1375. struct pnfs_layout_hdr *lo,
  1376. struct pnfs_layout_segment *lseg,
  1377. enum pnfs_update_layout_reason reason
  1378. ),
  1379. TP_ARGS(inode, pos, count, iomode, lo, lseg, reason),
  1380. TP_STRUCT__entry(
  1381. __field(dev_t, dev)
  1382. __field(u64, fileid)
  1383. __field(u32, fhandle)
  1384. __field(loff_t, pos)
  1385. __field(u64, count)
  1386. __field(enum pnfs_iomode, iomode)
  1387. __field(int, layoutstateid_seq)
  1388. __field(u32, layoutstateid_hash)
  1389. __field(long, lseg)
  1390. __field(enum pnfs_update_layout_reason, reason)
  1391. ),
  1392. TP_fast_assign(
  1393. __entry->dev = inode->i_sb->s_dev;
  1394. __entry->fileid = NFS_FILEID(inode);
  1395. __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
  1396. __entry->pos = pos;
  1397. __entry->count = count;
  1398. __entry->iomode = iomode;
  1399. __entry->reason = reason;
  1400. if (lo != NULL) {
  1401. __entry->layoutstateid_seq =
  1402. be32_to_cpu(lo->plh_stateid.seqid);
  1403. __entry->layoutstateid_hash =
  1404. nfs_stateid_hash(&lo->plh_stateid);
  1405. } else {
  1406. __entry->layoutstateid_seq = 0;
  1407. __entry->layoutstateid_hash = 0;
  1408. }
  1409. __entry->lseg = (long)lseg;
  1410. ),
  1411. TP_printk(
  1412. "fileid=%02x:%02x:%llu fhandle=0x%08x "
  1413. "iomode=%s pos=%llu count=%llu "
  1414. "layoutstateid=%d:0x%08x lseg=0x%lx (%s)",
  1415. MAJOR(__entry->dev), MINOR(__entry->dev),
  1416. (unsigned long long)__entry->fileid,
  1417. __entry->fhandle,
  1418. show_pnfs_iomode(__entry->iomode),
  1419. (unsigned long long)__entry->pos,
  1420. (unsigned long long)__entry->count,
  1421. __entry->layoutstateid_seq, __entry->layoutstateid_hash,
  1422. __entry->lseg,
  1423. show_pnfs_update_layout_reason(__entry->reason)
  1424. )
  1425. );
  1426. #endif /* CONFIG_NFS_V4_1 */
  1427. #endif /* _TRACE_NFS4_H */
  1428. #undef TRACE_INCLUDE_PATH
  1429. #define TRACE_INCLUDE_PATH .
  1430. #define TRACE_INCLUDE_FILE nfs4trace
  1431. /* This part must be outside protection */
  1432. #include <trace/define_trace.h>