diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-12 17:08:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-22 08:58:23 -0400 |
commit | fbc6f7c233ff0a7e98f5dc2837b08adf03aa9376 (patch) | |
tree | 691fcc8c09c0188a6c70a4cb824e45d8eb500655 /fs/nfs/nfs4trace.h | |
parent | c1578b769a644fe1ff3e8324fc404b18f3f01fbe (diff) |
NFSv4: Add tracepoints for debugging rename
Add tracepoints to debug renames.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r-- | fs/nfs/nfs4trace.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 6bd65c2c820b..6388db847017 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h | |||
@@ -461,6 +461,49 @@ DEFINE_NFS4_LOOKUP_EVENT(nfs4_remove); | |||
461 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations); | 461 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations); |
462 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo); | 462 | DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo); |
463 | 463 | ||
464 | TRACE_EVENT(nfs4_rename, | ||
465 | TP_PROTO( | ||
466 | const struct inode *olddir, | ||
467 | const struct qstr *oldname, | ||
468 | const struct inode *newdir, | ||
469 | const struct qstr *newname, | ||
470 | int error | ||
471 | ), | ||
472 | |||
473 | TP_ARGS(olddir, oldname, newdir, newname, error), | ||
474 | |||
475 | TP_STRUCT__entry( | ||
476 | __field(dev_t, dev) | ||
477 | __field(int, error) | ||
478 | __field(u64, olddir) | ||
479 | __string(oldname, oldname->name) | ||
480 | __field(u64, newdir) | ||
481 | __string(newname, newname->name) | ||
482 | ), | ||
483 | |||
484 | TP_fast_assign( | ||
485 | __entry->dev = olddir->i_sb->s_dev; | ||
486 | __entry->olddir = NFS_FILEID(olddir); | ||
487 | __entry->newdir = NFS_FILEID(newdir); | ||
488 | __entry->error = error; | ||
489 | __assign_str(oldname, oldname->name); | ||
490 | __assign_str(newname, newname->name); | ||
491 | ), | ||
492 | |||
493 | TP_printk( | ||
494 | "error=%d (%s) oldname=%02x:%02x:%llu/%s " | ||
495 | "newname=%02x:%02x:%llu/%s", | ||
496 | __entry->error, | ||
497 | show_nfsv4_errors(__entry->error), | ||
498 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
499 | (unsigned long long)__entry->olddir, | ||
500 | __get_str(oldname), | ||
501 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
502 | (unsigned long long)__entry->newdir, | ||
503 | __get_str(newname) | ||
504 | ) | ||
505 | ); | ||
506 | |||
464 | DECLARE_EVENT_CLASS(nfs4_inode_event, | 507 | DECLARE_EVENT_CLASS(nfs4_inode_event, |
465 | TP_PROTO( | 508 | TP_PROTO( |
466 | const struct inode *inode, | 509 | const struct inode *inode, |