aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-12 17:08:26 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-22 08:58:23 -0400
commitfbc6f7c233ff0a7e98f5dc2837b08adf03aa9376 (patch)
tree691fcc8c09c0188a6c70a4cb824e45d8eb500655 /fs/nfs/nfs4trace.h
parentc1578b769a644fe1ff3e8324fc404b18f3f01fbe (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.h43
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);
461DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations); 461DEFINE_NFS4_LOOKUP_EVENT(nfs4_get_fs_locations);
462DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo); 462DEFINE_NFS4_LOOKUP_EVENT(nfs4_secinfo);
463 463
464TRACE_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
464DECLARE_EVENT_CLASS(nfs4_inode_event, 507DECLARE_EVENT_CLASS(nfs4_inode_event,
465 TP_PROTO( 508 TP_PROTO(
466 const struct inode *inode, 509 const struct inode *inode,