1f4ce1299STrond Myklebust /* 2f4ce1299STrond Myklebust * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com> 3f4ce1299STrond Myklebust */ 4f4ce1299STrond Myklebust #undef TRACE_SYSTEM 5f4ce1299STrond Myklebust #define TRACE_SYSTEM nfs 6f4ce1299STrond Myklebust 7f4ce1299STrond Myklebust #if !defined(_TRACE_NFS_H) || defined(TRACE_HEADER_MULTI_READ) 8f4ce1299STrond Myklebust #define _TRACE_NFS_H 9f4ce1299STrond Myklebust 10f4ce1299STrond Myklebust #include <linux/tracepoint.h> 11f4ce1299STrond Myklebust 12f4ce1299STrond Myklebust #define nfs_show_file_type(ftype) \ 13f4ce1299STrond Myklebust __print_symbolic(ftype, \ 14f4ce1299STrond Myklebust { DT_UNKNOWN, "UNKNOWN" }, \ 15f4ce1299STrond Myklebust { DT_FIFO, "FIFO" }, \ 16f4ce1299STrond Myklebust { DT_CHR, "CHR" }, \ 17f4ce1299STrond Myklebust { DT_DIR, "DIR" }, \ 18f4ce1299STrond Myklebust { DT_BLK, "BLK" }, \ 19f4ce1299STrond Myklebust { DT_REG, "REG" }, \ 20f4ce1299STrond Myklebust { DT_LNK, "LNK" }, \ 21f4ce1299STrond Myklebust { DT_SOCK, "SOCK" }, \ 22f4ce1299STrond Myklebust { DT_WHT, "WHT" }) 23f4ce1299STrond Myklebust 24f4ce1299STrond Myklebust #define nfs_show_cache_validity(v) \ 25f4ce1299STrond Myklebust __print_flags(v, "|", \ 26f4ce1299STrond Myklebust { NFS_INO_INVALID_ATTR, "INVALID_ATTR" }, \ 27f4ce1299STrond Myklebust { NFS_INO_INVALID_DATA, "INVALID_DATA" }, \ 28f4ce1299STrond Myklebust { NFS_INO_INVALID_ATIME, "INVALID_ATIME" }, \ 29f4ce1299STrond Myklebust { NFS_INO_INVALID_ACCESS, "INVALID_ACCESS" }, \ 30f4ce1299STrond Myklebust { NFS_INO_INVALID_ACL, "INVALID_ACL" }, \ 31f4ce1299STrond Myklebust { NFS_INO_REVAL_PAGECACHE, "REVAL_PAGECACHE" }, \ 32f4ce1299STrond Myklebust { NFS_INO_REVAL_FORCED, "REVAL_FORCED" }, \ 33f4ce1299STrond Myklebust { NFS_INO_INVALID_LABEL, "INVALID_LABEL" }) 34f4ce1299STrond Myklebust 35f4ce1299STrond Myklebust #define nfs_show_nfsi_flags(v) \ 36f4ce1299STrond Myklebust __print_flags(v, "|", \ 37f4ce1299STrond Myklebust { 1 << NFS_INO_ADVISE_RDPLUS, "ADVISE_RDPLUS" }, \ 38f4ce1299STrond Myklebust { 1 << NFS_INO_STALE, "STALE" }, \ 39*d529ef83SJeff Layton { 1 << NFS_INO_INVALIDATING, "INVALIDATING" }, \ 40f4ce1299STrond Myklebust { 1 << NFS_INO_FLUSHING, "FLUSHING" }, \ 41f4ce1299STrond Myklebust { 1 << NFS_INO_FSCACHE, "FSCACHE" }, \ 42f4ce1299STrond Myklebust { 1 << NFS_INO_COMMIT, "COMMIT" }, \ 43f4ce1299STrond Myklebust { 1 << NFS_INO_LAYOUTCOMMIT, "NEED_LAYOUTCOMMIT" }, \ 44f4ce1299STrond Myklebust { 1 << NFS_INO_LAYOUTCOMMITTING, "LAYOUTCOMMIT" }) 45f4ce1299STrond Myklebust 46f4ce1299STrond Myklebust DECLARE_EVENT_CLASS(nfs_inode_event, 47f4ce1299STrond Myklebust TP_PROTO( 48f4ce1299STrond Myklebust const struct inode *inode 49f4ce1299STrond Myklebust ), 50f4ce1299STrond Myklebust 51f4ce1299STrond Myklebust TP_ARGS(inode), 52f4ce1299STrond Myklebust 53f4ce1299STrond Myklebust TP_STRUCT__entry( 54f4ce1299STrond Myklebust __field(dev_t, dev) 55f4ce1299STrond Myklebust __field(u32, fhandle) 56f4ce1299STrond Myklebust __field(u64, fileid) 57f4ce1299STrond Myklebust __field(u64, version) 58f4ce1299STrond Myklebust ), 59f4ce1299STrond Myklebust 60f4ce1299STrond Myklebust TP_fast_assign( 61f4ce1299STrond Myklebust const struct nfs_inode *nfsi = NFS_I(inode); 62f4ce1299STrond Myklebust __entry->dev = inode->i_sb->s_dev; 63f4ce1299STrond Myklebust __entry->fileid = nfsi->fileid; 64f4ce1299STrond Myklebust __entry->fhandle = nfs_fhandle_hash(&nfsi->fh); 65f4ce1299STrond Myklebust __entry->version = inode->i_version; 66f4ce1299STrond Myklebust ), 67f4ce1299STrond Myklebust 68f4ce1299STrond Myklebust TP_printk( 69f4ce1299STrond Myklebust "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu ", 70f4ce1299STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 71f4ce1299STrond Myklebust (unsigned long long)__entry->fileid, 72f4ce1299STrond Myklebust __entry->fhandle, 73f4ce1299STrond Myklebust (unsigned long long)__entry->version 74f4ce1299STrond Myklebust ) 75f4ce1299STrond Myklebust ); 76f4ce1299STrond Myklebust 77f4ce1299STrond Myklebust DECLARE_EVENT_CLASS(nfs_inode_event_done, 78f4ce1299STrond Myklebust TP_PROTO( 79f4ce1299STrond Myklebust const struct inode *inode, 80f4ce1299STrond Myklebust int error 81f4ce1299STrond Myklebust ), 82f4ce1299STrond Myklebust 83f4ce1299STrond Myklebust TP_ARGS(inode, error), 84f4ce1299STrond Myklebust 85f4ce1299STrond Myklebust TP_STRUCT__entry( 86f4ce1299STrond Myklebust __field(int, error) 87f4ce1299STrond Myklebust __field(dev_t, dev) 88f4ce1299STrond Myklebust __field(u32, fhandle) 89f4ce1299STrond Myklebust __field(unsigned char, type) 90f4ce1299STrond Myklebust __field(u64, fileid) 91f4ce1299STrond Myklebust __field(u64, version) 92f4ce1299STrond Myklebust __field(loff_t, size) 93f4ce1299STrond Myklebust __field(unsigned long, nfsi_flags) 94f4ce1299STrond Myklebust __field(unsigned long, cache_validity) 95f4ce1299STrond Myklebust ), 96f4ce1299STrond Myklebust 97f4ce1299STrond Myklebust TP_fast_assign( 98f4ce1299STrond Myklebust const struct nfs_inode *nfsi = NFS_I(inode); 99f4ce1299STrond Myklebust __entry->error = error; 100f4ce1299STrond Myklebust __entry->dev = inode->i_sb->s_dev; 101f4ce1299STrond Myklebust __entry->fileid = nfsi->fileid; 102f4ce1299STrond Myklebust __entry->fhandle = nfs_fhandle_hash(&nfsi->fh); 103f4ce1299STrond Myklebust __entry->type = nfs_umode_to_dtype(inode->i_mode); 104f4ce1299STrond Myklebust __entry->version = inode->i_version; 105f4ce1299STrond Myklebust __entry->size = i_size_read(inode); 106f4ce1299STrond Myklebust __entry->nfsi_flags = nfsi->flags; 107f4ce1299STrond Myklebust __entry->cache_validity = nfsi->cache_validity; 108f4ce1299STrond Myklebust ), 109f4ce1299STrond Myklebust 110f4ce1299STrond Myklebust TP_printk( 111f4ce1299STrond Myklebust "error=%d fileid=%02x:%02x:%llu fhandle=0x%08x " 112f4ce1299STrond Myklebust "type=%u (%s) version=%llu size=%lld " 113f4ce1299STrond Myklebust "cache_validity=%lu (%s) nfs_flags=%ld (%s)", 114f4ce1299STrond Myklebust __entry->error, 115f4ce1299STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 116f4ce1299STrond Myklebust (unsigned long long)__entry->fileid, 117f4ce1299STrond Myklebust __entry->fhandle, 118f4ce1299STrond Myklebust __entry->type, 119f4ce1299STrond Myklebust nfs_show_file_type(__entry->type), 120f4ce1299STrond Myklebust (unsigned long long)__entry->version, 121f4ce1299STrond Myklebust (long long)__entry->size, 122f4ce1299STrond Myklebust __entry->cache_validity, 123f4ce1299STrond Myklebust nfs_show_cache_validity(__entry->cache_validity), 124f4ce1299STrond Myklebust __entry->nfsi_flags, 125f4ce1299STrond Myklebust nfs_show_nfsi_flags(__entry->nfsi_flags) 126f4ce1299STrond Myklebust ) 127f4ce1299STrond Myklebust ); 128f4ce1299STrond Myklebust 129f4ce1299STrond Myklebust #define DEFINE_NFS_INODE_EVENT(name) \ 130f4ce1299STrond Myklebust DEFINE_EVENT(nfs_inode_event, name, \ 131f4ce1299STrond Myklebust TP_PROTO( \ 132f4ce1299STrond Myklebust const struct inode *inode \ 133f4ce1299STrond Myklebust ), \ 134f4ce1299STrond Myklebust TP_ARGS(inode)) 135f4ce1299STrond Myklebust #define DEFINE_NFS_INODE_EVENT_DONE(name) \ 136f4ce1299STrond Myklebust DEFINE_EVENT(nfs_inode_event_done, name, \ 137f4ce1299STrond Myklebust TP_PROTO( \ 138f4ce1299STrond Myklebust const struct inode *inode, \ 139f4ce1299STrond Myklebust int error \ 140f4ce1299STrond Myklebust ), \ 141f4ce1299STrond Myklebust TP_ARGS(inode, error)) 142f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter); 143f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_exit); 144f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_enter); 145f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_inode_exit); 146f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_enter); 147f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_mapping_exit); 148f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_getattr_enter); 149f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit); 150f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_setattr_enter); 151f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit); 152f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_writeback_page_enter); 153f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_page_exit); 154f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_enter); 155f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit); 156f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_fsync_enter); 157f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit); 158f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_access_enter); 159f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_access_exit); 160f4ce1299STrond Myklebust 1616e0d0be7STrond Myklebust #define show_lookup_flags(flags) \ 1626e0d0be7STrond Myklebust __print_flags((unsigned long)flags, "|", \ 1636e0d0be7STrond Myklebust { LOOKUP_AUTOMOUNT, "AUTOMOUNT" }, \ 1646e0d0be7STrond Myklebust { LOOKUP_DIRECTORY, "DIRECTORY" }, \ 1656e0d0be7STrond Myklebust { LOOKUP_OPEN, "OPEN" }, \ 1666e0d0be7STrond Myklebust { LOOKUP_CREATE, "CREATE" }, \ 1676e0d0be7STrond Myklebust { LOOKUP_EXCL, "EXCL" }) 1686e0d0be7STrond Myklebust 1696e0d0be7STrond Myklebust DECLARE_EVENT_CLASS(nfs_lookup_event, 1706e0d0be7STrond Myklebust TP_PROTO( 1716e0d0be7STrond Myklebust const struct inode *dir, 1726e0d0be7STrond Myklebust const struct dentry *dentry, 1736e0d0be7STrond Myklebust unsigned int flags 1746e0d0be7STrond Myklebust ), 1756e0d0be7STrond Myklebust 1766e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags), 1776e0d0be7STrond Myklebust 1786e0d0be7STrond Myklebust TP_STRUCT__entry( 1796e0d0be7STrond Myklebust __field(unsigned int, flags) 1806e0d0be7STrond Myklebust __field(dev_t, dev) 1816e0d0be7STrond Myklebust __field(u64, dir) 1826e0d0be7STrond Myklebust __string(name, dentry->d_name.name) 1836e0d0be7STrond Myklebust ), 1846e0d0be7STrond Myklebust 1856e0d0be7STrond Myklebust TP_fast_assign( 1866e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 1876e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 1886e0d0be7STrond Myklebust __entry->flags = flags; 1896e0d0be7STrond Myklebust __assign_str(name, dentry->d_name.name); 1906e0d0be7STrond Myklebust ), 1916e0d0be7STrond Myklebust 1926e0d0be7STrond Myklebust TP_printk( 1936e0d0be7STrond Myklebust "flags=%u (%s) name=%02x:%02x:%llu/%s", 1946e0d0be7STrond Myklebust __entry->flags, 1956e0d0be7STrond Myklebust show_lookup_flags(__entry->flags), 1966e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 1976e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 1986e0d0be7STrond Myklebust __get_str(name) 1996e0d0be7STrond Myklebust ) 2006e0d0be7STrond Myklebust ); 2016e0d0be7STrond Myklebust 2026e0d0be7STrond Myklebust #define DEFINE_NFS_LOOKUP_EVENT(name) \ 2036e0d0be7STrond Myklebust DEFINE_EVENT(nfs_lookup_event, name, \ 2046e0d0be7STrond Myklebust TP_PROTO( \ 2056e0d0be7STrond Myklebust const struct inode *dir, \ 2066e0d0be7STrond Myklebust const struct dentry *dentry, \ 2076e0d0be7STrond Myklebust unsigned int flags \ 2086e0d0be7STrond Myklebust ), \ 2096e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags)) 2106e0d0be7STrond Myklebust 2116e0d0be7STrond Myklebust DECLARE_EVENT_CLASS(nfs_lookup_event_done, 2126e0d0be7STrond Myklebust TP_PROTO( 2136e0d0be7STrond Myklebust const struct inode *dir, 2146e0d0be7STrond Myklebust const struct dentry *dentry, 2156e0d0be7STrond Myklebust unsigned int flags, 2166e0d0be7STrond Myklebust int error 2176e0d0be7STrond Myklebust ), 2186e0d0be7STrond Myklebust 2196e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags, error), 2206e0d0be7STrond Myklebust 2216e0d0be7STrond Myklebust TP_STRUCT__entry( 2226e0d0be7STrond Myklebust __field(int, error) 2236e0d0be7STrond Myklebust __field(unsigned int, flags) 2246e0d0be7STrond Myklebust __field(dev_t, dev) 2256e0d0be7STrond Myklebust __field(u64, dir) 2266e0d0be7STrond Myklebust __string(name, dentry->d_name.name) 2276e0d0be7STrond Myklebust ), 2286e0d0be7STrond Myklebust 2296e0d0be7STrond Myklebust TP_fast_assign( 2306e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 2316e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 2326e0d0be7STrond Myklebust __entry->error = error; 2336e0d0be7STrond Myklebust __entry->flags = flags; 2346e0d0be7STrond Myklebust __assign_str(name, dentry->d_name.name); 2356e0d0be7STrond Myklebust ), 2366e0d0be7STrond Myklebust 2376e0d0be7STrond Myklebust TP_printk( 2386e0d0be7STrond Myklebust "error=%d flags=%u (%s) name=%02x:%02x:%llu/%s", 2396e0d0be7STrond Myklebust __entry->error, 2406e0d0be7STrond Myklebust __entry->flags, 2416e0d0be7STrond Myklebust show_lookup_flags(__entry->flags), 2426e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 2436e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 2446e0d0be7STrond Myklebust __get_str(name) 2456e0d0be7STrond Myklebust ) 2466e0d0be7STrond Myklebust ); 2476e0d0be7STrond Myklebust 2486e0d0be7STrond Myklebust #define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \ 2496e0d0be7STrond Myklebust DEFINE_EVENT(nfs_lookup_event_done, name, \ 2506e0d0be7STrond Myklebust TP_PROTO( \ 2516e0d0be7STrond Myklebust const struct inode *dir, \ 2526e0d0be7STrond Myklebust const struct dentry *dentry, \ 2536e0d0be7STrond Myklebust unsigned int flags, \ 2546e0d0be7STrond Myklebust int error \ 2556e0d0be7STrond Myklebust ), \ 2566e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags, error)) 2576e0d0be7STrond Myklebust 2586e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter); 2596e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit); 2606e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_enter); 2616e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revalidate_exit); 2626e0d0be7STrond Myklebust 2636e0d0be7STrond Myklebust #define show_open_flags(flags) \ 2646e0d0be7STrond Myklebust __print_flags((unsigned long)flags, "|", \ 2656e0d0be7STrond Myklebust { O_CREAT, "O_CREAT" }, \ 2666e0d0be7STrond Myklebust { O_EXCL, "O_EXCL" }, \ 2676e0d0be7STrond Myklebust { O_TRUNC, "O_TRUNC" }, \ 2686e0d0be7STrond Myklebust { O_APPEND, "O_APPEND" }, \ 2696e0d0be7STrond Myklebust { O_DSYNC, "O_DSYNC" }, \ 2706e0d0be7STrond Myklebust { O_DIRECT, "O_DIRECT" }, \ 2716e0d0be7STrond Myklebust { O_DIRECTORY, "O_DIRECTORY" }) 2726e0d0be7STrond Myklebust 2736e0d0be7STrond Myklebust #define show_fmode_flags(mode) \ 2746e0d0be7STrond Myklebust __print_flags(mode, "|", \ 2756e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_READ), "READ" }, \ 2766e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_WRITE), "WRITE" }, \ 2776e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_EXEC), "EXEC" }) 2786e0d0be7STrond Myklebust 2796e0d0be7STrond Myklebust TRACE_EVENT(nfs_atomic_open_enter, 2806e0d0be7STrond Myklebust TP_PROTO( 2816e0d0be7STrond Myklebust const struct inode *dir, 2826e0d0be7STrond Myklebust const struct nfs_open_context *ctx, 2836e0d0be7STrond Myklebust unsigned int flags 2846e0d0be7STrond Myklebust ), 2856e0d0be7STrond Myklebust 2866e0d0be7STrond Myklebust TP_ARGS(dir, ctx, flags), 2876e0d0be7STrond Myklebust 2886e0d0be7STrond Myklebust TP_STRUCT__entry( 2896e0d0be7STrond Myklebust __field(unsigned int, flags) 2906e0d0be7STrond Myklebust __field(unsigned int, fmode) 2916e0d0be7STrond Myklebust __field(dev_t, dev) 2926e0d0be7STrond Myklebust __field(u64, dir) 2936e0d0be7STrond Myklebust __string(name, ctx->dentry->d_name.name) 2946e0d0be7STrond Myklebust ), 2956e0d0be7STrond Myklebust 2966e0d0be7STrond Myklebust TP_fast_assign( 2976e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 2986e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 2996e0d0be7STrond Myklebust __entry->flags = flags; 3006e0d0be7STrond Myklebust __entry->fmode = (__force unsigned int)ctx->mode; 3016e0d0be7STrond Myklebust __assign_str(name, ctx->dentry->d_name.name); 3026e0d0be7STrond Myklebust ), 3036e0d0be7STrond Myklebust 3046e0d0be7STrond Myklebust TP_printk( 3056e0d0be7STrond Myklebust "flags=%u (%s) fmode=%s name=%02x:%02x:%llu/%s", 3066e0d0be7STrond Myklebust __entry->flags, 3076e0d0be7STrond Myklebust show_open_flags(__entry->flags), 3086e0d0be7STrond Myklebust show_fmode_flags(__entry->fmode), 3096e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 3106e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 3116e0d0be7STrond Myklebust __get_str(name) 3126e0d0be7STrond Myklebust ) 3136e0d0be7STrond Myklebust ); 3146e0d0be7STrond Myklebust 3156e0d0be7STrond Myklebust TRACE_EVENT(nfs_atomic_open_exit, 3166e0d0be7STrond Myklebust TP_PROTO( 3176e0d0be7STrond Myklebust const struct inode *dir, 3186e0d0be7STrond Myklebust const struct nfs_open_context *ctx, 3196e0d0be7STrond Myklebust unsigned int flags, 3206e0d0be7STrond Myklebust int error 3216e0d0be7STrond Myklebust ), 3226e0d0be7STrond Myklebust 3236e0d0be7STrond Myklebust TP_ARGS(dir, ctx, flags, error), 3246e0d0be7STrond Myklebust 3256e0d0be7STrond Myklebust TP_STRUCT__entry( 3266e0d0be7STrond Myklebust __field(int, error) 3276e0d0be7STrond Myklebust __field(unsigned int, flags) 3286e0d0be7STrond Myklebust __field(unsigned int, fmode) 3296e0d0be7STrond Myklebust __field(dev_t, dev) 3306e0d0be7STrond Myklebust __field(u64, dir) 3316e0d0be7STrond Myklebust __string(name, ctx->dentry->d_name.name) 3326e0d0be7STrond Myklebust ), 3336e0d0be7STrond Myklebust 3346e0d0be7STrond Myklebust TP_fast_assign( 3356e0d0be7STrond Myklebust __entry->error = error; 3366e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 3376e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 3386e0d0be7STrond Myklebust __entry->flags = flags; 3396e0d0be7STrond Myklebust __entry->fmode = (__force unsigned int)ctx->mode; 3406e0d0be7STrond Myklebust __assign_str(name, ctx->dentry->d_name.name); 3416e0d0be7STrond Myklebust ), 3426e0d0be7STrond Myklebust 3436e0d0be7STrond Myklebust TP_printk( 3446e0d0be7STrond Myklebust "error=%d flags=%u (%s) fmode=%s " 3456e0d0be7STrond Myklebust "name=%02x:%02x:%llu/%s", 3466e0d0be7STrond Myklebust __entry->error, 3476e0d0be7STrond Myklebust __entry->flags, 3486e0d0be7STrond Myklebust show_open_flags(__entry->flags), 3496e0d0be7STrond Myklebust show_fmode_flags(__entry->fmode), 3506e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 3516e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 3526e0d0be7STrond Myklebust __get_str(name) 3536e0d0be7STrond Myklebust ) 3546e0d0be7STrond Myklebust ); 3556e0d0be7STrond Myklebust 3568b0ad3d4STrond Myklebust TRACE_EVENT(nfs_create_enter, 3578b0ad3d4STrond Myklebust TP_PROTO( 3588b0ad3d4STrond Myklebust const struct inode *dir, 3598b0ad3d4STrond Myklebust const struct dentry *dentry, 3608b0ad3d4STrond Myklebust unsigned int flags 3618b0ad3d4STrond Myklebust ), 3628b0ad3d4STrond Myklebust 3638b0ad3d4STrond Myklebust TP_ARGS(dir, dentry, flags), 3648b0ad3d4STrond Myklebust 3658b0ad3d4STrond Myklebust TP_STRUCT__entry( 3668b0ad3d4STrond Myklebust __field(unsigned int, flags) 3678b0ad3d4STrond Myklebust __field(dev_t, dev) 3688b0ad3d4STrond Myklebust __field(u64, dir) 3698b0ad3d4STrond Myklebust __string(name, dentry->d_name.name) 3708b0ad3d4STrond Myklebust ), 3718b0ad3d4STrond Myklebust 3728b0ad3d4STrond Myklebust TP_fast_assign( 3738b0ad3d4STrond Myklebust __entry->dev = dir->i_sb->s_dev; 3748b0ad3d4STrond Myklebust __entry->dir = NFS_FILEID(dir); 3758b0ad3d4STrond Myklebust __entry->flags = flags; 3768b0ad3d4STrond Myklebust __assign_str(name, dentry->d_name.name); 3778b0ad3d4STrond Myklebust ), 3788b0ad3d4STrond Myklebust 3798b0ad3d4STrond Myklebust TP_printk( 3808b0ad3d4STrond Myklebust "flags=%u (%s) name=%02x:%02x:%llu/%s", 3818b0ad3d4STrond Myklebust __entry->flags, 3828b0ad3d4STrond Myklebust show_open_flags(__entry->flags), 3838b0ad3d4STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 3848b0ad3d4STrond Myklebust (unsigned long long)__entry->dir, 3858b0ad3d4STrond Myklebust __get_str(name) 3868b0ad3d4STrond Myklebust ) 3878b0ad3d4STrond Myklebust ); 3888b0ad3d4STrond Myklebust 3898b0ad3d4STrond Myklebust TRACE_EVENT(nfs_create_exit, 3908b0ad3d4STrond Myklebust TP_PROTO( 3918b0ad3d4STrond Myklebust const struct inode *dir, 3928b0ad3d4STrond Myklebust const struct dentry *dentry, 3938b0ad3d4STrond Myklebust unsigned int flags, 3948b0ad3d4STrond Myklebust int error 3958b0ad3d4STrond Myklebust ), 3968b0ad3d4STrond Myklebust 3978b0ad3d4STrond Myklebust TP_ARGS(dir, dentry, flags, error), 3988b0ad3d4STrond Myklebust 3998b0ad3d4STrond Myklebust TP_STRUCT__entry( 4008b0ad3d4STrond Myklebust __field(int, error) 4018b0ad3d4STrond Myklebust __field(unsigned int, flags) 4028b0ad3d4STrond Myklebust __field(dev_t, dev) 4038b0ad3d4STrond Myklebust __field(u64, dir) 4048b0ad3d4STrond Myklebust __string(name, dentry->d_name.name) 4058b0ad3d4STrond Myklebust ), 4068b0ad3d4STrond Myklebust 4078b0ad3d4STrond Myklebust TP_fast_assign( 4088b0ad3d4STrond Myklebust __entry->error = error; 4098b0ad3d4STrond Myklebust __entry->dev = dir->i_sb->s_dev; 4108b0ad3d4STrond Myklebust __entry->dir = NFS_FILEID(dir); 4118b0ad3d4STrond Myklebust __entry->flags = flags; 4128b0ad3d4STrond Myklebust __assign_str(name, dentry->d_name.name); 4138b0ad3d4STrond Myklebust ), 4148b0ad3d4STrond Myklebust 4158b0ad3d4STrond Myklebust TP_printk( 4168b0ad3d4STrond Myklebust "error=%d flags=%u (%s) name=%02x:%02x:%llu/%s", 4178b0ad3d4STrond Myklebust __entry->error, 4188b0ad3d4STrond Myklebust __entry->flags, 4198b0ad3d4STrond Myklebust show_open_flags(__entry->flags), 4208b0ad3d4STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 4218b0ad3d4STrond Myklebust (unsigned long long)__entry->dir, 4228b0ad3d4STrond Myklebust __get_str(name) 4238b0ad3d4STrond Myklebust ) 4248b0ad3d4STrond Myklebust ); 4258b0ad3d4STrond Myklebust 4261ca42382STrond Myklebust DECLARE_EVENT_CLASS(nfs_directory_event, 4271ca42382STrond Myklebust TP_PROTO( 4281ca42382STrond Myklebust const struct inode *dir, 4291ca42382STrond Myklebust const struct dentry *dentry 4301ca42382STrond Myklebust ), 4311ca42382STrond Myklebust 4321ca42382STrond Myklebust TP_ARGS(dir, dentry), 4331ca42382STrond Myklebust 4341ca42382STrond Myklebust TP_STRUCT__entry( 4351ca42382STrond Myklebust __field(dev_t, dev) 4361ca42382STrond Myklebust __field(u64, dir) 4371ca42382STrond Myklebust __string(name, dentry->d_name.name) 4381ca42382STrond Myklebust ), 4391ca42382STrond Myklebust 4401ca42382STrond Myklebust TP_fast_assign( 4411ca42382STrond Myklebust __entry->dev = dir->i_sb->s_dev; 4421ca42382STrond Myklebust __entry->dir = NFS_FILEID(dir); 4431ca42382STrond Myklebust __assign_str(name, dentry->d_name.name); 4441ca42382STrond Myklebust ), 4451ca42382STrond Myklebust 4461ca42382STrond Myklebust TP_printk( 4471ca42382STrond Myklebust "name=%02x:%02x:%llu/%s", 4481ca42382STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 4491ca42382STrond Myklebust (unsigned long long)__entry->dir, 4501ca42382STrond Myklebust __get_str(name) 4511ca42382STrond Myklebust ) 4521ca42382STrond Myklebust ); 4531ca42382STrond Myklebust 4541ca42382STrond Myklebust #define DEFINE_NFS_DIRECTORY_EVENT(name) \ 4551ca42382STrond Myklebust DEFINE_EVENT(nfs_directory_event, name, \ 4561ca42382STrond Myklebust TP_PROTO( \ 4571ca42382STrond Myklebust const struct inode *dir, \ 4581ca42382STrond Myklebust const struct dentry *dentry \ 4591ca42382STrond Myklebust ), \ 4601ca42382STrond Myklebust TP_ARGS(dir, dentry)) 4611ca42382STrond Myklebust 4621ca42382STrond Myklebust DECLARE_EVENT_CLASS(nfs_directory_event_done, 4631ca42382STrond Myklebust TP_PROTO( 4641ca42382STrond Myklebust const struct inode *dir, 4651ca42382STrond Myklebust const struct dentry *dentry, 4661ca42382STrond Myklebust int error 4671ca42382STrond Myklebust ), 4681ca42382STrond Myklebust 4691ca42382STrond Myklebust TP_ARGS(dir, dentry, error), 4701ca42382STrond Myklebust 4711ca42382STrond Myklebust TP_STRUCT__entry( 4721ca42382STrond Myklebust __field(int, error) 4731ca42382STrond Myklebust __field(dev_t, dev) 4741ca42382STrond Myklebust __field(u64, dir) 4751ca42382STrond Myklebust __string(name, dentry->d_name.name) 4761ca42382STrond Myklebust ), 4771ca42382STrond Myklebust 4781ca42382STrond Myklebust TP_fast_assign( 4791ca42382STrond Myklebust __entry->dev = dir->i_sb->s_dev; 4801ca42382STrond Myklebust __entry->dir = NFS_FILEID(dir); 4811ca42382STrond Myklebust __entry->error = error; 4821ca42382STrond Myklebust __assign_str(name, dentry->d_name.name); 4831ca42382STrond Myklebust ), 4841ca42382STrond Myklebust 4851ca42382STrond Myklebust TP_printk( 4861ca42382STrond Myklebust "error=%d name=%02x:%02x:%llu/%s", 4871ca42382STrond Myklebust __entry->error, 4881ca42382STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 4891ca42382STrond Myklebust (unsigned long long)__entry->dir, 4901ca42382STrond Myklebust __get_str(name) 4911ca42382STrond Myklebust ) 4921ca42382STrond Myklebust ); 4931ca42382STrond Myklebust 4941ca42382STrond Myklebust #define DEFINE_NFS_DIRECTORY_EVENT_DONE(name) \ 4951ca42382STrond Myklebust DEFINE_EVENT(nfs_directory_event_done, name, \ 4961ca42382STrond Myklebust TP_PROTO( \ 4971ca42382STrond Myklebust const struct inode *dir, \ 4981ca42382STrond Myklebust const struct dentry *dentry, \ 4991ca42382STrond Myklebust int error \ 5001ca42382STrond Myklebust ), \ 5011ca42382STrond Myklebust TP_ARGS(dir, dentry, error)) 5021ca42382STrond Myklebust 5031ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_mknod_enter); 5041ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mknod_exit); 5051ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_mkdir_enter); 5061ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mkdir_exit); 5071ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_rmdir_enter); 5081ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_rmdir_exit); 5091ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_remove_enter); 5101ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_remove_exit); 5111ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_unlink_enter); 5121ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exit); 5131ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT(nfs_symlink_enter); 5141ca42382STrond Myklebust DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_symlink_exit); 5151ca42382STrond Myklebust 5161fd1085bSTrond Myklebust TRACE_EVENT(nfs_link_enter, 5171fd1085bSTrond Myklebust TP_PROTO( 5181fd1085bSTrond Myklebust const struct inode *inode, 5191fd1085bSTrond Myklebust const struct inode *dir, 5201fd1085bSTrond Myklebust const struct dentry *dentry 5211fd1085bSTrond Myklebust ), 5221fd1085bSTrond Myklebust 5231fd1085bSTrond Myklebust TP_ARGS(inode, dir, dentry), 5241fd1085bSTrond Myklebust 5251fd1085bSTrond Myklebust TP_STRUCT__entry( 5261fd1085bSTrond Myklebust __field(dev_t, dev) 5271fd1085bSTrond Myklebust __field(u64, fileid) 5281fd1085bSTrond Myklebust __field(u64, dir) 5291fd1085bSTrond Myklebust __string(name, dentry->d_name.name) 5301fd1085bSTrond Myklebust ), 5311fd1085bSTrond Myklebust 5321fd1085bSTrond Myklebust TP_fast_assign( 5331fd1085bSTrond Myklebust __entry->dev = inode->i_sb->s_dev; 5341fd1085bSTrond Myklebust __entry->fileid = NFS_FILEID(inode); 5351fd1085bSTrond Myklebust __entry->dir = NFS_FILEID(dir); 5361fd1085bSTrond Myklebust __assign_str(name, dentry->d_name.name); 5371fd1085bSTrond Myklebust ), 5381fd1085bSTrond Myklebust 5391fd1085bSTrond Myklebust TP_printk( 5401fd1085bSTrond Myklebust "fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s", 5411fd1085bSTrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 5421fd1085bSTrond Myklebust __entry->fileid, 5431fd1085bSTrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 5441fd1085bSTrond Myklebust (unsigned long long)__entry->dir, 5451fd1085bSTrond Myklebust __get_str(name) 5461fd1085bSTrond Myklebust ) 5471fd1085bSTrond Myklebust ); 5481fd1085bSTrond Myklebust 5491fd1085bSTrond Myklebust TRACE_EVENT(nfs_link_exit, 5501fd1085bSTrond Myklebust TP_PROTO( 5511fd1085bSTrond Myklebust const struct inode *inode, 5521fd1085bSTrond Myklebust const struct inode *dir, 5531fd1085bSTrond Myklebust const struct dentry *dentry, 5541fd1085bSTrond Myklebust int error 5551fd1085bSTrond Myklebust ), 5561fd1085bSTrond Myklebust 5571fd1085bSTrond Myklebust TP_ARGS(inode, dir, dentry, error), 5581fd1085bSTrond Myklebust 5591fd1085bSTrond Myklebust TP_STRUCT__entry( 5601fd1085bSTrond Myklebust __field(int, error) 5611fd1085bSTrond Myklebust __field(dev_t, dev) 5621fd1085bSTrond Myklebust __field(u64, fileid) 5631fd1085bSTrond Myklebust __field(u64, dir) 5641fd1085bSTrond Myklebust __string(name, dentry->d_name.name) 5651fd1085bSTrond Myklebust ), 5661fd1085bSTrond Myklebust 5671fd1085bSTrond Myklebust TP_fast_assign( 5681fd1085bSTrond Myklebust __entry->dev = inode->i_sb->s_dev; 5691fd1085bSTrond Myklebust __entry->fileid = NFS_FILEID(inode); 5701fd1085bSTrond Myklebust __entry->dir = NFS_FILEID(dir); 5711fd1085bSTrond Myklebust __entry->error = error; 5721fd1085bSTrond Myklebust __assign_str(name, dentry->d_name.name); 5731fd1085bSTrond Myklebust ), 5741fd1085bSTrond Myklebust 5751fd1085bSTrond Myklebust TP_printk( 5761fd1085bSTrond Myklebust "error=%d fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s", 5771fd1085bSTrond Myklebust __entry->error, 5781fd1085bSTrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 5791fd1085bSTrond Myklebust __entry->fileid, 5801fd1085bSTrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 5811fd1085bSTrond Myklebust (unsigned long long)__entry->dir, 5821fd1085bSTrond Myklebust __get_str(name) 5831fd1085bSTrond Myklebust ) 5841fd1085bSTrond Myklebust ); 5851fd1085bSTrond Myklebust 58670ded201STrond Myklebust DECLARE_EVENT_CLASS(nfs_rename_event, 58770ded201STrond Myklebust TP_PROTO( 58870ded201STrond Myklebust const struct inode *old_dir, 58970ded201STrond Myklebust const struct dentry *old_dentry, 59070ded201STrond Myklebust const struct inode *new_dir, 59170ded201STrond Myklebust const struct dentry *new_dentry 59270ded201STrond Myklebust ), 59370ded201STrond Myklebust 59470ded201STrond Myklebust TP_ARGS(old_dir, old_dentry, new_dir, new_dentry), 59570ded201STrond Myklebust 59670ded201STrond Myklebust TP_STRUCT__entry( 59770ded201STrond Myklebust __field(dev_t, dev) 59870ded201STrond Myklebust __field(u64, old_dir) 59970ded201STrond Myklebust __field(u64, new_dir) 60070ded201STrond Myklebust __string(old_name, old_dentry->d_name.name) 60170ded201STrond Myklebust __string(new_name, new_dentry->d_name.name) 60270ded201STrond Myklebust ), 60370ded201STrond Myklebust 60470ded201STrond Myklebust TP_fast_assign( 60570ded201STrond Myklebust __entry->dev = old_dir->i_sb->s_dev; 60670ded201STrond Myklebust __entry->old_dir = NFS_FILEID(old_dir); 60770ded201STrond Myklebust __entry->new_dir = NFS_FILEID(new_dir); 60870ded201STrond Myklebust __assign_str(old_name, old_dentry->d_name.name); 60970ded201STrond Myklebust __assign_str(new_name, new_dentry->d_name.name); 61070ded201STrond Myklebust ), 61170ded201STrond Myklebust 61270ded201STrond Myklebust TP_printk( 61370ded201STrond Myklebust "old_name=%02x:%02x:%llu/%s new_name=%02x:%02x:%llu/%s", 61470ded201STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 61570ded201STrond Myklebust (unsigned long long)__entry->old_dir, 61670ded201STrond Myklebust __get_str(old_name), 61770ded201STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 61870ded201STrond Myklebust (unsigned long long)__entry->new_dir, 61970ded201STrond Myklebust __get_str(new_name) 62070ded201STrond Myklebust ) 62170ded201STrond Myklebust ); 62270ded201STrond Myklebust #define DEFINE_NFS_RENAME_EVENT(name) \ 62370ded201STrond Myklebust DEFINE_EVENT(nfs_rename_event, name, \ 62470ded201STrond Myklebust TP_PROTO( \ 62570ded201STrond Myklebust const struct inode *old_dir, \ 62670ded201STrond Myklebust const struct dentry *old_dentry, \ 62770ded201STrond Myklebust const struct inode *new_dir, \ 62870ded201STrond Myklebust const struct dentry *new_dentry \ 62970ded201STrond Myklebust ), \ 63070ded201STrond Myklebust TP_ARGS(old_dir, old_dentry, new_dir, new_dentry)) 63170ded201STrond Myklebust 63270ded201STrond Myklebust DECLARE_EVENT_CLASS(nfs_rename_event_done, 63370ded201STrond Myklebust TP_PROTO( 63470ded201STrond Myklebust const struct inode *old_dir, 63570ded201STrond Myklebust const struct dentry *old_dentry, 63670ded201STrond Myklebust const struct inode *new_dir, 63770ded201STrond Myklebust const struct dentry *new_dentry, 63870ded201STrond Myklebust int error 63970ded201STrond Myklebust ), 64070ded201STrond Myklebust 64170ded201STrond Myklebust TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error), 64270ded201STrond Myklebust 64370ded201STrond Myklebust TP_STRUCT__entry( 64470ded201STrond Myklebust __field(dev_t, dev) 64570ded201STrond Myklebust __field(int, error) 64670ded201STrond Myklebust __field(u64, old_dir) 64770ded201STrond Myklebust __string(old_name, old_dentry->d_name.name) 64870ded201STrond Myklebust __field(u64, new_dir) 64970ded201STrond Myklebust __string(new_name, new_dentry->d_name.name) 65070ded201STrond Myklebust ), 65170ded201STrond Myklebust 65270ded201STrond Myklebust TP_fast_assign( 65370ded201STrond Myklebust __entry->dev = old_dir->i_sb->s_dev; 65470ded201STrond Myklebust __entry->old_dir = NFS_FILEID(old_dir); 65570ded201STrond Myklebust __entry->new_dir = NFS_FILEID(new_dir); 65670ded201STrond Myklebust __entry->error = error; 65770ded201STrond Myklebust __assign_str(old_name, old_dentry->d_name.name); 65870ded201STrond Myklebust __assign_str(new_name, new_dentry->d_name.name); 65970ded201STrond Myklebust ), 66070ded201STrond Myklebust 66170ded201STrond Myklebust TP_printk( 66270ded201STrond Myklebust "error=%d old_name=%02x:%02x:%llu/%s " 66370ded201STrond Myklebust "new_name=%02x:%02x:%llu/%s", 66470ded201STrond Myklebust __entry->error, 66570ded201STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 66670ded201STrond Myklebust (unsigned long long)__entry->old_dir, 66770ded201STrond Myklebust __get_str(old_name), 66870ded201STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 66970ded201STrond Myklebust (unsigned long long)__entry->new_dir, 67070ded201STrond Myklebust __get_str(new_name) 67170ded201STrond Myklebust ) 67270ded201STrond Myklebust ); 67370ded201STrond Myklebust #define DEFINE_NFS_RENAME_EVENT_DONE(name) \ 67470ded201STrond Myklebust DEFINE_EVENT(nfs_rename_event_done, name, \ 67570ded201STrond Myklebust TP_PROTO( \ 67670ded201STrond Myklebust const struct inode *old_dir, \ 67770ded201STrond Myklebust const struct dentry *old_dentry, \ 67870ded201STrond Myklebust const struct inode *new_dir, \ 67970ded201STrond Myklebust const struct dentry *new_dentry, \ 68070ded201STrond Myklebust int error \ 68170ded201STrond Myklebust ), \ 68270ded201STrond Myklebust TP_ARGS(old_dir, old_dentry, new_dir, \ 68370ded201STrond Myklebust new_dentry, error)) 68470ded201STrond Myklebust 68570ded201STrond Myklebust DEFINE_NFS_RENAME_EVENT(nfs_rename_enter); 68670ded201STrond Myklebust DEFINE_NFS_RENAME_EVENT_DONE(nfs_rename_exit); 68770ded201STrond Myklebust 68870ded201STrond Myklebust DEFINE_NFS_RENAME_EVENT_DONE(nfs_sillyrename_rename); 68970ded201STrond Myklebust 69070ded201STrond Myklebust TRACE_EVENT(nfs_sillyrename_unlink, 69170ded201STrond Myklebust TP_PROTO( 69270ded201STrond Myklebust const struct nfs_unlinkdata *data, 69370ded201STrond Myklebust int error 69470ded201STrond Myklebust ), 69570ded201STrond Myklebust 69670ded201STrond Myklebust TP_ARGS(data, error), 69770ded201STrond Myklebust 69870ded201STrond Myklebust TP_STRUCT__entry( 69970ded201STrond Myklebust __field(dev_t, dev) 70070ded201STrond Myklebust __field(int, error) 70170ded201STrond Myklebust __field(u64, dir) 70270ded201STrond Myklebust __dynamic_array(char, name, data->args.name.len + 1) 70370ded201STrond Myklebust ), 70470ded201STrond Myklebust 70570ded201STrond Myklebust TP_fast_assign( 70670ded201STrond Myklebust struct inode *dir = data->dir; 70770ded201STrond Myklebust size_t len = data->args.name.len; 70870ded201STrond Myklebust __entry->dev = dir->i_sb->s_dev; 70970ded201STrond Myklebust __entry->dir = NFS_FILEID(dir); 71070ded201STrond Myklebust __entry->error = error; 71170ded201STrond Myklebust memcpy(__get_dynamic_array(name), 71270ded201STrond Myklebust data->args.name.name, len); 71370ded201STrond Myklebust ((char *)__get_dynamic_array(name))[len] = 0; 71470ded201STrond Myklebust ), 71570ded201STrond Myklebust 71670ded201STrond Myklebust TP_printk( 71770ded201STrond Myklebust "error=%d name=%02x:%02x:%llu/%s", 71870ded201STrond Myklebust __entry->error, 71970ded201STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 72070ded201STrond Myklebust (unsigned long long)__entry->dir, 72170ded201STrond Myklebust __get_str(name) 72270ded201STrond Myklebust ) 72370ded201STrond Myklebust ); 724f4ce1299STrond Myklebust #endif /* _TRACE_NFS_H */ 725f4ce1299STrond Myklebust 726f4ce1299STrond Myklebust #undef TRACE_INCLUDE_PATH 727f4ce1299STrond Myklebust #define TRACE_INCLUDE_PATH . 728f4ce1299STrond Myklebust #define TRACE_INCLUDE_FILE nfstrace 729f4ce1299STrond Myklebust /* This part must be outside protection */ 730f4ce1299STrond Myklebust #include <trace/define_trace.h> 731