aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-13 11:34:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-22 08:58:25 -0400
commit1f2d30b5338f1adaac249707ae49f1c675049cfc (patch)
tree555e65b82ab63749d19bf05d552262146094e1ab /fs/nfs/nfs4trace.h
parentca8acf8d84029b395ade8d4562dae2108bb00c17 (diff)
NFSv4: Add tracepoints for debugging the idmapper
Add tracepoints to help debug uid/gid mappings to username/group. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r--fs/nfs/nfs4trace.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 900f233ee4dc..f58edcf418bf 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -627,6 +627,52 @@ DEFINE_NFS4_INODE_EVENT(nfs4_set_security_label);
627DEFINE_NFS4_INODE_EVENT(nfs4_recall_delegation); 627DEFINE_NFS4_INODE_EVENT(nfs4_recall_delegation);
628DEFINE_NFS4_INODE_EVENT(nfs4_delegreturn); 628DEFINE_NFS4_INODE_EVENT(nfs4_delegreturn);
629 629
630DECLARE_EVENT_CLASS(nfs4_idmap_event,
631 TP_PROTO(
632 const char *name,
633 int len,
634 u32 id,
635 int error
636 ),
637
638 TP_ARGS(name, len, id, error),
639
640 TP_STRUCT__entry(
641 __field(int, error)
642 __field(u32, id)
643 __dynamic_array(char, name, len > 0 ? len + 1 : 1)
644 ),
645
646 TP_fast_assign(
647 if (len < 0)
648 len = 0;
649 __entry->error = error < 0 ? error : 0;
650 __entry->id = id;
651 memcpy(__get_dynamic_array(name), name, len);
652 ((char *)__get_dynamic_array(name))[len] = 0;
653 ),
654
655 TP_printk(
656 "error=%d id=%u name=%s",
657 __entry->error,
658 __entry->id,
659 __get_str(name)
660 )
661);
662#define DEFINE_NFS4_IDMAP_EVENT(name) \
663 DEFINE_EVENT(nfs4_idmap_event, name, \
664 TP_PROTO( \
665 const char *name, \
666 int len, \
667 u32 id, \
668 int error \
669 ), \
670 TP_ARGS(name, len, id, error))
671DEFINE_NFS4_IDMAP_EVENT(nfs4_map_name_to_uid);
672DEFINE_NFS4_IDMAP_EVENT(nfs4_map_group_to_gid);
673DEFINE_NFS4_IDMAP_EVENT(nfs4_map_uid_to_name);
674DEFINE_NFS4_IDMAP_EVENT(nfs4_map_gid_to_group);
675
630#endif /* _TRACE_NFS4_H */ 676#endif /* _TRACE_NFS4_H */
631 677
632#undef TRACE_INCLUDE_PATH 678#undef TRACE_INCLUDE_PATH