diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-12 16:45:55 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-22 08:58:22 -0400 |
commit | 078ea3dfe396b18ccf608c71a9585b6f7e519bb1 (patch) | |
tree | 81f454091ab2e1847791de35f6fa8447e7e8c982 /fs/nfs/nfs4trace.h | |
parent | d1b748a5e71106481015e36ce327747b075bcbdc (diff) |
NFSv4: Add tracepoints for debugging lookup/create operations
Set up basic tracepoints for debugging NFSv4 lookup, unlink/remove,
symlink, mkdir, mknod, fs_locations and secinfo.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r-- | fs/nfs/nfs4trace.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 3f124dbcd60a..2646a50a8208 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h | |||
@@ -411,6 +411,56 @@ DEFINE_NFS4_LOCK_EVENT(nfs4_lock_reclaim); | |||
411 | DEFINE_NFS4_LOCK_EVENT(nfs4_lock_expired); | 411 | DEFINE_NFS4_LOCK_EVENT(nfs4_lock_expired); |
412 | DEFINE_NFS4_LOCK_EVENT(nfs4_unlock); | 412 | DEFINE_NFS4_LOCK_EVENT(nfs4_unlock); |
413 | 413 | ||
414 | DECLARE_EVENT_CLASS(nfs4_lookup_event, | ||
415 | TP_PROTO( | ||
416 | const struct inode *dir, | ||
417 | const struct qstr *name, | ||
418 | int error | ||
419 | ), | ||
420 | |||
421 | TP_ARGS(dir, name, error), | ||
422 | |||
423 | TP_STRUCT__entry( | ||
424 | __field(dev_t, dev) | ||
425 | __field(int, error) | ||
426 | __field(u64, dir) | ||
427 | __string(name, name->name) | ||
428 | ), | ||
429 | |||
430 | TP_fast_assign( | ||
431 | __entry->dev = dir->i_sb->s_dev; | ||
432 | __entry->dir = NFS_FILEID(dir); | ||
433 | __entry->error = error; | ||
434 | __assign_str(name, name->name); | ||
435 | ), | ||
436 | |||
437 | TP_printk( | ||
438 | "error=%d (%s) name=%02x:%02x:%llu/%s", | ||
439 | __entry->error, | ||
440 | show_nfsv4_errors(__entry->error), | ||
441 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
442 | (unsigned long long)__entry->dir, | ||
443 | __get_str(name) | ||
444 | ) | ||
445 | ); | ||
446 | |||
447 | #define DEFINE_NFS4_LOOKUP_EVENT(name) \ | ||
448 | DEFINE_EVENT(nfs4_lookup_event, name, \ | ||
449 | TP_PROTO( \ | ||
450 | const struct inode *dir, \ | ||
451 | const struct qstr *name, \ | ||
452 | int error \ | ||
453 | ), \ | ||
454 | TP_ARGS(dir, name, error)) | ||
455 | |||
456 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_lookup); | ||
457 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_symlink); | ||
458 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_mkdir); | ||
459 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_mknod); | ||
460 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_remove); | ||
461 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations); | ||
462 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo); | ||
463 | |||
414 | #endif /* _TRACE_NFS4_H */ | 464 | #endif /* _TRACE_NFS4_H */ |
415 | 465 | ||
416 | #undef TRACE_INCLUDE_PATH | 466 | #undef TRACE_INCLUDE_PATH |