blob: 317ce27bdc4b8fceaf61834b674b7f9312654a39 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Trond Myklebustf4ce1292013-08-19 18:59:33 -04002/*
3 * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
4 */
5#undef TRACE_SYSTEM
6#define TRACE_SYSTEM nfs
7
8#if !defined(_TRACE_NFS_H) || defined(TRACE_HEADER_MULTI_READ)
9#define _TRACE_NFS_H
10
11#include <linux/tracepoint.h>
Jeff Layton1eb5d982018-01-09 08:21:17 -050012#include <linux/iversion.h>
Trond Myklebustf4ce1292013-08-19 18:59:33 -040013
Chuck Lever9d2d48b2021-10-22 16:16:56 -040014#include <trace/events/fs.h>
Chuck Lever87915452021-10-22 16:17:03 -040015#include <trace/events/nfs.h>
Chuck Leverb4776a32021-10-16 18:02:24 -040016#include <trace/events/sunrpc_base.h>
17
Trond Myklebustf4ce1292013-08-19 18:59:33 -040018#define nfs_show_cache_validity(v) \
19 __print_flags(v, "|", \
Trond Myklebustf4ce1292013-08-19 18:59:33 -040020 { NFS_INO_INVALID_DATA, "INVALID_DATA" }, \
21 { NFS_INO_INVALID_ATIME, "INVALID_ATIME" }, \
22 { NFS_INO_INVALID_ACCESS, "INVALID_ACCESS" }, \
23 { NFS_INO_INVALID_ACL, "INVALID_ACL" }, \
24 { NFS_INO_REVAL_PAGECACHE, "REVAL_PAGECACHE" }, \
25 { NFS_INO_REVAL_FORCED, "REVAL_FORCED" }, \
Chuck Lever7d4006c2019-06-19 10:34:03 -040026 { NFS_INO_INVALID_LABEL, "INVALID_LABEL" }, \
27 { NFS_INO_INVALID_CHANGE, "INVALID_CHANGE" }, \
28 { NFS_INO_INVALID_CTIME, "INVALID_CTIME" }, \
29 { NFS_INO_INVALID_MTIME, "INVALID_MTIME" }, \
30 { NFS_INO_INVALID_SIZE, "INVALID_SIZE" }, \
Frank van der Linden0f44da52020-06-23 22:39:00 +000031 { NFS_INO_INVALID_OTHER, "INVALID_OTHER" }, \
Trond Myklebust8a27c7cc2021-03-25 15:45:09 -040032 { NFS_INO_DATA_INVAL_DEFER, "DATA_INVAL_DEFER" }, \
33 { NFS_INO_INVALID_BLOCKS, "INVALID_BLOCKS" }, \
Trond Myklebustfabf2b32021-03-25 13:14:42 -040034 { NFS_INO_INVALID_XATTR, "INVALID_XATTR" }, \
Trond Myklebust720869e2021-04-13 09:41:16 -040035 { NFS_INO_INVALID_NLINK, "INVALID_NLINK" }, \
36 { NFS_INO_INVALID_MODE, "INVALID_MODE" })
Chuck Lever7d4006c2019-06-19 10:34:03 -040037
Trond Myklebustf4ce1292013-08-19 18:59:33 -040038#define nfs_show_nfsi_flags(v) \
39 __print_flags(v, "|", \
Chuck Lever7d4006c2019-06-19 10:34:03 -040040 { BIT(NFS_INO_ADVISE_RDPLUS), "ADVISE_RDPLUS" }, \
41 { BIT(NFS_INO_STALE), "STALE" }, \
42 { BIT(NFS_INO_ACL_LRU_SET), "ACL_LRU_SET" }, \
43 { BIT(NFS_INO_INVALIDATING), "INVALIDATING" }, \
44 { BIT(NFS_INO_FSCACHE), "FSCACHE" }, \
Chuck Lever7d4006c2019-06-19 10:34:03 -040045 { BIT(NFS_INO_LAYOUTCOMMIT), "NEED_LAYOUTCOMMIT" }, \
46 { BIT(NFS_INO_LAYOUTCOMMITTING), "LAYOUTCOMMIT" }, \
47 { BIT(NFS_INO_LAYOUTSTATS), "LAYOUTSTATS" }, \
48 { BIT(NFS_INO_ODIRECT), "ODIRECT" })
Trond Myklebustf4ce1292013-08-19 18:59:33 -040049
50DECLARE_EVENT_CLASS(nfs_inode_event,
51 TP_PROTO(
52 const struct inode *inode
53 ),
54
55 TP_ARGS(inode),
56
57 TP_STRUCT__entry(
58 __field(dev_t, dev)
59 __field(u32, fhandle)
60 __field(u64, fileid)
61 __field(u64, version)
62 ),
63
64 TP_fast_assign(
65 const struct nfs_inode *nfsi = NFS_I(inode);
66 __entry->dev = inode->i_sb->s_dev;
67 __entry->fileid = nfsi->fileid;
68 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
Jeff Layton1eb5d982018-01-09 08:21:17 -050069 __entry->version = inode_peek_iversion_raw(inode);
Trond Myklebustf4ce1292013-08-19 18:59:33 -040070 ),
71
72 TP_printk(
73 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu ",
74 MAJOR(__entry->dev), MINOR(__entry->dev),
75 (unsigned long long)__entry->fileid,
76 __entry->fhandle,
77 (unsigned long long)__entry->version
78 )
79);
80
81DECLARE_EVENT_CLASS(nfs_inode_event_done,
82 TP_PROTO(
83 const struct inode *inode,
84 int error
85 ),
86
87 TP_ARGS(inode, error),
88
89 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -040090 __field(unsigned long, error)
Trond Myklebustf4ce1292013-08-19 18:59:33 -040091 __field(dev_t, dev)
92 __field(u32, fhandle)
93 __field(unsigned char, type)
94 __field(u64, fileid)
95 __field(u64, version)
96 __field(loff_t, size)
97 __field(unsigned long, nfsi_flags)
98 __field(unsigned long, cache_validity)
99 ),
100
101 TP_fast_assign(
102 const struct nfs_inode *nfsi = NFS_I(inode);
Chuck Lever38a638a2019-06-19 10:33:58 -0400103 __entry->error = error < 0 ? -error : 0;
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400104 __entry->dev = inode->i_sb->s_dev;
105 __entry->fileid = nfsi->fileid;
106 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
107 __entry->type = nfs_umode_to_dtype(inode->i_mode);
Jeff Layton1eb5d982018-01-09 08:21:17 -0500108 __entry->version = inode_peek_iversion_raw(inode);
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400109 __entry->size = i_size_read(inode);
110 __entry->nfsi_flags = nfsi->flags;
111 __entry->cache_validity = nfsi->cache_validity;
112 ),
113
114 TP_printk(
Chuck Lever38a638a2019-06-19 10:33:58 -0400115 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400116 "type=%u (%s) version=%llu size=%lld "
Chuck Lever7d4006c2019-06-19 10:34:03 -0400117 "cache_validity=0x%lx (%s) nfs_flags=0x%lx (%s)",
Chuck Lever87915452021-10-22 16:17:03 -0400118 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400119 MAJOR(__entry->dev), MINOR(__entry->dev),
120 (unsigned long long)__entry->fileid,
121 __entry->fhandle,
122 __entry->type,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400123 show_fs_dirent_type(__entry->type),
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400124 (unsigned long long)__entry->version,
125 (long long)__entry->size,
126 __entry->cache_validity,
127 nfs_show_cache_validity(__entry->cache_validity),
128 __entry->nfsi_flags,
129 nfs_show_nfsi_flags(__entry->nfsi_flags)
130 )
131);
132
133#define DEFINE_NFS_INODE_EVENT(name) \
134 DEFINE_EVENT(nfs_inode_event, name, \
135 TP_PROTO( \
136 const struct inode *inode \
137 ), \
138 TP_ARGS(inode))
139#define DEFINE_NFS_INODE_EVENT_DONE(name) \
140 DEFINE_EVENT(nfs_inode_event_done, name, \
141 TP_PROTO( \
142 const struct inode *inode, \
143 int error \
144 ), \
145 TP_ARGS(inode, error))
Trond Myklebust93ce4af2020-04-06 13:39:29 -0400146DEFINE_NFS_INODE_EVENT(nfs_set_inode_stale);
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400147DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter);
148DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_exit);
149DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_enter);
150DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_inode_exit);
151DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_enter);
152DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_mapping_exit);
153DEFINE_NFS_INODE_EVENT(nfs_getattr_enter);
154DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit);
155DEFINE_NFS_INODE_EVENT(nfs_setattr_enter);
156DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit);
157DEFINE_NFS_INODE_EVENT(nfs_writeback_page_enter);
158DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_page_exit);
159DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_enter);
160DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit);
161DEFINE_NFS_INODE_EVENT(nfs_fsync_enter);
162DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit);
163DEFINE_NFS_INODE_EVENT(nfs_access_enter);
Benjamin Coddington93c2e5e2021-11-16 08:49:24 -0500164DEFINE_NFS_INODE_EVENT_DONE(nfs_set_cache_invalid);
Trond Myklebuste8194b72020-01-06 15:25:12 -0500165
166TRACE_EVENT(nfs_access_exit,
167 TP_PROTO(
168 const struct inode *inode,
169 unsigned int mask,
170 unsigned int permitted,
171 int error
172 ),
173
174 TP_ARGS(inode, mask, permitted, error),
175
176 TP_STRUCT__entry(
177 __field(unsigned long, error)
178 __field(dev_t, dev)
179 __field(u32, fhandle)
180 __field(unsigned char, type)
181 __field(u64, fileid)
182 __field(u64, version)
183 __field(loff_t, size)
184 __field(unsigned long, nfsi_flags)
185 __field(unsigned long, cache_validity)
186 __field(unsigned int, mask)
187 __field(unsigned int, permitted)
188 ),
189
190 TP_fast_assign(
191 const struct nfs_inode *nfsi = NFS_I(inode);
192 __entry->error = error < 0 ? -error : 0;
193 __entry->dev = inode->i_sb->s_dev;
194 __entry->fileid = nfsi->fileid;
195 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
196 __entry->type = nfs_umode_to_dtype(inode->i_mode);
197 __entry->version = inode_peek_iversion_raw(inode);
198 __entry->size = i_size_read(inode);
199 __entry->nfsi_flags = nfsi->flags;
200 __entry->cache_validity = nfsi->cache_validity;
201 __entry->mask = mask;
202 __entry->permitted = permitted;
203 ),
204
205 TP_printk(
206 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
207 "type=%u (%s) version=%llu size=%lld "
208 "cache_validity=0x%lx (%s) nfs_flags=0x%lx (%s) "
209 "mask=0x%x permitted=0x%x",
Chuck Lever87915452021-10-22 16:17:03 -0400210 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebuste8194b72020-01-06 15:25:12 -0500211 MAJOR(__entry->dev), MINOR(__entry->dev),
212 (unsigned long long)__entry->fileid,
213 __entry->fhandle,
214 __entry->type,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400215 show_fs_dirent_type(__entry->type),
Trond Myklebuste8194b72020-01-06 15:25:12 -0500216 (unsigned long long)__entry->version,
217 (long long)__entry->size,
218 __entry->cache_validity,
219 nfs_show_cache_validity(__entry->cache_validity),
220 __entry->nfsi_flags,
221 nfs_show_nfsi_flags(__entry->nfsi_flags),
222 __entry->mask, __entry->permitted
223 )
224);
Trond Myklebustf4ce1292013-08-19 18:59:33 -0400225
Chuck Lever110cb2d2021-10-04 10:10:16 -0400226DECLARE_EVENT_CLASS(nfs_update_size_class,
227 TP_PROTO(
228 const struct inode *inode,
229 loff_t new_size
230 ),
231
232 TP_ARGS(inode, new_size),
233
234 TP_STRUCT__entry(
235 __field(dev_t, dev)
236 __field(u32, fhandle)
237 __field(u64, fileid)
238 __field(u64, version)
239 __field(loff_t, cur_size)
240 __field(loff_t, new_size)
241 ),
242
243 TP_fast_assign(
244 const struct nfs_inode *nfsi = NFS_I(inode);
245
246 __entry->dev = inode->i_sb->s_dev;
247 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
248 __entry->fileid = nfsi->fileid;
249 __entry->version = inode_peek_iversion_raw(inode);
250 __entry->cur_size = i_size_read(inode);
251 __entry->new_size = new_size;
252 ),
253
254 TP_printk(
255 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu cursize=%lld newsize=%lld",
256 MAJOR(__entry->dev), MINOR(__entry->dev),
257 (unsigned long long)__entry->fileid,
258 __entry->fhandle, __entry->version,
259 __entry->cur_size, __entry->new_size
260 )
261);
262
263#define DEFINE_NFS_UPDATE_SIZE_EVENT(name) \
264 DEFINE_EVENT(nfs_update_size_class, nfs_size_##name, \
265 TP_PROTO( \
266 const struct inode *inode, \
267 loff_t new_size \
268 ), \
269 TP_ARGS(inode, new_size))
270
271DEFINE_NFS_UPDATE_SIZE_EVENT(truncate);
272DEFINE_NFS_UPDATE_SIZE_EVENT(wcc);
273DEFINE_NFS_UPDATE_SIZE_EVENT(update);
274DEFINE_NFS_UPDATE_SIZE_EVENT(grow);
275
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400276DECLARE_EVENT_CLASS(nfs_lookup_event,
277 TP_PROTO(
278 const struct inode *dir,
279 const struct dentry *dentry,
280 unsigned int flags
281 ),
282
283 TP_ARGS(dir, dentry, flags),
284
285 TP_STRUCT__entry(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400286 __field(unsigned long, flags)
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400287 __field(dev_t, dev)
288 __field(u64, dir)
289 __string(name, dentry->d_name.name)
290 ),
291
292 TP_fast_assign(
293 __entry->dev = dir->i_sb->s_dev;
294 __entry->dir = NFS_FILEID(dir);
295 __entry->flags = flags;
296 __assign_str(name, dentry->d_name.name);
297 ),
298
299 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400300 "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400301 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400302 show_fs_lookup_flags(__entry->flags),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400303 MAJOR(__entry->dev), MINOR(__entry->dev),
304 (unsigned long long)__entry->dir,
305 __get_str(name)
306 )
307);
308
309#define DEFINE_NFS_LOOKUP_EVENT(name) \
310 DEFINE_EVENT(nfs_lookup_event, name, \
311 TP_PROTO( \
312 const struct inode *dir, \
313 const struct dentry *dentry, \
314 unsigned int flags \
315 ), \
316 TP_ARGS(dir, dentry, flags))
317
318DECLARE_EVENT_CLASS(nfs_lookup_event_done,
319 TP_PROTO(
320 const struct inode *dir,
321 const struct dentry *dentry,
322 unsigned int flags,
323 int error
324 ),
325
326 TP_ARGS(dir, dentry, flags, error),
327
328 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -0400329 __field(unsigned long, error)
Chuck Lever7d4006c2019-06-19 10:34:03 -0400330 __field(unsigned long, flags)
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400331 __field(dev_t, dev)
332 __field(u64, dir)
333 __string(name, dentry->d_name.name)
334 ),
335
336 TP_fast_assign(
337 __entry->dev = dir->i_sb->s_dev;
338 __entry->dir = NFS_FILEID(dir);
Chuck Lever38a638a2019-06-19 10:33:58 -0400339 __entry->error = error < 0 ? -error : 0;
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400340 __entry->flags = flags;
341 __assign_str(name, dentry->d_name.name);
342 ),
343
344 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400345 "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400346 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400347 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400348 show_fs_lookup_flags(__entry->flags),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400349 MAJOR(__entry->dev), MINOR(__entry->dev),
350 (unsigned long long)__entry->dir,
351 __get_str(name)
352 )
353);
354
355#define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \
356 DEFINE_EVENT(nfs_lookup_event_done, name, \
357 TP_PROTO( \
358 const struct inode *dir, \
359 const struct dentry *dentry, \
360 unsigned int flags, \
361 int error \
362 ), \
363 TP_ARGS(dir, dentry, flags, error))
364
365DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter);
366DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit);
367DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_enter);
368DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revalidate_exit);
369
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400370TRACE_EVENT(nfs_atomic_open_enter,
371 TP_PROTO(
372 const struct inode *dir,
373 const struct nfs_open_context *ctx,
374 unsigned int flags
375 ),
376
377 TP_ARGS(dir, ctx, flags),
378
379 TP_STRUCT__entry(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400380 __field(unsigned long, flags)
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400381 __field(unsigned long, fmode)
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400382 __field(dev_t, dev)
383 __field(u64, dir)
384 __string(name, ctx->dentry->d_name.name)
385 ),
386
387 TP_fast_assign(
388 __entry->dev = dir->i_sb->s_dev;
389 __entry->dir = NFS_FILEID(dir);
390 __entry->flags = flags;
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400391 __entry->fmode = (__force unsigned long)ctx->mode;
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400392 __assign_str(name, ctx->dentry->d_name.name);
393 ),
394
395 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400396 "flags=0x%lx (%s) fmode=%s name=%02x:%02x:%llu/%s",
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400397 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400398 show_fs_fcntl_open_flags(__entry->flags),
399 show_fs_fmode_flags(__entry->fmode),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400400 MAJOR(__entry->dev), MINOR(__entry->dev),
401 (unsigned long long)__entry->dir,
402 __get_str(name)
403 )
404);
405
406TRACE_EVENT(nfs_atomic_open_exit,
407 TP_PROTO(
408 const struct inode *dir,
409 const struct nfs_open_context *ctx,
410 unsigned int flags,
411 int error
412 ),
413
414 TP_ARGS(dir, ctx, flags, error),
415
416 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -0400417 __field(unsigned long, error)
Chuck Lever7d4006c2019-06-19 10:34:03 -0400418 __field(unsigned long, flags)
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400419 __field(unsigned long, fmode)
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400420 __field(dev_t, dev)
421 __field(u64, dir)
422 __string(name, ctx->dentry->d_name.name)
423 ),
424
425 TP_fast_assign(
Chuck Lever38a638a2019-06-19 10:33:58 -0400426 __entry->error = -error;
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400427 __entry->dev = dir->i_sb->s_dev;
428 __entry->dir = NFS_FILEID(dir);
429 __entry->flags = flags;
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400430 __entry->fmode = (__force unsigned long)ctx->mode;
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400431 __assign_str(name, ctx->dentry->d_name.name);
432 ),
433
434 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400435 "error=%ld (%s) flags=0x%lx (%s) fmode=%s "
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400436 "name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400437 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400438 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400439 show_fs_fcntl_open_flags(__entry->flags),
440 show_fs_fmode_flags(__entry->fmode),
Trond Myklebust6e0d0be2013-08-20 11:26:17 -0400441 MAJOR(__entry->dev), MINOR(__entry->dev),
442 (unsigned long long)__entry->dir,
443 __get_str(name)
444 )
445);
446
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400447TRACE_EVENT(nfs_create_enter,
448 TP_PROTO(
449 const struct inode *dir,
450 const struct dentry *dentry,
451 unsigned int flags
452 ),
453
454 TP_ARGS(dir, dentry, flags),
455
456 TP_STRUCT__entry(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400457 __field(unsigned long, flags)
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400458 __field(dev_t, dev)
459 __field(u64, dir)
460 __string(name, dentry->d_name.name)
461 ),
462
463 TP_fast_assign(
464 __entry->dev = dir->i_sb->s_dev;
465 __entry->dir = NFS_FILEID(dir);
466 __entry->flags = flags;
467 __assign_str(name, dentry->d_name.name);
468 ),
469
470 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400471 "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400472 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400473 show_fs_fcntl_open_flags(__entry->flags),
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400474 MAJOR(__entry->dev), MINOR(__entry->dev),
475 (unsigned long long)__entry->dir,
476 __get_str(name)
477 )
478);
479
480TRACE_EVENT(nfs_create_exit,
481 TP_PROTO(
482 const struct inode *dir,
483 const struct dentry *dentry,
484 unsigned int flags,
485 int error
486 ),
487
488 TP_ARGS(dir, dentry, flags, error),
489
490 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -0400491 __field(unsigned long, error)
Chuck Lever7d4006c2019-06-19 10:34:03 -0400492 __field(unsigned long, flags)
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400493 __field(dev_t, dev)
494 __field(u64, dir)
495 __string(name, dentry->d_name.name)
496 ),
497
498 TP_fast_assign(
Chuck Lever38a638a2019-06-19 10:33:58 -0400499 __entry->error = -error;
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400500 __entry->dev = dir->i_sb->s_dev;
501 __entry->dir = NFS_FILEID(dir);
502 __entry->flags = flags;
503 __assign_str(name, dentry->d_name.name);
504 ),
505
506 TP_printk(
Chuck Lever7d4006c2019-06-19 10:34:03 -0400507 "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400508 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400509 __entry->flags,
Chuck Lever9d2d48b2021-10-22 16:16:56 -0400510 show_fs_fcntl_open_flags(__entry->flags),
Trond Myklebust8b0ad3d2013-08-21 10:53:09 -0400511 MAJOR(__entry->dev), MINOR(__entry->dev),
512 (unsigned long long)__entry->dir,
513 __get_str(name)
514 )
515);
516
Trond Myklebust1ca42382013-08-21 12:36:04 -0400517DECLARE_EVENT_CLASS(nfs_directory_event,
518 TP_PROTO(
519 const struct inode *dir,
520 const struct dentry *dentry
521 ),
522
523 TP_ARGS(dir, dentry),
524
525 TP_STRUCT__entry(
526 __field(dev_t, dev)
527 __field(u64, dir)
528 __string(name, dentry->d_name.name)
529 ),
530
531 TP_fast_assign(
532 __entry->dev = dir->i_sb->s_dev;
533 __entry->dir = NFS_FILEID(dir);
534 __assign_str(name, dentry->d_name.name);
535 ),
536
537 TP_printk(
538 "name=%02x:%02x:%llu/%s",
539 MAJOR(__entry->dev), MINOR(__entry->dev),
540 (unsigned long long)__entry->dir,
541 __get_str(name)
542 )
543);
544
545#define DEFINE_NFS_DIRECTORY_EVENT(name) \
546 DEFINE_EVENT(nfs_directory_event, name, \
547 TP_PROTO( \
548 const struct inode *dir, \
549 const struct dentry *dentry \
550 ), \
551 TP_ARGS(dir, dentry))
552
553DECLARE_EVENT_CLASS(nfs_directory_event_done,
554 TP_PROTO(
555 const struct inode *dir,
556 const struct dentry *dentry,
557 int error
558 ),
559
560 TP_ARGS(dir, dentry, error),
561
562 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -0400563 __field(unsigned long, error)
Trond Myklebust1ca42382013-08-21 12:36:04 -0400564 __field(dev_t, dev)
565 __field(u64, dir)
566 __string(name, dentry->d_name.name)
567 ),
568
569 TP_fast_assign(
570 __entry->dev = dir->i_sb->s_dev;
571 __entry->dir = NFS_FILEID(dir);
Chuck Lever38a638a2019-06-19 10:33:58 -0400572 __entry->error = error < 0 ? -error : 0;
Trond Myklebust1ca42382013-08-21 12:36:04 -0400573 __assign_str(name, dentry->d_name.name);
574 ),
575
576 TP_printk(
Chuck Lever38a638a2019-06-19 10:33:58 -0400577 "error=%ld (%s) name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400578 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust1ca42382013-08-21 12:36:04 -0400579 MAJOR(__entry->dev), MINOR(__entry->dev),
580 (unsigned long long)__entry->dir,
581 __get_str(name)
582 )
583);
584
585#define DEFINE_NFS_DIRECTORY_EVENT_DONE(name) \
586 DEFINE_EVENT(nfs_directory_event_done, name, \
587 TP_PROTO( \
588 const struct inode *dir, \
589 const struct dentry *dentry, \
590 int error \
591 ), \
592 TP_ARGS(dir, dentry, error))
593
594DEFINE_NFS_DIRECTORY_EVENT(nfs_mknod_enter);
595DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mknod_exit);
596DEFINE_NFS_DIRECTORY_EVENT(nfs_mkdir_enter);
597DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mkdir_exit);
598DEFINE_NFS_DIRECTORY_EVENT(nfs_rmdir_enter);
599DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_rmdir_exit);
600DEFINE_NFS_DIRECTORY_EVENT(nfs_remove_enter);
601DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_remove_exit);
602DEFINE_NFS_DIRECTORY_EVENT(nfs_unlink_enter);
603DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exit);
604DEFINE_NFS_DIRECTORY_EVENT(nfs_symlink_enter);
605DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_symlink_exit);
606
Trond Myklebust1fd10852013-08-21 13:54:44 -0400607TRACE_EVENT(nfs_link_enter,
608 TP_PROTO(
609 const struct inode *inode,
610 const struct inode *dir,
611 const struct dentry *dentry
612 ),
613
614 TP_ARGS(inode, dir, dentry),
615
616 TP_STRUCT__entry(
617 __field(dev_t, dev)
618 __field(u64, fileid)
619 __field(u64, dir)
620 __string(name, dentry->d_name.name)
621 ),
622
623 TP_fast_assign(
624 __entry->dev = inode->i_sb->s_dev;
625 __entry->fileid = NFS_FILEID(inode);
626 __entry->dir = NFS_FILEID(dir);
627 __assign_str(name, dentry->d_name.name);
628 ),
629
630 TP_printk(
631 "fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
632 MAJOR(__entry->dev), MINOR(__entry->dev),
633 __entry->fileid,
634 MAJOR(__entry->dev), MINOR(__entry->dev),
635 (unsigned long long)__entry->dir,
636 __get_str(name)
637 )
638);
639
640TRACE_EVENT(nfs_link_exit,
641 TP_PROTO(
642 const struct inode *inode,
643 const struct inode *dir,
644 const struct dentry *dentry,
645 int error
646 ),
647
648 TP_ARGS(inode, dir, dentry, error),
649
650 TP_STRUCT__entry(
Chuck Lever38a638a2019-06-19 10:33:58 -0400651 __field(unsigned long, error)
Trond Myklebust1fd10852013-08-21 13:54:44 -0400652 __field(dev_t, dev)
653 __field(u64, fileid)
654 __field(u64, dir)
655 __string(name, dentry->d_name.name)
656 ),
657
658 TP_fast_assign(
659 __entry->dev = inode->i_sb->s_dev;
660 __entry->fileid = NFS_FILEID(inode);
661 __entry->dir = NFS_FILEID(dir);
Chuck Lever38a638a2019-06-19 10:33:58 -0400662 __entry->error = error < 0 ? -error : 0;
Trond Myklebust1fd10852013-08-21 13:54:44 -0400663 __assign_str(name, dentry->d_name.name);
664 ),
665
666 TP_printk(
Chuck Lever38a638a2019-06-19 10:33:58 -0400667 "error=%ld (%s) fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400668 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust1fd10852013-08-21 13:54:44 -0400669 MAJOR(__entry->dev), MINOR(__entry->dev),
670 __entry->fileid,
671 MAJOR(__entry->dev), MINOR(__entry->dev),
672 (unsigned long long)__entry->dir,
673 __get_str(name)
674 )
675);
676
Trond Myklebust70ded202013-08-21 12:08:45 -0400677DECLARE_EVENT_CLASS(nfs_rename_event,
678 TP_PROTO(
679 const struct inode *old_dir,
680 const struct dentry *old_dentry,
681 const struct inode *new_dir,
682 const struct dentry *new_dentry
683 ),
684
685 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
686
687 TP_STRUCT__entry(
688 __field(dev_t, dev)
689 __field(u64, old_dir)
690 __field(u64, new_dir)
691 __string(old_name, old_dentry->d_name.name)
692 __string(new_name, new_dentry->d_name.name)
693 ),
694
695 TP_fast_assign(
696 __entry->dev = old_dir->i_sb->s_dev;
697 __entry->old_dir = NFS_FILEID(old_dir);
698 __entry->new_dir = NFS_FILEID(new_dir);
699 __assign_str(old_name, old_dentry->d_name.name);
700 __assign_str(new_name, new_dentry->d_name.name);
701 ),
702
703 TP_printk(
704 "old_name=%02x:%02x:%llu/%s new_name=%02x:%02x:%llu/%s",
705 MAJOR(__entry->dev), MINOR(__entry->dev),
706 (unsigned long long)__entry->old_dir,
707 __get_str(old_name),
708 MAJOR(__entry->dev), MINOR(__entry->dev),
709 (unsigned long long)__entry->new_dir,
710 __get_str(new_name)
711 )
712);
713#define DEFINE_NFS_RENAME_EVENT(name) \
714 DEFINE_EVENT(nfs_rename_event, name, \
715 TP_PROTO( \
716 const struct inode *old_dir, \
717 const struct dentry *old_dentry, \
718 const struct inode *new_dir, \
719 const struct dentry *new_dentry \
720 ), \
721 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
722
723DECLARE_EVENT_CLASS(nfs_rename_event_done,
724 TP_PROTO(
725 const struct inode *old_dir,
726 const struct dentry *old_dentry,
727 const struct inode *new_dir,
728 const struct dentry *new_dentry,
729 int error
730 ),
731
732 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
733
734 TP_STRUCT__entry(
735 __field(dev_t, dev)
Chuck Lever38a638a2019-06-19 10:33:58 -0400736 __field(unsigned long, error)
Trond Myklebust70ded202013-08-21 12:08:45 -0400737 __field(u64, old_dir)
738 __string(old_name, old_dentry->d_name.name)
739 __field(u64, new_dir)
740 __string(new_name, new_dentry->d_name.name)
741 ),
742
743 TP_fast_assign(
744 __entry->dev = old_dir->i_sb->s_dev;
Chuck Lever38a638a2019-06-19 10:33:58 -0400745 __entry->error = -error;
Trond Myklebust70ded202013-08-21 12:08:45 -0400746 __entry->old_dir = NFS_FILEID(old_dir);
747 __entry->new_dir = NFS_FILEID(new_dir);
Trond Myklebust70ded202013-08-21 12:08:45 -0400748 __assign_str(old_name, old_dentry->d_name.name);
749 __assign_str(new_name, new_dentry->d_name.name);
750 ),
751
752 TP_printk(
Chuck Lever38a638a2019-06-19 10:33:58 -0400753 "error=%ld (%s) old_name=%02x:%02x:%llu/%s "
Trond Myklebust70ded202013-08-21 12:08:45 -0400754 "new_name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400755 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust70ded202013-08-21 12:08:45 -0400756 MAJOR(__entry->dev), MINOR(__entry->dev),
757 (unsigned long long)__entry->old_dir,
758 __get_str(old_name),
759 MAJOR(__entry->dev), MINOR(__entry->dev),
760 (unsigned long long)__entry->new_dir,
761 __get_str(new_name)
762 )
763);
764#define DEFINE_NFS_RENAME_EVENT_DONE(name) \
765 DEFINE_EVENT(nfs_rename_event_done, name, \
766 TP_PROTO( \
767 const struct inode *old_dir, \
768 const struct dentry *old_dentry, \
769 const struct inode *new_dir, \
770 const struct dentry *new_dentry, \
771 int error \
772 ), \
773 TP_ARGS(old_dir, old_dentry, new_dir, \
774 new_dentry, error))
775
776DEFINE_NFS_RENAME_EVENT(nfs_rename_enter);
777DEFINE_NFS_RENAME_EVENT_DONE(nfs_rename_exit);
778
779DEFINE_NFS_RENAME_EVENT_DONE(nfs_sillyrename_rename);
780
781TRACE_EVENT(nfs_sillyrename_unlink,
782 TP_PROTO(
783 const struct nfs_unlinkdata *data,
784 int error
785 ),
786
787 TP_ARGS(data, error),
788
789 TP_STRUCT__entry(
790 __field(dev_t, dev)
Chuck Lever38a638a2019-06-19 10:33:58 -0400791 __field(unsigned long, error)
Trond Myklebust70ded202013-08-21 12:08:45 -0400792 __field(u64, dir)
793 __dynamic_array(char, name, data->args.name.len + 1)
794 ),
795
796 TP_fast_assign(
Al Viro884be172016-04-28 23:56:31 -0400797 struct inode *dir = d_inode(data->dentry->d_parent);
Trond Myklebust70ded202013-08-21 12:08:45 -0400798 size_t len = data->args.name.len;
799 __entry->dev = dir->i_sb->s_dev;
800 __entry->dir = NFS_FILEID(dir);
Chuck Lever38a638a2019-06-19 10:33:58 -0400801 __entry->error = -error;
Daniel Bristot de Oliveira752d5962016-07-01 20:44:36 -0300802 memcpy(__get_str(name),
Trond Myklebust70ded202013-08-21 12:08:45 -0400803 data->args.name.name, len);
Daniel Bristot de Oliveira752d5962016-07-01 20:44:36 -0300804 __get_str(name)[len] = 0;
Trond Myklebust70ded202013-08-21 12:08:45 -0400805 ),
806
807 TP_printk(
Chuck Lever38a638a2019-06-19 10:33:58 -0400808 "error=%ld (%s) name=%02x:%02x:%llu/%s",
Chuck Lever87915452021-10-22 16:17:03 -0400809 -__entry->error, show_nfs_status(__entry->error),
Trond Myklebust70ded202013-08-21 12:08:45 -0400810 MAJOR(__entry->dev), MINOR(__entry->dev),
811 (unsigned long long)__entry->dir,
812 __get_str(name)
813 )
814);
Chuck Lever8224b272017-08-21 15:00:49 -0400815
Chuck Leverd9f87742021-10-16 18:02:51 -0400816TRACE_EVENT(nfs_aop_readpage,
817 TP_PROTO(
818 const struct inode *inode,
819 struct page *page
820 ),
821
822 TP_ARGS(inode, page),
823
824 TP_STRUCT__entry(
825 __field(dev_t, dev)
826 __field(u32, fhandle)
827 __field(u64, fileid)
828 __field(u64, version)
829 __field(loff_t, offset)
830 ),
831
832 TP_fast_assign(
833 const struct nfs_inode *nfsi = NFS_I(inode);
834
835 __entry->dev = inode->i_sb->s_dev;
836 __entry->fileid = nfsi->fileid;
837 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
838 __entry->version = inode_peek_iversion_raw(inode);
839 __entry->offset = page_index(page) << PAGE_SHIFT;
840 ),
841
842 TP_printk(
843 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu offset=%lld",
844 MAJOR(__entry->dev), MINOR(__entry->dev),
845 (unsigned long long)__entry->fileid,
846 __entry->fhandle, __entry->version,
847 __entry->offset
848 )
849);
850
851TRACE_EVENT(nfs_aop_readpage_done,
852 TP_PROTO(
853 const struct inode *inode,
854 struct page *page,
855 int ret
856 ),
857
858 TP_ARGS(inode, page, ret),
859
860 TP_STRUCT__entry(
861 __field(dev_t, dev)
862 __field(u32, fhandle)
863 __field(int, ret)
864 __field(u64, fileid)
865 __field(u64, version)
866 __field(loff_t, offset)
867 ),
868
869 TP_fast_assign(
870 const struct nfs_inode *nfsi = NFS_I(inode);
871
872 __entry->dev = inode->i_sb->s_dev;
873 __entry->fileid = nfsi->fileid;
874 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
875 __entry->version = inode_peek_iversion_raw(inode);
876 __entry->offset = page_index(page) << PAGE_SHIFT;
877 __entry->ret = ret;
878 ),
879
880 TP_printk(
881 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu offset=%lld ret=%d",
882 MAJOR(__entry->dev), MINOR(__entry->dev),
883 (unsigned long long)__entry->fileid,
884 __entry->fhandle, __entry->version,
885 __entry->offset, __entry->ret
886 )
887);
888
889TRACE_EVENT(nfs_aop_readahead,
890 TP_PROTO(
891 const struct inode *inode,
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400892 struct page *page,
Chuck Leverd9f87742021-10-16 18:02:51 -0400893 unsigned int nr_pages
894 ),
895
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400896 TP_ARGS(inode, page, nr_pages),
Chuck Leverd9f87742021-10-16 18:02:51 -0400897
898 TP_STRUCT__entry(
899 __field(dev_t, dev)
900 __field(u32, fhandle)
901 __field(u64, fileid)
902 __field(u64, version)
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400903 __field(loff_t, offset)
Chuck Leverd9f87742021-10-16 18:02:51 -0400904 __field(unsigned int, nr_pages)
905 ),
906
907 TP_fast_assign(
908 const struct nfs_inode *nfsi = NFS_I(inode);
909
910 __entry->dev = inode->i_sb->s_dev;
911 __entry->fileid = nfsi->fileid;
912 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
913 __entry->version = inode_peek_iversion_raw(inode);
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400914 __entry->offset = page_index(page) << PAGE_SHIFT;
Chuck Leverd9f87742021-10-16 18:02:51 -0400915 __entry->nr_pages = nr_pages;
916 ),
917
918 TP_printk(
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400919 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu offset=%lld nr_pages=%u",
Chuck Leverd9f87742021-10-16 18:02:51 -0400920 MAJOR(__entry->dev), MINOR(__entry->dev),
921 (unsigned long long)__entry->fileid,
922 __entry->fhandle, __entry->version,
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400923 __entry->offset, __entry->nr_pages
Chuck Leverd9f87742021-10-16 18:02:51 -0400924 )
925);
926
927TRACE_EVENT(nfs_aop_readahead_done,
928 TP_PROTO(
929 const struct inode *inode,
930 unsigned int nr_pages,
931 int ret
932 ),
933
934 TP_ARGS(inode, nr_pages, ret),
935
936 TP_STRUCT__entry(
937 __field(dev_t, dev)
938 __field(u32, fhandle)
939 __field(int, ret)
940 __field(u64, fileid)
941 __field(u64, version)
Dave Wysochanskiedfa0b12021-11-02 15:51:55 -0400942 __field(loff_t, offset)
Chuck Leverd9f87742021-10-16 18:02:51 -0400943 __field(unsigned int, nr_pages)
944 ),
945
946 TP_fast_assign(
947 const struct nfs_inode *nfsi = NFS_I(inode);
948
949 __entry->dev = inode->i_sb->s_dev;
950 __entry->fileid = nfsi->fileid;
951 __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
952 __entry->version = inode_peek_iversion_raw(inode);
953 __entry->nr_pages = nr_pages;
954 __entry->ret = ret;
955 ),
956
957 TP_printk(
958 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu nr_pages=%u ret=%d",
959 MAJOR(__entry->dev), MINOR(__entry->dev),
960 (unsigned long long)__entry->fileid,
961 __entry->fhandle, __entry->version,
962 __entry->nr_pages, __entry->ret
963 )
964);
965
Chuck Lever8224b272017-08-21 15:00:49 -0400966TRACE_EVENT(nfs_initiate_read,
967 TP_PROTO(
Trond Myklebust23431722020-01-06 15:25:08 -0500968 const struct nfs_pgio_header *hdr
Chuck Lever8224b272017-08-21 15:00:49 -0400969 ),
970
Trond Myklebust23431722020-01-06 15:25:08 -0500971 TP_ARGS(hdr),
Chuck Lever8224b272017-08-21 15:00:49 -0400972
973 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -0400974 __field(dev_t, dev)
975 __field(u32, fhandle)
976 __field(u64, fileid)
Trond Myklebust23431722020-01-06 15:25:08 -0500977 __field(loff_t, offset)
978 __field(u32, count)
Chuck Lever8224b272017-08-21 15:00:49 -0400979 ),
980
981 TP_fast_assign(
Trond Myklebust23431722020-01-06 15:25:08 -0500982 const struct inode *inode = hdr->inode;
Chuck Lever8224b272017-08-21 15:00:49 -0400983 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust23431722020-01-06 15:25:08 -0500984 const struct nfs_fh *fh = hdr->args.fh ?
985 hdr->args.fh : &nfsi->fh;
Chuck Lever8224b272017-08-21 15:00:49 -0400986
Trond Myklebust23431722020-01-06 15:25:08 -0500987 __entry->offset = hdr->args.offset;
988 __entry->count = hdr->args.count;
Chuck Lever8224b272017-08-21 15:00:49 -0400989 __entry->dev = inode->i_sb->s_dev;
990 __entry->fileid = nfsi->fileid;
Trond Myklebust23431722020-01-06 15:25:08 -0500991 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -0400992 ),
993
994 TP_printk(
995 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust23431722020-01-06 15:25:08 -0500996 "offset=%lld count=%u",
Chuck Lever8224b272017-08-21 15:00:49 -0400997 MAJOR(__entry->dev), MINOR(__entry->dev),
998 (unsigned long long)__entry->fileid,
999 __entry->fhandle,
Trond Myklebust23431722020-01-06 15:25:08 -05001000 (long long)__entry->offset, __entry->count
Chuck Lever8224b272017-08-21 15:00:49 -04001001 )
1002);
1003
1004TRACE_EVENT(nfs_readpage_done,
1005 TP_PROTO(
Trond Myklebust23431722020-01-06 15:25:08 -05001006 const struct rpc_task *task,
1007 const struct nfs_pgio_header *hdr
Chuck Lever8224b272017-08-21 15:00:49 -04001008 ),
1009
Trond Myklebust23431722020-01-06 15:25:08 -05001010 TP_ARGS(task, hdr),
Chuck Lever8224b272017-08-21 15:00:49 -04001011
1012 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -04001013 __field(dev_t, dev)
1014 __field(u32, fhandle)
1015 __field(u64, fileid)
Trond Myklebust23431722020-01-06 15:25:08 -05001016 __field(loff_t, offset)
1017 __field(u32, arg_count)
1018 __field(u32, res_count)
1019 __field(bool, eof)
1020 __field(int, status)
Chuck Lever8224b272017-08-21 15:00:49 -04001021 ),
1022
1023 TP_fast_assign(
Trond Myklebust23431722020-01-06 15:25:08 -05001024 const struct inode *inode = hdr->inode;
Chuck Lever8224b272017-08-21 15:00:49 -04001025 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust23431722020-01-06 15:25:08 -05001026 const struct nfs_fh *fh = hdr->args.fh ?
1027 hdr->args.fh : &nfsi->fh;
Chuck Lever8224b272017-08-21 15:00:49 -04001028
Trond Myklebust23431722020-01-06 15:25:08 -05001029 __entry->status = task->tk_status;
1030 __entry->offset = hdr->args.offset;
1031 __entry->arg_count = hdr->args.count;
1032 __entry->res_count = hdr->res.count;
1033 __entry->eof = hdr->res.eof;
Chuck Lever8224b272017-08-21 15:00:49 -04001034 __entry->dev = inode->i_sb->s_dev;
1035 __entry->fileid = nfsi->fileid;
Trond Myklebust23431722020-01-06 15:25:08 -05001036 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -04001037 ),
1038
1039 TP_printk(
1040 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust23431722020-01-06 15:25:08 -05001041 "offset=%lld count=%u res=%u status=%d%s",
Chuck Lever8224b272017-08-21 15:00:49 -04001042 MAJOR(__entry->dev), MINOR(__entry->dev),
1043 (unsigned long long)__entry->fileid,
1044 __entry->fhandle,
Trond Myklebust23431722020-01-06 15:25:08 -05001045 (long long)__entry->offset, __entry->arg_count,
1046 __entry->res_count, __entry->status,
Chuck Lever8224b272017-08-21 15:00:49 -04001047 __entry->eof ? " eof" : ""
1048 )
1049);
1050
Chuck Leverfd2b6122020-05-12 17:14:05 -04001051TRACE_EVENT(nfs_readpage_short,
1052 TP_PROTO(
1053 const struct rpc_task *task,
1054 const struct nfs_pgio_header *hdr
1055 ),
1056
1057 TP_ARGS(task, hdr),
1058
1059 TP_STRUCT__entry(
1060 __field(dev_t, dev)
1061 __field(u32, fhandle)
1062 __field(u64, fileid)
1063 __field(loff_t, offset)
1064 __field(u32, arg_count)
1065 __field(u32, res_count)
1066 __field(bool, eof)
1067 __field(int, status)
1068 ),
1069
1070 TP_fast_assign(
1071 const struct inode *inode = hdr->inode;
1072 const struct nfs_inode *nfsi = NFS_I(inode);
1073 const struct nfs_fh *fh = hdr->args.fh ?
1074 hdr->args.fh : &nfsi->fh;
1075
1076 __entry->status = task->tk_status;
1077 __entry->offset = hdr->args.offset;
1078 __entry->arg_count = hdr->args.count;
1079 __entry->res_count = hdr->res.count;
1080 __entry->eof = hdr->res.eof;
1081 __entry->dev = inode->i_sb->s_dev;
1082 __entry->fileid = nfsi->fileid;
1083 __entry->fhandle = nfs_fhandle_hash(fh);
1084 ),
1085
1086 TP_printk(
1087 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1088 "offset=%lld count=%u res=%u status=%d%s",
1089 MAJOR(__entry->dev), MINOR(__entry->dev),
1090 (unsigned long long)__entry->fileid,
1091 __entry->fhandle,
1092 (long long)__entry->offset, __entry->arg_count,
1093 __entry->res_count, __entry->status,
1094 __entry->eof ? " eof" : ""
1095 )
1096);
1097
Chuck Levercd2ed9b2020-05-12 17:14:11 -04001098TRACE_EVENT(nfs_pgio_error,
1099 TP_PROTO(
1100 const struct nfs_pgio_header *hdr,
1101 int error,
1102 loff_t pos
1103 ),
1104
1105 TP_ARGS(hdr, error, pos),
1106
1107 TP_STRUCT__entry(
1108 __field(dev_t, dev)
1109 __field(u32, fhandle)
1110 __field(u64, fileid)
1111 __field(loff_t, offset)
1112 __field(u32, arg_count)
1113 __field(u32, res_count)
1114 __field(loff_t, pos)
1115 __field(int, status)
1116 ),
1117
1118 TP_fast_assign(
1119 const struct inode *inode = hdr->inode;
1120 const struct nfs_inode *nfsi = NFS_I(inode);
1121 const struct nfs_fh *fh = hdr->args.fh ?
1122 hdr->args.fh : &nfsi->fh;
1123
1124 __entry->status = error;
1125 __entry->offset = hdr->args.offset;
1126 __entry->arg_count = hdr->args.count;
1127 __entry->res_count = hdr->res.count;
1128 __entry->dev = inode->i_sb->s_dev;
1129 __entry->fileid = nfsi->fileid;
1130 __entry->fhandle = nfs_fhandle_hash(fh);
1131 ),
1132
1133 TP_printk("fileid=%02x:%02x:%llu fhandle=0x%08x "
1134 "offset=%lld count=%u res=%u pos=%llu status=%d",
1135 MAJOR(__entry->dev), MINOR(__entry->dev),
1136 (unsigned long long)__entry->fileid, __entry->fhandle,
1137 (long long)__entry->offset, __entry->arg_count, __entry->res_count,
1138 __entry->pos, __entry->status
1139 )
1140);
1141
Chuck Lever8224b272017-08-21 15:00:49 -04001142TRACE_EVENT(nfs_initiate_write,
1143 TP_PROTO(
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001144 const struct nfs_pgio_header *hdr
Chuck Lever8224b272017-08-21 15:00:49 -04001145 ),
1146
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001147 TP_ARGS(hdr),
Chuck Lever8224b272017-08-21 15:00:49 -04001148
1149 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -04001150 __field(dev_t, dev)
1151 __field(u32, fhandle)
1152 __field(u64, fileid)
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001153 __field(loff_t, offset)
1154 __field(u32, count)
Chuck Lever87915452021-10-22 16:17:03 -04001155 __field(unsigned long, stable)
Chuck Lever8224b272017-08-21 15:00:49 -04001156 ),
1157
1158 TP_fast_assign(
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001159 const struct inode *inode = hdr->inode;
Chuck Lever8224b272017-08-21 15:00:49 -04001160 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001161 const struct nfs_fh *fh = hdr->args.fh ?
1162 hdr->args.fh : &nfsi->fh;
Chuck Lever8224b272017-08-21 15:00:49 -04001163
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001164 __entry->offset = hdr->args.offset;
1165 __entry->count = hdr->args.count;
1166 __entry->stable = hdr->args.stable;
Chuck Lever8224b272017-08-21 15:00:49 -04001167 __entry->dev = inode->i_sb->s_dev;
1168 __entry->fileid = nfsi->fileid;
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001169 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -04001170 ),
1171
1172 TP_printk(
1173 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001174 "offset=%lld count=%u stable=%s",
Chuck Lever8224b272017-08-21 15:00:49 -04001175 MAJOR(__entry->dev), MINOR(__entry->dev),
1176 (unsigned long long)__entry->fileid,
1177 __entry->fhandle,
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001178 (long long)__entry->offset, __entry->count,
Chuck Lever87915452021-10-22 16:17:03 -04001179 show_nfs_stable_how(__entry->stable)
Chuck Lever8224b272017-08-21 15:00:49 -04001180 )
1181);
1182
1183TRACE_EVENT(nfs_writeback_done,
1184 TP_PROTO(
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001185 const struct rpc_task *task,
1186 const struct nfs_pgio_header *hdr
Chuck Lever8224b272017-08-21 15:00:49 -04001187 ),
1188
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001189 TP_ARGS(task, hdr),
Chuck Lever8224b272017-08-21 15:00:49 -04001190
1191 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -04001192 __field(dev_t, dev)
1193 __field(u32, fhandle)
1194 __field(u64, fileid)
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001195 __field(loff_t, offset)
1196 __field(u32, arg_count)
1197 __field(u32, res_count)
1198 __field(int, status)
Chuck Lever87915452021-10-22 16:17:03 -04001199 __field(unsigned long, stable)
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001200 __array(char, verifier, NFS4_VERIFIER_SIZE)
Chuck Lever8224b272017-08-21 15:00:49 -04001201 ),
1202
1203 TP_fast_assign(
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001204 const struct inode *inode = hdr->inode;
Chuck Lever8224b272017-08-21 15:00:49 -04001205 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001206 const struct nfs_fh *fh = hdr->args.fh ?
1207 hdr->args.fh : &nfsi->fh;
1208 const struct nfs_writeverf *verf = hdr->res.verf;
Chuck Lever8224b272017-08-21 15:00:49 -04001209
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001210 __entry->status = task->tk_status;
1211 __entry->offset = hdr->args.offset;
1212 __entry->arg_count = hdr->args.count;
1213 __entry->res_count = hdr->res.count;
1214 __entry->stable = verf->committed;
1215 memcpy(__entry->verifier,
1216 &verf->verifier,
1217 NFS4_VERIFIER_SIZE);
Chuck Lever8224b272017-08-21 15:00:49 -04001218 __entry->dev = inode->i_sb->s_dev;
1219 __entry->fileid = nfsi->fileid;
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001220 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -04001221 ),
1222
1223 TP_printk(
1224 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001225 "offset=%lld count=%u res=%u status=%d stable=%s "
1226 "verifier=%s",
Chuck Lever8224b272017-08-21 15:00:49 -04001227 MAJOR(__entry->dev), MINOR(__entry->dev),
1228 (unsigned long long)__entry->fileid,
1229 __entry->fhandle,
Trond Myklebust5bb2a7c2020-01-06 15:25:09 -05001230 (long long)__entry->offset, __entry->arg_count,
1231 __entry->res_count, __entry->status,
Chuck Lever87915452021-10-22 16:17:03 -04001232 show_nfs_stable_how(__entry->stable),
1233 show_nfs4_verifier(__entry->verifier)
Chuck Lever8224b272017-08-21 15:00:49 -04001234 )
1235);
1236
Chuck Lever861e1672019-12-23 10:28:33 -05001237DECLARE_EVENT_CLASS(nfs_page_error_class,
1238 TP_PROTO(
1239 const struct nfs_page *req,
1240 int error
1241 ),
1242
1243 TP_ARGS(req, error),
1244
1245 TP_STRUCT__entry(
1246 __field(const void *, req)
1247 __field(pgoff_t, index)
1248 __field(unsigned int, offset)
1249 __field(unsigned int, pgbase)
1250 __field(unsigned int, bytes)
1251 __field(int, error)
1252 ),
1253
1254 TP_fast_assign(
1255 __entry->req = req;
1256 __entry->index = req->wb_index;
1257 __entry->offset = req->wb_offset;
1258 __entry->pgbase = req->wb_pgbase;
1259 __entry->bytes = req->wb_bytes;
1260 __entry->error = error;
1261 ),
1262
1263 TP_printk(
1264 "req=%p index=%lu offset=%u pgbase=%u bytes=%u error=%d",
1265 __entry->req, __entry->index, __entry->offset,
1266 __entry->pgbase, __entry->bytes, __entry->error
1267 )
1268);
1269
1270#define DEFINE_NFS_PAGEERR_EVENT(name) \
1271 DEFINE_EVENT(nfs_page_error_class, name, \
1272 TP_PROTO( \
1273 const struct nfs_page *req, \
1274 int error \
1275 ), \
1276 TP_ARGS(req, error))
1277
1278DEFINE_NFS_PAGEERR_EVENT(nfs_write_error);
1279DEFINE_NFS_PAGEERR_EVENT(nfs_comp_error);
1280DEFINE_NFS_PAGEERR_EVENT(nfs_commit_error);
1281
Chuck Lever8224b272017-08-21 15:00:49 -04001282TRACE_EVENT(nfs_initiate_commit,
1283 TP_PROTO(
1284 const struct nfs_commit_data *data
1285 ),
1286
1287 TP_ARGS(data),
1288
1289 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -04001290 __field(dev_t, dev)
1291 __field(u32, fhandle)
1292 __field(u64, fileid)
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001293 __field(loff_t, offset)
1294 __field(u32, count)
Chuck Lever8224b272017-08-21 15:00:49 -04001295 ),
1296
1297 TP_fast_assign(
1298 const struct inode *inode = data->inode;
1299 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001300 const struct nfs_fh *fh = data->args.fh ?
1301 data->args.fh : &nfsi->fh;
Chuck Lever8224b272017-08-21 15:00:49 -04001302
1303 __entry->offset = data->args.offset;
1304 __entry->count = data->args.count;
1305 __entry->dev = inode->i_sb->s_dev;
1306 __entry->fileid = nfsi->fileid;
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001307 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -04001308 ),
1309
1310 TP_printk(
1311 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001312 "offset=%lld count=%u",
Chuck Lever8224b272017-08-21 15:00:49 -04001313 MAJOR(__entry->dev), MINOR(__entry->dev),
1314 (unsigned long long)__entry->fileid,
1315 __entry->fhandle,
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001316 (long long)__entry->offset, __entry->count
Chuck Lever8224b272017-08-21 15:00:49 -04001317 )
1318);
1319
1320TRACE_EVENT(nfs_commit_done,
1321 TP_PROTO(
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001322 const struct rpc_task *task,
Chuck Lever8224b272017-08-21 15:00:49 -04001323 const struct nfs_commit_data *data
1324 ),
1325
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001326 TP_ARGS(task, data),
Chuck Lever8224b272017-08-21 15:00:49 -04001327
1328 TP_STRUCT__entry(
Chuck Lever8224b272017-08-21 15:00:49 -04001329 __field(dev_t, dev)
1330 __field(u32, fhandle)
1331 __field(u64, fileid)
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001332 __field(loff_t, offset)
1333 __field(int, status)
Chuck Lever87915452021-10-22 16:17:03 -04001334 __field(unsigned long, stable)
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001335 __array(char, verifier, NFS4_VERIFIER_SIZE)
Chuck Lever8224b272017-08-21 15:00:49 -04001336 ),
1337
1338 TP_fast_assign(
1339 const struct inode *inode = data->inode;
1340 const struct nfs_inode *nfsi = NFS_I(inode);
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001341 const struct nfs_fh *fh = data->args.fh ?
1342 data->args.fh : &nfsi->fh;
1343 const struct nfs_writeverf *verf = data->res.verf;
Chuck Lever8224b272017-08-21 15:00:49 -04001344
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001345 __entry->status = task->tk_status;
Chuck Lever8224b272017-08-21 15:00:49 -04001346 __entry->offset = data->args.offset;
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001347 __entry->stable = verf->committed;
1348 memcpy(__entry->verifier,
1349 &verf->verifier,
1350 NFS4_VERIFIER_SIZE);
Chuck Lever8224b272017-08-21 15:00:49 -04001351 __entry->dev = inode->i_sb->s_dev;
1352 __entry->fileid = nfsi->fileid;
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001353 __entry->fhandle = nfs_fhandle_hash(fh);
Chuck Lever8224b272017-08-21 15:00:49 -04001354 ),
1355
1356 TP_printk(
1357 "fileid=%02x:%02x:%llu fhandle=0x%08x "
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001358 "offset=%lld status=%d stable=%s verifier=%s",
Chuck Lever8224b272017-08-21 15:00:49 -04001359 MAJOR(__entry->dev), MINOR(__entry->dev),
1360 (unsigned long long)__entry->fileid,
1361 __entry->fhandle,
Trond Myklebust7bdd2972020-01-06 15:25:10 -05001362 (long long)__entry->offset, __entry->status,
Chuck Lever87915452021-10-22 16:17:03 -04001363 show_nfs_stable_how(__entry->stable),
1364 show_nfs4_verifier(__entry->verifier)
Chuck Lever8224b272017-08-21 15:00:49 -04001365 )
1366);
1367
Trond Myklebust43622ea2019-11-01 15:33:55 -04001368TRACE_EVENT(nfs_fh_to_dentry,
1369 TP_PROTO(
1370 const struct super_block *sb,
1371 const struct nfs_fh *fh,
1372 u64 fileid,
1373 int error
1374 ),
1375
1376 TP_ARGS(sb, fh, fileid, error),
1377
1378 TP_STRUCT__entry(
1379 __field(int, error)
1380 __field(dev_t, dev)
1381 __field(u32, fhandle)
1382 __field(u64, fileid)
1383 ),
1384
1385 TP_fast_assign(
1386 __entry->error = error;
1387 __entry->dev = sb->s_dev;
1388 __entry->fileid = fileid;
1389 __entry->fhandle = nfs_fhandle_hash(fh);
1390 ),
1391
1392 TP_printk(
1393 "error=%d fileid=%02x:%02x:%llu fhandle=0x%08x ",
1394 __entry->error,
1395 MAJOR(__entry->dev), MINOR(__entry->dev),
1396 (unsigned long long)__entry->fileid,
1397 __entry->fhandle
1398 )
1399);
1400
Trond Myklebust3d66bae2021-04-01 13:54:19 -04001401DECLARE_EVENT_CLASS(nfs_xdr_event,
Chuck Leverf23f6582019-02-11 11:24:26 -05001402 TP_PROTO(
Chuck Lever62a92ba2019-06-19 10:34:09 -04001403 const struct xdr_stream *xdr,
Chuck Leverf23f6582019-02-11 11:24:26 -05001404 int error
1405 ),
1406
Chuck Lever62a92ba2019-06-19 10:34:09 -04001407 TP_ARGS(xdr, error),
Chuck Leverf23f6582019-02-11 11:24:26 -05001408
1409 TP_STRUCT__entry(
Chuck Lever62a92ba2019-06-19 10:34:09 -04001410 __field(unsigned int, task_id)
1411 __field(unsigned int, client_id)
1412 __field(u32, xid)
Chuck Lever5be59452020-05-12 17:14:00 -04001413 __field(int, version)
Chuck Lever38a638a2019-06-19 10:33:58 -04001414 __field(unsigned long, error)
Chuck Lever5be59452020-05-12 17:14:00 -04001415 __string(program,
1416 xdr->rqst->rq_task->tk_client->cl_program->name)
1417 __string(procedure,
1418 xdr->rqst->rq_task->tk_msg.rpc_proc->p_name)
Chuck Leverf23f6582019-02-11 11:24:26 -05001419 ),
1420
1421 TP_fast_assign(
Chuck Lever62a92ba2019-06-19 10:34:09 -04001422 const struct rpc_rqst *rqstp = xdr->rqst;
1423 const struct rpc_task *task = rqstp->rq_task;
1424
1425 __entry->task_id = task->tk_pid;
1426 __entry->client_id = task->tk_client->cl_clid;
1427 __entry->xid = be32_to_cpu(rqstp->rq_xid);
Chuck Lever5be59452020-05-12 17:14:00 -04001428 __entry->version = task->tk_client->cl_vers;
Chuck Leverf23f6582019-02-11 11:24:26 -05001429 __entry->error = error;
Chuck Lever5be59452020-05-12 17:14:00 -04001430 __assign_str(program,
Joe Perches78c14b32021-06-12 08:42:27 -07001431 task->tk_client->cl_program->name);
1432 __assign_str(procedure, task->tk_msg.rpc_proc->p_name);
Chuck Leverf23f6582019-02-11 11:24:26 -05001433 ),
1434
Chuck Leverb4776a32021-10-16 18:02:24 -04001435 TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
1436 " xid=0x%08x %sv%d %s error=%ld (%s)",
Chuck Lever62a92ba2019-06-19 10:34:09 -04001437 __entry->task_id, __entry->client_id, __entry->xid,
Chuck Lever5be59452020-05-12 17:14:00 -04001438 __get_str(program), __entry->version,
1439 __get_str(procedure), -__entry->error,
Chuck Lever87915452021-10-22 16:17:03 -04001440 show_nfs_status(__entry->error)
Chuck Leverf23f6582019-02-11 11:24:26 -05001441 )
1442);
Trond Myklebust3d66bae2021-04-01 13:54:19 -04001443#define DEFINE_NFS_XDR_EVENT(name) \
1444 DEFINE_EVENT(nfs_xdr_event, name, \
1445 TP_PROTO( \
1446 const struct xdr_stream *xdr, \
1447 int error \
1448 ), \
1449 TP_ARGS(xdr, error))
1450DEFINE_NFS_XDR_EVENT(nfs_xdr_status);
Trond Myklebusteb3d58c2021-04-01 14:03:26 -04001451DEFINE_NFS_XDR_EVENT(nfs_xdr_bad_filehandle);
Chuck Leverf23f6582019-02-11 11:24:26 -05001452
Trond Myklebustf4ce1292013-08-19 18:59:33 -04001453#endif /* _TRACE_NFS_H */
1454
1455#undef TRACE_INCLUDE_PATH
1456#define TRACE_INCLUDE_PATH .
1457#define TRACE_INCLUDE_FILE nfstrace
1458/* This part must be outside protection */
1459#include <trace/define_trace.h>