1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
6 #define TRACE_SYSTEM nfs
8 #if !defined(_TRACE_NFS_H) || defined(TRACE_HEADER_MULTI_READ)
11 #include <linux/tracepoint.h>
12 #include <linux/iversion.h>
14 TRACE_DEFINE_ENUM(DT_UNKNOWN
);
15 TRACE_DEFINE_ENUM(DT_FIFO
);
16 TRACE_DEFINE_ENUM(DT_CHR
);
17 TRACE_DEFINE_ENUM(DT_DIR
);
18 TRACE_DEFINE_ENUM(DT_BLK
);
19 TRACE_DEFINE_ENUM(DT_REG
);
20 TRACE_DEFINE_ENUM(DT_LNK
);
21 TRACE_DEFINE_ENUM(DT_SOCK
);
22 TRACE_DEFINE_ENUM(DT_WHT
);
24 #define nfs_show_file_type(ftype) \
25 __print_symbolic(ftype, \
26 { DT_UNKNOWN, "UNKNOWN" }, \
27 { DT_FIFO, "FIFO" }, \
33 { DT_SOCK, "SOCK" }, \
36 TRACE_DEFINE_ENUM(NFS_INO_INVALID_DATA
);
37 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ATIME
);
38 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ACCESS
);
39 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ACL
);
40 TRACE_DEFINE_ENUM(NFS_INO_REVAL_PAGECACHE
);
41 TRACE_DEFINE_ENUM(NFS_INO_REVAL_FORCED
);
42 TRACE_DEFINE_ENUM(NFS_INO_INVALID_LABEL
);
43 TRACE_DEFINE_ENUM(NFS_INO_INVALID_CHANGE
);
44 TRACE_DEFINE_ENUM(NFS_INO_INVALID_CTIME
);
45 TRACE_DEFINE_ENUM(NFS_INO_INVALID_MTIME
);
46 TRACE_DEFINE_ENUM(NFS_INO_INVALID_SIZE
);
47 TRACE_DEFINE_ENUM(NFS_INO_INVALID_OTHER
);
49 #define nfs_show_cache_validity(v) \
50 __print_flags(v, "|", \
51 { NFS_INO_INVALID_DATA, "INVALID_DATA" }, \
52 { NFS_INO_INVALID_ATIME, "INVALID_ATIME" }, \
53 { NFS_INO_INVALID_ACCESS, "INVALID_ACCESS" }, \
54 { NFS_INO_INVALID_ACL, "INVALID_ACL" }, \
55 { NFS_INO_REVAL_PAGECACHE, "REVAL_PAGECACHE" }, \
56 { NFS_INO_REVAL_FORCED, "REVAL_FORCED" }, \
57 { NFS_INO_INVALID_LABEL, "INVALID_LABEL" }, \
58 { NFS_INO_INVALID_CHANGE, "INVALID_CHANGE" }, \
59 { NFS_INO_INVALID_CTIME, "INVALID_CTIME" }, \
60 { NFS_INO_INVALID_MTIME, "INVALID_MTIME" }, \
61 { NFS_INO_INVALID_SIZE, "INVALID_SIZE" }, \
62 { NFS_INO_INVALID_OTHER, "INVALID_OTHER" })
64 TRACE_DEFINE_ENUM(NFS_INO_ADVISE_RDPLUS
);
65 TRACE_DEFINE_ENUM(NFS_INO_STALE
);
66 TRACE_DEFINE_ENUM(NFS_INO_ACL_LRU_SET
);
67 TRACE_DEFINE_ENUM(NFS_INO_INVALIDATING
);
68 TRACE_DEFINE_ENUM(NFS_INO_FSCACHE
);
69 TRACE_DEFINE_ENUM(NFS_INO_FSCACHE_LOCK
);
70 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTCOMMIT
);
71 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTCOMMITTING
);
72 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTSTATS
);
73 TRACE_DEFINE_ENUM(NFS_INO_ODIRECT
);
75 #define nfs_show_nfsi_flags(v) \
76 __print_flags(v, "|", \
77 { BIT(NFS_INO_ADVISE_RDPLUS), "ADVISE_RDPLUS" }, \
78 { BIT(NFS_INO_STALE), "STALE" }, \
79 { BIT(NFS_INO_ACL_LRU_SET), "ACL_LRU_SET" }, \
80 { BIT(NFS_INO_INVALIDATING), "INVALIDATING" }, \
81 { BIT(NFS_INO_FSCACHE), "FSCACHE" }, \
82 { BIT(NFS_INO_FSCACHE_LOCK), "FSCACHE_LOCK" }, \
83 { BIT(NFS_INO_LAYOUTCOMMIT), "NEED_LAYOUTCOMMIT" }, \
84 { BIT(NFS_INO_LAYOUTCOMMITTING), "LAYOUTCOMMIT" }, \
85 { BIT(NFS_INO_LAYOUTSTATS), "LAYOUTSTATS" }, \
86 { BIT(NFS_INO_ODIRECT), "ODIRECT" })
88 DECLARE_EVENT_CLASS(nfs_inode_event
,
90 const struct inode
*inode
103 const struct nfs_inode
*nfsi
= NFS_I(inode
);
104 __entry
->dev
= inode
->i_sb
->s_dev
;
105 __entry
->fileid
= nfsi
->fileid
;
106 __entry
->fhandle
= nfs_fhandle_hash(&nfsi
->fh
);
107 __entry
->version
= inode_peek_iversion_raw(inode
);
111 "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu ",
112 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
113 (unsigned long long)__entry
->fileid
,
115 (unsigned long long)__entry
->version
119 DECLARE_EVENT_CLASS(nfs_inode_event_done
,
121 const struct inode
*inode
,
125 TP_ARGS(inode
, error
),
128 __field(unsigned long, error
)
130 __field(u32
, fhandle
)
131 __field(unsigned char, type
)
133 __field(u64
, version
)
134 __field(loff_t
, size
)
135 __field(unsigned long, nfsi_flags
)
136 __field(unsigned long, cache_validity
)
140 const struct nfs_inode
*nfsi
= NFS_I(inode
);
141 __entry
->error
= error
< 0 ? -error
: 0;
142 __entry
->dev
= inode
->i_sb
->s_dev
;
143 __entry
->fileid
= nfsi
->fileid
;
144 __entry
->fhandle
= nfs_fhandle_hash(&nfsi
->fh
);
145 __entry
->type
= nfs_umode_to_dtype(inode
->i_mode
);
146 __entry
->version
= inode_peek_iversion_raw(inode
);
147 __entry
->size
= i_size_read(inode
);
148 __entry
->nfsi_flags
= nfsi
->flags
;
149 __entry
->cache_validity
= nfsi
->cache_validity
;
153 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
154 "type=%u (%s) version=%llu size=%lld "
155 "cache_validity=0x%lx (%s) nfs_flags=0x%lx (%s)",
156 -__entry
->error
, nfs_show_status(__entry
->error
),
157 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
158 (unsigned long long)__entry
->fileid
,
161 nfs_show_file_type(__entry
->type
),
162 (unsigned long long)__entry
->version
,
163 (long long)__entry
->size
,
164 __entry
->cache_validity
,
165 nfs_show_cache_validity(__entry
->cache_validity
),
167 nfs_show_nfsi_flags(__entry
->nfsi_flags
)
171 #define DEFINE_NFS_INODE_EVENT(name) \
172 DEFINE_EVENT(nfs_inode_event, name, \
174 const struct inode *inode \
177 #define DEFINE_NFS_INODE_EVENT_DONE(name) \
178 DEFINE_EVENT(nfs_inode_event_done, name, \
180 const struct inode *inode, \
183 TP_ARGS(inode, error))
184 DEFINE_NFS_INODE_EVENT(nfs_set_inode_stale
);
185 DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter
);
186 DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_exit
);
187 DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_enter
);
188 DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_inode_exit
);
189 DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_enter
);
190 DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_mapping_exit
);
191 DEFINE_NFS_INODE_EVENT(nfs_getattr_enter
);
192 DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit
);
193 DEFINE_NFS_INODE_EVENT(nfs_setattr_enter
);
194 DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit
);
195 DEFINE_NFS_INODE_EVENT(nfs_writeback_page_enter
);
196 DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_page_exit
);
197 DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_enter
);
198 DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit
);
199 DEFINE_NFS_INODE_EVENT(nfs_fsync_enter
);
200 DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit
);
201 DEFINE_NFS_INODE_EVENT(nfs_access_enter
);
203 TRACE_EVENT(nfs_access_exit
,
205 const struct inode
*inode
,
207 unsigned int permitted
,
211 TP_ARGS(inode
, mask
, permitted
, error
),
214 __field(unsigned long, error
)
216 __field(u32
, fhandle
)
217 __field(unsigned char, type
)
219 __field(u64
, version
)
220 __field(loff_t
, size
)
221 __field(unsigned long, nfsi_flags
)
222 __field(unsigned long, cache_validity
)
223 __field(unsigned int, mask
)
224 __field(unsigned int, permitted
)
228 const struct nfs_inode
*nfsi
= NFS_I(inode
);
229 __entry
->error
= error
< 0 ? -error
: 0;
230 __entry
->dev
= inode
->i_sb
->s_dev
;
231 __entry
->fileid
= nfsi
->fileid
;
232 __entry
->fhandle
= nfs_fhandle_hash(&nfsi
->fh
);
233 __entry
->type
= nfs_umode_to_dtype(inode
->i_mode
);
234 __entry
->version
= inode_peek_iversion_raw(inode
);
235 __entry
->size
= i_size_read(inode
);
236 __entry
->nfsi_flags
= nfsi
->flags
;
237 __entry
->cache_validity
= nfsi
->cache_validity
;
238 __entry
->mask
= mask
;
239 __entry
->permitted
= permitted
;
243 "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
244 "type=%u (%s) version=%llu size=%lld "
245 "cache_validity=0x%lx (%s) nfs_flags=0x%lx (%s) "
246 "mask=0x%x permitted=0x%x",
247 -__entry
->error
, nfs_show_status(__entry
->error
),
248 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
249 (unsigned long long)__entry
->fileid
,
252 nfs_show_file_type(__entry
->type
),
253 (unsigned long long)__entry
->version
,
254 (long long)__entry
->size
,
255 __entry
->cache_validity
,
256 nfs_show_cache_validity(__entry
->cache_validity
),
258 nfs_show_nfsi_flags(__entry
->nfsi_flags
),
259 __entry
->mask
, __entry
->permitted
263 TRACE_DEFINE_ENUM(LOOKUP_FOLLOW
);
264 TRACE_DEFINE_ENUM(LOOKUP_DIRECTORY
);
265 TRACE_DEFINE_ENUM(LOOKUP_AUTOMOUNT
);
266 TRACE_DEFINE_ENUM(LOOKUP_PARENT
);
267 TRACE_DEFINE_ENUM(LOOKUP_REVAL
);
268 TRACE_DEFINE_ENUM(LOOKUP_RCU
);
269 TRACE_DEFINE_ENUM(LOOKUP_OPEN
);
270 TRACE_DEFINE_ENUM(LOOKUP_CREATE
);
271 TRACE_DEFINE_ENUM(LOOKUP_EXCL
);
272 TRACE_DEFINE_ENUM(LOOKUP_RENAME_TARGET
);
273 TRACE_DEFINE_ENUM(LOOKUP_JUMPED
);
274 TRACE_DEFINE_ENUM(LOOKUP_ROOT
);
275 TRACE_DEFINE_ENUM(LOOKUP_EMPTY
);
276 TRACE_DEFINE_ENUM(LOOKUP_DOWN
);
278 #define show_lookup_flags(flags) \
279 __print_flags(flags, "|", \
280 { LOOKUP_FOLLOW, "FOLLOW" }, \
281 { LOOKUP_DIRECTORY, "DIRECTORY" }, \
282 { LOOKUP_AUTOMOUNT, "AUTOMOUNT" }, \
283 { LOOKUP_PARENT, "PARENT" }, \
284 { LOOKUP_REVAL, "REVAL" }, \
285 { LOOKUP_RCU, "RCU" }, \
286 { LOOKUP_OPEN, "OPEN" }, \
287 { LOOKUP_CREATE, "CREATE" }, \
288 { LOOKUP_EXCL, "EXCL" }, \
289 { LOOKUP_RENAME_TARGET, "RENAME_TARGET" }, \
290 { LOOKUP_JUMPED, "JUMPED" }, \
291 { LOOKUP_ROOT, "ROOT" }, \
292 { LOOKUP_EMPTY, "EMPTY" }, \
293 { LOOKUP_DOWN, "DOWN" })
295 DECLARE_EVENT_CLASS(nfs_lookup_event
,
297 const struct inode
*dir
,
298 const struct dentry
*dentry
,
302 TP_ARGS(dir
, dentry
, flags
),
305 __field(unsigned long, flags
)
308 __string(name
, dentry
->d_name
.name
)
312 __entry
->dev
= dir
->i_sb
->s_dev
;
313 __entry
->dir
= NFS_FILEID(dir
);
314 __entry
->flags
= flags
;
315 __assign_str(name
, dentry
->d_name
.name
);
319 "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
321 show_lookup_flags(__entry
->flags
),
322 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
323 (unsigned long long)__entry
->dir
,
328 #define DEFINE_NFS_LOOKUP_EVENT(name) \
329 DEFINE_EVENT(nfs_lookup_event, name, \
331 const struct inode *dir, \
332 const struct dentry *dentry, \
335 TP_ARGS(dir, dentry, flags))
337 DECLARE_EVENT_CLASS(nfs_lookup_event_done
,
339 const struct inode
*dir
,
340 const struct dentry
*dentry
,
345 TP_ARGS(dir
, dentry
, flags
, error
),
348 __field(unsigned long, error
)
349 __field(unsigned long, flags
)
352 __string(name
, dentry
->d_name
.name
)
356 __entry
->dev
= dir
->i_sb
->s_dev
;
357 __entry
->dir
= NFS_FILEID(dir
);
358 __entry
->error
= error
< 0 ? -error
: 0;
359 __entry
->flags
= flags
;
360 __assign_str(name
, dentry
->d_name
.name
);
364 "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
365 -__entry
->error
, nfs_show_status(__entry
->error
),
367 show_lookup_flags(__entry
->flags
),
368 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
369 (unsigned long long)__entry
->dir
,
374 #define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \
375 DEFINE_EVENT(nfs_lookup_event_done, name, \
377 const struct inode *dir, \
378 const struct dentry *dentry, \
379 unsigned int flags, \
382 TP_ARGS(dir, dentry, flags, error))
384 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter
);
385 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit
);
386 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_enter
);
387 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revalidate_exit
);
389 TRACE_DEFINE_ENUM(O_WRONLY
);
390 TRACE_DEFINE_ENUM(O_RDWR
);
391 TRACE_DEFINE_ENUM(O_CREAT
);
392 TRACE_DEFINE_ENUM(O_EXCL
);
393 TRACE_DEFINE_ENUM(O_NOCTTY
);
394 TRACE_DEFINE_ENUM(O_TRUNC
);
395 TRACE_DEFINE_ENUM(O_APPEND
);
396 TRACE_DEFINE_ENUM(O_NONBLOCK
);
397 TRACE_DEFINE_ENUM(O_DSYNC
);
398 TRACE_DEFINE_ENUM(O_DIRECT
);
399 TRACE_DEFINE_ENUM(O_LARGEFILE
);
400 TRACE_DEFINE_ENUM(O_DIRECTORY
);
401 TRACE_DEFINE_ENUM(O_NOFOLLOW
);
402 TRACE_DEFINE_ENUM(O_NOATIME
);
403 TRACE_DEFINE_ENUM(O_CLOEXEC
);
405 #define show_open_flags(flags) \
406 __print_flags(flags, "|", \
407 { O_WRONLY, "O_WRONLY" }, \
408 { O_RDWR, "O_RDWR" }, \
409 { O_CREAT, "O_CREAT" }, \
410 { O_EXCL, "O_EXCL" }, \
411 { O_NOCTTY, "O_NOCTTY" }, \
412 { O_TRUNC, "O_TRUNC" }, \
413 { O_APPEND, "O_APPEND" }, \
414 { O_NONBLOCK, "O_NONBLOCK" }, \
415 { O_DSYNC, "O_DSYNC" }, \
416 { O_DIRECT, "O_DIRECT" }, \
417 { O_LARGEFILE, "O_LARGEFILE" }, \
418 { O_DIRECTORY, "O_DIRECTORY" }, \
419 { O_NOFOLLOW, "O_NOFOLLOW" }, \
420 { O_NOATIME, "O_NOATIME" }, \
421 { O_CLOEXEC, "O_CLOEXEC" })
423 TRACE_DEFINE_ENUM(FMODE_READ
);
424 TRACE_DEFINE_ENUM(FMODE_WRITE
);
425 TRACE_DEFINE_ENUM(FMODE_EXEC
);
427 #define show_fmode_flags(mode) \
428 __print_flags(mode, "|", \
429 { ((__force unsigned long)FMODE_READ), "READ" }, \
430 { ((__force unsigned long)FMODE_WRITE), "WRITE" }, \
431 { ((__force unsigned long)FMODE_EXEC), "EXEC" })
433 TRACE_EVENT(nfs_atomic_open_enter
,
435 const struct inode
*dir
,
436 const struct nfs_open_context
*ctx
,
440 TP_ARGS(dir
, ctx
, flags
),
443 __field(unsigned long, flags
)
444 __field(unsigned int, fmode
)
447 __string(name
, ctx
->dentry
->d_name
.name
)
451 __entry
->dev
= dir
->i_sb
->s_dev
;
452 __entry
->dir
= NFS_FILEID(dir
);
453 __entry
->flags
= flags
;
454 __entry
->fmode
= (__force
unsigned int)ctx
->mode
;
455 __assign_str(name
, ctx
->dentry
->d_name
.name
);
459 "flags=0x%lx (%s) fmode=%s name=%02x:%02x:%llu/%s",
461 show_open_flags(__entry
->flags
),
462 show_fmode_flags(__entry
->fmode
),
463 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
464 (unsigned long long)__entry
->dir
,
469 TRACE_EVENT(nfs_atomic_open_exit
,
471 const struct inode
*dir
,
472 const struct nfs_open_context
*ctx
,
477 TP_ARGS(dir
, ctx
, flags
, error
),
480 __field(unsigned long, error
)
481 __field(unsigned long, flags
)
482 __field(unsigned int, fmode
)
485 __string(name
, ctx
->dentry
->d_name
.name
)
489 __entry
->error
= -error
;
490 __entry
->dev
= dir
->i_sb
->s_dev
;
491 __entry
->dir
= NFS_FILEID(dir
);
492 __entry
->flags
= flags
;
493 __entry
->fmode
= (__force
unsigned int)ctx
->mode
;
494 __assign_str(name
, ctx
->dentry
->d_name
.name
);
498 "error=%ld (%s) flags=0x%lx (%s) fmode=%s "
499 "name=%02x:%02x:%llu/%s",
500 -__entry
->error
, nfs_show_status(__entry
->error
),
502 show_open_flags(__entry
->flags
),
503 show_fmode_flags(__entry
->fmode
),
504 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
505 (unsigned long long)__entry
->dir
,
510 TRACE_EVENT(nfs_create_enter
,
512 const struct inode
*dir
,
513 const struct dentry
*dentry
,
517 TP_ARGS(dir
, dentry
, flags
),
520 __field(unsigned long, flags
)
523 __string(name
, dentry
->d_name
.name
)
527 __entry
->dev
= dir
->i_sb
->s_dev
;
528 __entry
->dir
= NFS_FILEID(dir
);
529 __entry
->flags
= flags
;
530 __assign_str(name
, dentry
->d_name
.name
);
534 "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
536 show_open_flags(__entry
->flags
),
537 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
538 (unsigned long long)__entry
->dir
,
543 TRACE_EVENT(nfs_create_exit
,
545 const struct inode
*dir
,
546 const struct dentry
*dentry
,
551 TP_ARGS(dir
, dentry
, flags
, error
),
554 __field(unsigned long, error
)
555 __field(unsigned long, flags
)
558 __string(name
, dentry
->d_name
.name
)
562 __entry
->error
= -error
;
563 __entry
->dev
= dir
->i_sb
->s_dev
;
564 __entry
->dir
= NFS_FILEID(dir
);
565 __entry
->flags
= flags
;
566 __assign_str(name
, dentry
->d_name
.name
);
570 "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
571 -__entry
->error
, nfs_show_status(__entry
->error
),
573 show_open_flags(__entry
->flags
),
574 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
575 (unsigned long long)__entry
->dir
,
580 DECLARE_EVENT_CLASS(nfs_directory_event
,
582 const struct inode
*dir
,
583 const struct dentry
*dentry
586 TP_ARGS(dir
, dentry
),
591 __string(name
, dentry
->d_name
.name
)
595 __entry
->dev
= dir
->i_sb
->s_dev
;
596 __entry
->dir
= NFS_FILEID(dir
);
597 __assign_str(name
, dentry
->d_name
.name
);
601 "name=%02x:%02x:%llu/%s",
602 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
603 (unsigned long long)__entry
->dir
,
608 #define DEFINE_NFS_DIRECTORY_EVENT(name) \
609 DEFINE_EVENT(nfs_directory_event, name, \
611 const struct inode *dir, \
612 const struct dentry *dentry \
614 TP_ARGS(dir, dentry))
616 DECLARE_EVENT_CLASS(nfs_directory_event_done
,
618 const struct inode
*dir
,
619 const struct dentry
*dentry
,
623 TP_ARGS(dir
, dentry
, error
),
626 __field(unsigned long, error
)
629 __string(name
, dentry
->d_name
.name
)
633 __entry
->dev
= dir
->i_sb
->s_dev
;
634 __entry
->dir
= NFS_FILEID(dir
);
635 __entry
->error
= error
< 0 ? -error
: 0;
636 __assign_str(name
, dentry
->d_name
.name
);
640 "error=%ld (%s) name=%02x:%02x:%llu/%s",
641 -__entry
->error
, nfs_show_status(__entry
->error
),
642 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
643 (unsigned long long)__entry
->dir
,
648 #define DEFINE_NFS_DIRECTORY_EVENT_DONE(name) \
649 DEFINE_EVENT(nfs_directory_event_done, name, \
651 const struct inode *dir, \
652 const struct dentry *dentry, \
655 TP_ARGS(dir, dentry, error))
657 DEFINE_NFS_DIRECTORY_EVENT(nfs_mknod_enter
);
658 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mknod_exit
);
659 DEFINE_NFS_DIRECTORY_EVENT(nfs_mkdir_enter
);
660 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mkdir_exit
);
661 DEFINE_NFS_DIRECTORY_EVENT(nfs_rmdir_enter
);
662 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_rmdir_exit
);
663 DEFINE_NFS_DIRECTORY_EVENT(nfs_remove_enter
);
664 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_remove_exit
);
665 DEFINE_NFS_DIRECTORY_EVENT(nfs_unlink_enter
);
666 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exit
);
667 DEFINE_NFS_DIRECTORY_EVENT(nfs_symlink_enter
);
668 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_symlink_exit
);
670 TRACE_EVENT(nfs_link_enter
,
672 const struct inode
*inode
,
673 const struct inode
*dir
,
674 const struct dentry
*dentry
677 TP_ARGS(inode
, dir
, dentry
),
683 __string(name
, dentry
->d_name
.name
)
687 __entry
->dev
= inode
->i_sb
->s_dev
;
688 __entry
->fileid
= NFS_FILEID(inode
);
689 __entry
->dir
= NFS_FILEID(dir
);
690 __assign_str(name
, dentry
->d_name
.name
);
694 "fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
695 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
697 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
698 (unsigned long long)__entry
->dir
,
703 TRACE_EVENT(nfs_link_exit
,
705 const struct inode
*inode
,
706 const struct inode
*dir
,
707 const struct dentry
*dentry
,
711 TP_ARGS(inode
, dir
, dentry
, error
),
714 __field(unsigned long, error
)
718 __string(name
, dentry
->d_name
.name
)
722 __entry
->dev
= inode
->i_sb
->s_dev
;
723 __entry
->fileid
= NFS_FILEID(inode
);
724 __entry
->dir
= NFS_FILEID(dir
);
725 __entry
->error
= error
< 0 ? -error
: 0;
726 __assign_str(name
, dentry
->d_name
.name
);
730 "error=%ld (%s) fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
731 -__entry
->error
, nfs_show_status(__entry
->error
),
732 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
734 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
735 (unsigned long long)__entry
->dir
,
740 DECLARE_EVENT_CLASS(nfs_rename_event
,
742 const struct inode
*old_dir
,
743 const struct dentry
*old_dentry
,
744 const struct inode
*new_dir
,
745 const struct dentry
*new_dentry
748 TP_ARGS(old_dir
, old_dentry
, new_dir
, new_dentry
),
752 __field(u64
, old_dir
)
753 __field(u64
, new_dir
)
754 __string(old_name
, old_dentry
->d_name
.name
)
755 __string(new_name
, new_dentry
->d_name
.name
)
759 __entry
->dev
= old_dir
->i_sb
->s_dev
;
760 __entry
->old_dir
= NFS_FILEID(old_dir
);
761 __entry
->new_dir
= NFS_FILEID(new_dir
);
762 __assign_str(old_name
, old_dentry
->d_name
.name
);
763 __assign_str(new_name
, new_dentry
->d_name
.name
);
767 "old_name=%02x:%02x:%llu/%s new_name=%02x:%02x:%llu/%s",
768 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
769 (unsigned long long)__entry
->old_dir
,
771 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
772 (unsigned long long)__entry
->new_dir
,
776 #define DEFINE_NFS_RENAME_EVENT(name) \
777 DEFINE_EVENT(nfs_rename_event, name, \
779 const struct inode *old_dir, \
780 const struct dentry *old_dentry, \
781 const struct inode *new_dir, \
782 const struct dentry *new_dentry \
784 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
786 DECLARE_EVENT_CLASS(nfs_rename_event_done
,
788 const struct inode
*old_dir
,
789 const struct dentry
*old_dentry
,
790 const struct inode
*new_dir
,
791 const struct dentry
*new_dentry
,
795 TP_ARGS(old_dir
, old_dentry
, new_dir
, new_dentry
, error
),
799 __field(unsigned long, error
)
800 __field(u64
, old_dir
)
801 __string(old_name
, old_dentry
->d_name
.name
)
802 __field(u64
, new_dir
)
803 __string(new_name
, new_dentry
->d_name
.name
)
807 __entry
->dev
= old_dir
->i_sb
->s_dev
;
808 __entry
->error
= -error
;
809 __entry
->old_dir
= NFS_FILEID(old_dir
);
810 __entry
->new_dir
= NFS_FILEID(new_dir
);
811 __assign_str(old_name
, old_dentry
->d_name
.name
);
812 __assign_str(new_name
, new_dentry
->d_name
.name
);
816 "error=%ld (%s) old_name=%02x:%02x:%llu/%s "
817 "new_name=%02x:%02x:%llu/%s",
818 -__entry
->error
, nfs_show_status(__entry
->error
),
819 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
820 (unsigned long long)__entry
->old_dir
,
822 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
823 (unsigned long long)__entry
->new_dir
,
827 #define DEFINE_NFS_RENAME_EVENT_DONE(name) \
828 DEFINE_EVENT(nfs_rename_event_done, name, \
830 const struct inode *old_dir, \
831 const struct dentry *old_dentry, \
832 const struct inode *new_dir, \
833 const struct dentry *new_dentry, \
836 TP_ARGS(old_dir, old_dentry, new_dir, \
839 DEFINE_NFS_RENAME_EVENT(nfs_rename_enter
);
840 DEFINE_NFS_RENAME_EVENT_DONE(nfs_rename_exit
);
842 DEFINE_NFS_RENAME_EVENT_DONE(nfs_sillyrename_rename
);
844 TRACE_EVENT(nfs_sillyrename_unlink
,
846 const struct nfs_unlinkdata
*data
,
850 TP_ARGS(data
, error
),
854 __field(unsigned long, error
)
856 __dynamic_array(char, name
, data
->args
.name
.len
+ 1)
860 struct inode
*dir
= d_inode(data
->dentry
->d_parent
);
861 size_t len
= data
->args
.name
.len
;
862 __entry
->dev
= dir
->i_sb
->s_dev
;
863 __entry
->dir
= NFS_FILEID(dir
);
864 __entry
->error
= -error
;
865 memcpy(__get_str(name
),
866 data
->args
.name
.name
, len
);
867 __get_str(name
)[len
] = 0;
871 "error=%ld (%s) name=%02x:%02x:%llu/%s",
872 -__entry
->error
, nfs_show_status(__entry
->error
),
873 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
874 (unsigned long long)__entry
->dir
,
879 TRACE_EVENT(nfs_initiate_read
,
881 const struct nfs_pgio_header
*hdr
888 __field(u32
, fhandle
)
890 __field(loff_t
, offset
)
895 const struct inode
*inode
= hdr
->inode
;
896 const struct nfs_inode
*nfsi
= NFS_I(inode
);
897 const struct nfs_fh
*fh
= hdr
->args
.fh
?
898 hdr
->args
.fh
: &nfsi
->fh
;
900 __entry
->offset
= hdr
->args
.offset
;
901 __entry
->count
= hdr
->args
.count
;
902 __entry
->dev
= inode
->i_sb
->s_dev
;
903 __entry
->fileid
= nfsi
->fileid
;
904 __entry
->fhandle
= nfs_fhandle_hash(fh
);
908 "fileid=%02x:%02x:%llu fhandle=0x%08x "
909 "offset=%lld count=%u",
910 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
911 (unsigned long long)__entry
->fileid
,
913 (long long)__entry
->offset
, __entry
->count
917 TRACE_EVENT(nfs_readpage_done
,
919 const struct rpc_task
*task
,
920 const struct nfs_pgio_header
*hdr
927 __field(u32
, fhandle
)
929 __field(loff_t
, offset
)
930 __field(u32
, arg_count
)
931 __field(u32
, res_count
)
937 const struct inode
*inode
= hdr
->inode
;
938 const struct nfs_inode
*nfsi
= NFS_I(inode
);
939 const struct nfs_fh
*fh
= hdr
->args
.fh
?
940 hdr
->args
.fh
: &nfsi
->fh
;
942 __entry
->status
= task
->tk_status
;
943 __entry
->offset
= hdr
->args
.offset
;
944 __entry
->arg_count
= hdr
->args
.count
;
945 __entry
->res_count
= hdr
->res
.count
;
946 __entry
->eof
= hdr
->res
.eof
;
947 __entry
->dev
= inode
->i_sb
->s_dev
;
948 __entry
->fileid
= nfsi
->fileid
;
949 __entry
->fhandle
= nfs_fhandle_hash(fh
);
953 "fileid=%02x:%02x:%llu fhandle=0x%08x "
954 "offset=%lld count=%u res=%u status=%d%s",
955 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
956 (unsigned long long)__entry
->fileid
,
958 (long long)__entry
->offset
, __entry
->arg_count
,
959 __entry
->res_count
, __entry
->status
,
960 __entry
->eof
? " eof" : ""
964 TRACE_EVENT(nfs_readpage_short
,
966 const struct rpc_task
*task
,
967 const struct nfs_pgio_header
*hdr
974 __field(u32
, fhandle
)
976 __field(loff_t
, offset
)
977 __field(u32
, arg_count
)
978 __field(u32
, res_count
)
984 const struct inode
*inode
= hdr
->inode
;
985 const struct nfs_inode
*nfsi
= NFS_I(inode
);
986 const struct nfs_fh
*fh
= hdr
->args
.fh
?
987 hdr
->args
.fh
: &nfsi
->fh
;
989 __entry
->status
= task
->tk_status
;
990 __entry
->offset
= hdr
->args
.offset
;
991 __entry
->arg_count
= hdr
->args
.count
;
992 __entry
->res_count
= hdr
->res
.count
;
993 __entry
->eof
= hdr
->res
.eof
;
994 __entry
->dev
= inode
->i_sb
->s_dev
;
995 __entry
->fileid
= nfsi
->fileid
;
996 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1000 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1001 "offset=%lld count=%u res=%u status=%d%s",
1002 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1003 (unsigned long long)__entry
->fileid
,
1005 (long long)__entry
->offset
, __entry
->arg_count
,
1006 __entry
->res_count
, __entry
->status
,
1007 __entry
->eof
? " eof" : ""
1011 TRACE_EVENT(nfs_pgio_error
,
1013 const struct nfs_pgio_header
*hdr
,
1018 TP_ARGS(hdr
, error
, pos
),
1022 __field(u32
, fhandle
)
1023 __field(u64
, fileid
)
1024 __field(loff_t
, offset
)
1025 __field(u32
, arg_count
)
1026 __field(u32
, res_count
)
1027 __field(loff_t
, pos
)
1028 __field(int, status
)
1032 const struct inode
*inode
= hdr
->inode
;
1033 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1034 const struct nfs_fh
*fh
= hdr
->args
.fh
?
1035 hdr
->args
.fh
: &nfsi
->fh
;
1037 __entry
->status
= error
;
1038 __entry
->offset
= hdr
->args
.offset
;
1039 __entry
->arg_count
= hdr
->args
.count
;
1040 __entry
->res_count
= hdr
->res
.count
;
1041 __entry
->dev
= inode
->i_sb
->s_dev
;
1042 __entry
->fileid
= nfsi
->fileid
;
1043 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1046 TP_printk("fileid=%02x:%02x:%llu fhandle=0x%08x "
1047 "offset=%lld count=%u res=%u pos=%llu status=%d",
1048 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1049 (unsigned long long)__entry
->fileid
, __entry
->fhandle
,
1050 (long long)__entry
->offset
, __entry
->arg_count
, __entry
->res_count
,
1051 __entry
->pos
, __entry
->status
1055 TRACE_DEFINE_ENUM(NFS_UNSTABLE
);
1056 TRACE_DEFINE_ENUM(NFS_DATA_SYNC
);
1057 TRACE_DEFINE_ENUM(NFS_FILE_SYNC
);
1059 #define nfs_show_stable(stable) \
1060 __print_symbolic(stable, \
1061 { NFS_UNSTABLE, "UNSTABLE" }, \
1062 { NFS_DATA_SYNC, "DATA_SYNC" }, \
1063 { NFS_FILE_SYNC, "FILE_SYNC" })
1065 TRACE_EVENT(nfs_initiate_write
,
1067 const struct nfs_pgio_header
*hdr
1074 __field(u32
, fhandle
)
1075 __field(u64
, fileid
)
1076 __field(loff_t
, offset
)
1078 __field(enum nfs3_stable_how
, stable
)
1082 const struct inode
*inode
= hdr
->inode
;
1083 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1084 const struct nfs_fh
*fh
= hdr
->args
.fh
?
1085 hdr
->args
.fh
: &nfsi
->fh
;
1087 __entry
->offset
= hdr
->args
.offset
;
1088 __entry
->count
= hdr
->args
.count
;
1089 __entry
->stable
= hdr
->args
.stable
;
1090 __entry
->dev
= inode
->i_sb
->s_dev
;
1091 __entry
->fileid
= nfsi
->fileid
;
1092 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1096 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1097 "offset=%lld count=%u stable=%s",
1098 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1099 (unsigned long long)__entry
->fileid
,
1101 (long long)__entry
->offset
, __entry
->count
,
1102 nfs_show_stable(__entry
->stable
)
1106 TRACE_EVENT(nfs_writeback_done
,
1108 const struct rpc_task
*task
,
1109 const struct nfs_pgio_header
*hdr
1116 __field(u32
, fhandle
)
1117 __field(u64
, fileid
)
1118 __field(loff_t
, offset
)
1119 __field(u32
, arg_count
)
1120 __field(u32
, res_count
)
1121 __field(int, status
)
1122 __field(enum nfs3_stable_how
, stable
)
1123 __array(char, verifier
, NFS4_VERIFIER_SIZE
)
1127 const struct inode
*inode
= hdr
->inode
;
1128 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1129 const struct nfs_fh
*fh
= hdr
->args
.fh
?
1130 hdr
->args
.fh
: &nfsi
->fh
;
1131 const struct nfs_writeverf
*verf
= hdr
->res
.verf
;
1133 __entry
->status
= task
->tk_status
;
1134 __entry
->offset
= hdr
->args
.offset
;
1135 __entry
->arg_count
= hdr
->args
.count
;
1136 __entry
->res_count
= hdr
->res
.count
;
1137 __entry
->stable
= verf
->committed
;
1138 memcpy(__entry
->verifier
,
1140 NFS4_VERIFIER_SIZE
);
1141 __entry
->dev
= inode
->i_sb
->s_dev
;
1142 __entry
->fileid
= nfsi
->fileid
;
1143 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1147 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1148 "offset=%lld count=%u res=%u status=%d stable=%s "
1150 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1151 (unsigned long long)__entry
->fileid
,
1153 (long long)__entry
->offset
, __entry
->arg_count
,
1154 __entry
->res_count
, __entry
->status
,
1155 nfs_show_stable(__entry
->stable
),
1156 __print_hex_str(__entry
->verifier
, NFS4_VERIFIER_SIZE
)
1160 DECLARE_EVENT_CLASS(nfs_page_error_class
,
1162 const struct nfs_page
*req
,
1166 TP_ARGS(req
, error
),
1169 __field(const void *, req
)
1170 __field(pgoff_t
, index
)
1171 __field(unsigned int, offset
)
1172 __field(unsigned int, pgbase
)
1173 __field(unsigned int, bytes
)
1179 __entry
->index
= req
->wb_index
;
1180 __entry
->offset
= req
->wb_offset
;
1181 __entry
->pgbase
= req
->wb_pgbase
;
1182 __entry
->bytes
= req
->wb_bytes
;
1183 __entry
->error
= error
;
1187 "req=%p index=%lu offset=%u pgbase=%u bytes=%u error=%d",
1188 __entry
->req
, __entry
->index
, __entry
->offset
,
1189 __entry
->pgbase
, __entry
->bytes
, __entry
->error
1193 #define DEFINE_NFS_PAGEERR_EVENT(name) \
1194 DEFINE_EVENT(nfs_page_error_class, name, \
1196 const struct nfs_page *req, \
1199 TP_ARGS(req, error))
1201 DEFINE_NFS_PAGEERR_EVENT(nfs_write_error
);
1202 DEFINE_NFS_PAGEERR_EVENT(nfs_comp_error
);
1203 DEFINE_NFS_PAGEERR_EVENT(nfs_commit_error
);
1205 TRACE_EVENT(nfs_initiate_commit
,
1207 const struct nfs_commit_data
*data
1214 __field(u32
, fhandle
)
1215 __field(u64
, fileid
)
1216 __field(loff_t
, offset
)
1221 const struct inode
*inode
= data
->inode
;
1222 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1223 const struct nfs_fh
*fh
= data
->args
.fh
?
1224 data
->args
.fh
: &nfsi
->fh
;
1226 __entry
->offset
= data
->args
.offset
;
1227 __entry
->count
= data
->args
.count
;
1228 __entry
->dev
= inode
->i_sb
->s_dev
;
1229 __entry
->fileid
= nfsi
->fileid
;
1230 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1234 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1235 "offset=%lld count=%u",
1236 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1237 (unsigned long long)__entry
->fileid
,
1239 (long long)__entry
->offset
, __entry
->count
1243 TRACE_EVENT(nfs_commit_done
,
1245 const struct rpc_task
*task
,
1246 const struct nfs_commit_data
*data
1249 TP_ARGS(task
, data
),
1253 __field(u32
, fhandle
)
1254 __field(u64
, fileid
)
1255 __field(loff_t
, offset
)
1256 __field(int, status
)
1257 __field(enum nfs3_stable_how
, stable
)
1258 __array(char, verifier
, NFS4_VERIFIER_SIZE
)
1262 const struct inode
*inode
= data
->inode
;
1263 const struct nfs_inode
*nfsi
= NFS_I(inode
);
1264 const struct nfs_fh
*fh
= data
->args
.fh
?
1265 data
->args
.fh
: &nfsi
->fh
;
1266 const struct nfs_writeverf
*verf
= data
->res
.verf
;
1268 __entry
->status
= task
->tk_status
;
1269 __entry
->offset
= data
->args
.offset
;
1270 __entry
->stable
= verf
->committed
;
1271 memcpy(__entry
->verifier
,
1273 NFS4_VERIFIER_SIZE
);
1274 __entry
->dev
= inode
->i_sb
->s_dev
;
1275 __entry
->fileid
= nfsi
->fileid
;
1276 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1280 "fileid=%02x:%02x:%llu fhandle=0x%08x "
1281 "offset=%lld status=%d stable=%s verifier=%s",
1282 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1283 (unsigned long long)__entry
->fileid
,
1285 (long long)__entry
->offset
, __entry
->status
,
1286 nfs_show_stable(__entry
->stable
),
1287 __print_hex_str(__entry
->verifier
, NFS4_VERIFIER_SIZE
)
1291 TRACE_EVENT(nfs_fh_to_dentry
,
1293 const struct super_block
*sb
,
1294 const struct nfs_fh
*fh
,
1299 TP_ARGS(sb
, fh
, fileid
, error
),
1304 __field(u32
, fhandle
)
1305 __field(u64
, fileid
)
1309 __entry
->error
= error
;
1310 __entry
->dev
= sb
->s_dev
;
1311 __entry
->fileid
= fileid
;
1312 __entry
->fhandle
= nfs_fhandle_hash(fh
);
1316 "error=%d fileid=%02x:%02x:%llu fhandle=0x%08x ",
1318 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1319 (unsigned long long)__entry
->fileid
,
1324 TRACE_DEFINE_ENUM(NFS_OK
);
1325 TRACE_DEFINE_ENUM(NFSERR_PERM
);
1326 TRACE_DEFINE_ENUM(NFSERR_NOENT
);
1327 TRACE_DEFINE_ENUM(NFSERR_IO
);
1328 TRACE_DEFINE_ENUM(NFSERR_NXIO
);
1329 TRACE_DEFINE_ENUM(ECHILD
);
1330 TRACE_DEFINE_ENUM(NFSERR_EAGAIN
);
1331 TRACE_DEFINE_ENUM(NFSERR_ACCES
);
1332 TRACE_DEFINE_ENUM(NFSERR_EXIST
);
1333 TRACE_DEFINE_ENUM(NFSERR_XDEV
);
1334 TRACE_DEFINE_ENUM(NFSERR_NODEV
);
1335 TRACE_DEFINE_ENUM(NFSERR_NOTDIR
);
1336 TRACE_DEFINE_ENUM(NFSERR_ISDIR
);
1337 TRACE_DEFINE_ENUM(NFSERR_INVAL
);
1338 TRACE_DEFINE_ENUM(NFSERR_FBIG
);
1339 TRACE_DEFINE_ENUM(NFSERR_NOSPC
);
1340 TRACE_DEFINE_ENUM(NFSERR_ROFS
);
1341 TRACE_DEFINE_ENUM(NFSERR_MLINK
);
1342 TRACE_DEFINE_ENUM(NFSERR_OPNOTSUPP
);
1343 TRACE_DEFINE_ENUM(NFSERR_NAMETOOLONG
);
1344 TRACE_DEFINE_ENUM(NFSERR_NOTEMPTY
);
1345 TRACE_DEFINE_ENUM(NFSERR_DQUOT
);
1346 TRACE_DEFINE_ENUM(NFSERR_STALE
);
1347 TRACE_DEFINE_ENUM(NFSERR_REMOTE
);
1348 TRACE_DEFINE_ENUM(NFSERR_WFLUSH
);
1349 TRACE_DEFINE_ENUM(NFSERR_BADHANDLE
);
1350 TRACE_DEFINE_ENUM(NFSERR_NOT_SYNC
);
1351 TRACE_DEFINE_ENUM(NFSERR_BAD_COOKIE
);
1352 TRACE_DEFINE_ENUM(NFSERR_NOTSUPP
);
1353 TRACE_DEFINE_ENUM(NFSERR_TOOSMALL
);
1354 TRACE_DEFINE_ENUM(NFSERR_SERVERFAULT
);
1355 TRACE_DEFINE_ENUM(NFSERR_BADTYPE
);
1356 TRACE_DEFINE_ENUM(NFSERR_JUKEBOX
);
1358 #define nfs_show_status(x) \
1359 __print_symbolic(x, \
1361 { NFSERR_PERM, "PERM" }, \
1362 { NFSERR_NOENT, "NOENT" }, \
1363 { NFSERR_IO, "IO" }, \
1364 { NFSERR_NXIO, "NXIO" }, \
1365 { ECHILD, "CHILD" }, \
1366 { NFSERR_EAGAIN, "AGAIN" }, \
1367 { NFSERR_ACCES, "ACCES" }, \
1368 { NFSERR_EXIST, "EXIST" }, \
1369 { NFSERR_XDEV, "XDEV" }, \
1370 { NFSERR_NODEV, "NODEV" }, \
1371 { NFSERR_NOTDIR, "NOTDIR" }, \
1372 { NFSERR_ISDIR, "ISDIR" }, \
1373 { NFSERR_INVAL, "INVAL" }, \
1374 { NFSERR_FBIG, "FBIG" }, \
1375 { NFSERR_NOSPC, "NOSPC" }, \
1376 { NFSERR_ROFS, "ROFS" }, \
1377 { NFSERR_MLINK, "MLINK" }, \
1378 { NFSERR_OPNOTSUPP, "OPNOTSUPP" }, \
1379 { NFSERR_NAMETOOLONG, "NAMETOOLONG" }, \
1380 { NFSERR_NOTEMPTY, "NOTEMPTY" }, \
1381 { NFSERR_DQUOT, "DQUOT" }, \
1382 { NFSERR_STALE, "STALE" }, \
1383 { NFSERR_REMOTE, "REMOTE" }, \
1384 { NFSERR_WFLUSH, "WFLUSH" }, \
1385 { NFSERR_BADHANDLE, "BADHANDLE" }, \
1386 { NFSERR_NOT_SYNC, "NOTSYNC" }, \
1387 { NFSERR_BAD_COOKIE, "BADCOOKIE" }, \
1388 { NFSERR_NOTSUPP, "NOTSUPP" }, \
1389 { NFSERR_TOOSMALL, "TOOSMALL" }, \
1390 { NFSERR_SERVERFAULT, "REMOTEIO" }, \
1391 { NFSERR_BADTYPE, "BADTYPE" }, \
1392 { NFSERR_JUKEBOX, "JUKEBOX" })
1394 TRACE_EVENT(nfs_xdr_status
,
1396 const struct xdr_stream
*xdr
,
1400 TP_ARGS(xdr
, error
),
1403 __field(unsigned int, task_id
)
1404 __field(unsigned int, client_id
)
1406 __field(int, version
)
1407 __field(unsigned long, error
)
1409 xdr
->rqst
->rq_task
->tk_client
->cl_program
->name
)
1411 xdr
->rqst
->rq_task
->tk_msg
.rpc_proc
->p_name
)
1415 const struct rpc_rqst
*rqstp
= xdr
->rqst
;
1416 const struct rpc_task
*task
= rqstp
->rq_task
;
1418 __entry
->task_id
= task
->tk_pid
;
1419 __entry
->client_id
= task
->tk_client
->cl_clid
;
1420 __entry
->xid
= be32_to_cpu(rqstp
->rq_xid
);
1421 __entry
->version
= task
->tk_client
->cl_vers
;
1422 __entry
->error
= error
;
1423 __assign_str(program
,
1424 task
->tk_client
->cl_program
->name
)
1425 __assign_str(procedure
, task
->tk_msg
.rpc_proc
->p_name
)
1429 "task:%u@%d xid=0x%08x %sv%d %s error=%ld (%s)",
1430 __entry
->task_id
, __entry
->client_id
, __entry
->xid
,
1431 __get_str(program
), __entry
->version
,
1432 __get_str(procedure
), -__entry
->error
,
1433 nfs_show_status(__entry
->error
)
1437 #endif /* _TRACE_NFS_H */
1439 #undef TRACE_INCLUDE_PATH
1440 #define TRACE_INCLUDE_PATH .
1441 #define TRACE_INCLUDE_FILE nfstrace
1442 /* This part must be outside protection */
1443 #include <trace/define_trace.h>