aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4trace.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-14 16:36:51 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-22 08:58:26 -0400
commit1037e6eaa37a42cec877f103c091cfe5304f4450 (patch)
tree6489ce3781968ac0cc0f6b48180ce726ab49df86 /fs/nfs/nfs4trace.h
parentcc668ab30b8a5505c1651b073882c1a67c802a48 (diff)
NFSv4.1: Add tracepoints for debugging layoutget/return/commit
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4trace.h')
-rw-r--r--fs/nfs/nfs4trace.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 1ea69836443f..b2a2d8a30c66 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -894,6 +894,61 @@ DECLARE_EVENT_CLASS(nfs4_commit_event,
894DEFINE_NFS4_COMMIT_EVENT(nfs4_commit); 894DEFINE_NFS4_COMMIT_EVENT(nfs4_commit);
895#ifdef CONFIG_NFS_V4_1 895#ifdef CONFIG_NFS_V4_1
896DEFINE_NFS4_COMMIT_EVENT(nfs4_pnfs_commit_ds); 896DEFINE_NFS4_COMMIT_EVENT(nfs4_pnfs_commit_ds);
897
898#define show_pnfs_iomode(iomode) \
899 __print_symbolic(iomode, \
900 { IOMODE_READ, "READ" }, \
901 { IOMODE_RW, "RW" }, \
902 { IOMODE_ANY, "ANY" })
903
904TRACE_EVENT(nfs4_layoutget,
905 TP_PROTO(
906 const struct nfs_open_context *ctx,
907 const struct pnfs_layout_range *args,
908 const struct pnfs_layout_range *res,
909 int error
910 ),
911
912 TP_ARGS(ctx, args, res, error),
913
914 TP_STRUCT__entry(
915 __field(dev_t, dev)
916 __field(u32, fhandle)
917 __field(u64, fileid)
918 __field(u32, iomode)
919 __field(u64, offset)
920 __field(u64, count)
921 __field(int, error)
922 ),
923
924 TP_fast_assign(
925 const struct inode *inode = ctx->dentry->d_inode;
926 __entry->dev = inode->i_sb->s_dev;
927 __entry->fileid = NFS_FILEID(inode);
928 __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode));
929 __entry->iomode = args->iomode;
930 __entry->offset = args->offset;
931 __entry->count = args->length;
932 __entry->error = error;
933 ),
934
935 TP_printk(
936 "error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
937 "iomode=%s offset=%llu count=%llu",
938 __entry->error,
939 show_nfsv4_errors(__entry->error),
940 MAJOR(__entry->dev), MINOR(__entry->dev),
941 (unsigned long long)__entry->fileid,
942 __entry->fhandle,
943 show_pnfs_iomode(__entry->iomode),
944 (unsigned long long)__entry->offset,
945 (unsigned long long)__entry->count
946 )
947);
948
949DEFINE_NFS4_INODE_EVENT(nfs4_layoutcommit);
950DEFINE_NFS4_INODE_EVENT(nfs4_layoutreturn);
951
897#endif /* CONFIG_NFS_V4_1 */ 952#endif /* CONFIG_NFS_V4_1 */
898 953
899#endif /* _TRACE_NFS4_H */ 954#endif /* _TRACE_NFS4_H */