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" }, \ 39f4ce1299STrond Myklebust { 1 << NFS_INO_FLUSHING, "FLUSHING" }, \ 40f4ce1299STrond Myklebust { 1 << NFS_INO_FSCACHE, "FSCACHE" }, \ 41f4ce1299STrond Myklebust { 1 << NFS_INO_COMMIT, "COMMIT" }, \ 42f4ce1299STrond Myklebust { 1 << NFS_INO_LAYOUTCOMMIT, "NEED_LAYOUTCOMMIT" }, \ 43f4ce1299STrond Myklebust { 1 << NFS_INO_LAYOUTCOMMITTING, "LAYOUTCOMMIT" }) 44f4ce1299STrond Myklebust 45f4ce1299STrond Myklebust DECLARE_EVENT_CLASS(nfs_inode_event, 46f4ce1299STrond Myklebust TP_PROTO( 47f4ce1299STrond Myklebust const struct inode *inode 48f4ce1299STrond Myklebust ), 49f4ce1299STrond Myklebust 50f4ce1299STrond Myklebust TP_ARGS(inode), 51f4ce1299STrond Myklebust 52f4ce1299STrond Myklebust TP_STRUCT__entry( 53f4ce1299STrond Myklebust __field(dev_t, dev) 54f4ce1299STrond Myklebust __field(u32, fhandle) 55f4ce1299STrond Myklebust __field(u64, fileid) 56f4ce1299STrond Myklebust __field(u64, version) 57f4ce1299STrond Myklebust ), 58f4ce1299STrond Myklebust 59f4ce1299STrond Myklebust TP_fast_assign( 60f4ce1299STrond Myklebust const struct nfs_inode *nfsi = NFS_I(inode); 61f4ce1299STrond Myklebust __entry->dev = inode->i_sb->s_dev; 62f4ce1299STrond Myklebust __entry->fileid = nfsi->fileid; 63f4ce1299STrond Myklebust __entry->fhandle = nfs_fhandle_hash(&nfsi->fh); 64f4ce1299STrond Myklebust __entry->version = inode->i_version; 65f4ce1299STrond Myklebust ), 66f4ce1299STrond Myklebust 67f4ce1299STrond Myklebust TP_printk( 68f4ce1299STrond Myklebust "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu ", 69f4ce1299STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 70f4ce1299STrond Myklebust (unsigned long long)__entry->fileid, 71f4ce1299STrond Myklebust __entry->fhandle, 72f4ce1299STrond Myklebust (unsigned long long)__entry->version 73f4ce1299STrond Myklebust ) 74f4ce1299STrond Myklebust ); 75f4ce1299STrond Myklebust 76f4ce1299STrond Myklebust DECLARE_EVENT_CLASS(nfs_inode_event_done, 77f4ce1299STrond Myklebust TP_PROTO( 78f4ce1299STrond Myklebust const struct inode *inode, 79f4ce1299STrond Myklebust int error 80f4ce1299STrond Myklebust ), 81f4ce1299STrond Myklebust 82f4ce1299STrond Myklebust TP_ARGS(inode, error), 83f4ce1299STrond Myklebust 84f4ce1299STrond Myklebust TP_STRUCT__entry( 85f4ce1299STrond Myklebust __field(int, error) 86f4ce1299STrond Myklebust __field(dev_t, dev) 87f4ce1299STrond Myklebust __field(u32, fhandle) 88f4ce1299STrond Myklebust __field(unsigned char, type) 89f4ce1299STrond Myklebust __field(u64, fileid) 90f4ce1299STrond Myklebust __field(u64, version) 91f4ce1299STrond Myklebust __field(loff_t, size) 92f4ce1299STrond Myklebust __field(unsigned long, nfsi_flags) 93f4ce1299STrond Myklebust __field(unsigned long, cache_validity) 94f4ce1299STrond Myklebust ), 95f4ce1299STrond Myklebust 96f4ce1299STrond Myklebust TP_fast_assign( 97f4ce1299STrond Myklebust const struct nfs_inode *nfsi = NFS_I(inode); 98f4ce1299STrond Myklebust __entry->error = error; 99f4ce1299STrond Myklebust __entry->dev = inode->i_sb->s_dev; 100f4ce1299STrond Myklebust __entry->fileid = nfsi->fileid; 101f4ce1299STrond Myklebust __entry->fhandle = nfs_fhandle_hash(&nfsi->fh); 102f4ce1299STrond Myklebust __entry->type = nfs_umode_to_dtype(inode->i_mode); 103f4ce1299STrond Myklebust __entry->version = inode->i_version; 104f4ce1299STrond Myklebust __entry->size = i_size_read(inode); 105f4ce1299STrond Myklebust __entry->nfsi_flags = nfsi->flags; 106f4ce1299STrond Myklebust __entry->cache_validity = nfsi->cache_validity; 107f4ce1299STrond Myklebust ), 108f4ce1299STrond Myklebust 109f4ce1299STrond Myklebust TP_printk( 110f4ce1299STrond Myklebust "error=%d fileid=%02x:%02x:%llu fhandle=0x%08x " 111f4ce1299STrond Myklebust "type=%u (%s) version=%llu size=%lld " 112f4ce1299STrond Myklebust "cache_validity=%lu (%s) nfs_flags=%ld (%s)", 113f4ce1299STrond Myklebust __entry->error, 114f4ce1299STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 115f4ce1299STrond Myklebust (unsigned long long)__entry->fileid, 116f4ce1299STrond Myklebust __entry->fhandle, 117f4ce1299STrond Myklebust __entry->type, 118f4ce1299STrond Myklebust nfs_show_file_type(__entry->type), 119f4ce1299STrond Myklebust (unsigned long long)__entry->version, 120f4ce1299STrond Myklebust (long long)__entry->size, 121f4ce1299STrond Myklebust __entry->cache_validity, 122f4ce1299STrond Myklebust nfs_show_cache_validity(__entry->cache_validity), 123f4ce1299STrond Myklebust __entry->nfsi_flags, 124f4ce1299STrond Myklebust nfs_show_nfsi_flags(__entry->nfsi_flags) 125f4ce1299STrond Myklebust ) 126f4ce1299STrond Myklebust ); 127f4ce1299STrond Myklebust 128f4ce1299STrond Myklebust #define DEFINE_NFS_INODE_EVENT(name) \ 129f4ce1299STrond Myklebust DEFINE_EVENT(nfs_inode_event, name, \ 130f4ce1299STrond Myklebust TP_PROTO( \ 131f4ce1299STrond Myklebust const struct inode *inode \ 132f4ce1299STrond Myklebust ), \ 133f4ce1299STrond Myklebust TP_ARGS(inode)) 134f4ce1299STrond Myklebust #define DEFINE_NFS_INODE_EVENT_DONE(name) \ 135f4ce1299STrond Myklebust DEFINE_EVENT(nfs_inode_event_done, name, \ 136f4ce1299STrond Myklebust TP_PROTO( \ 137f4ce1299STrond Myklebust const struct inode *inode, \ 138f4ce1299STrond Myklebust int error \ 139f4ce1299STrond Myklebust ), \ 140f4ce1299STrond Myklebust TP_ARGS(inode, error)) 141f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter); 142f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_exit); 143f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_enter); 144f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_inode_exit); 145f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_enter); 146f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_mapping_exit); 147f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_getattr_enter); 148f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit); 149f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_setattr_enter); 150f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit); 151f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_writeback_page_enter); 152f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_page_exit); 153f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_enter); 154f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit); 155f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_fsync_enter); 156f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit); 157f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT(nfs_access_enter); 158f4ce1299STrond Myklebust DEFINE_NFS_INODE_EVENT_DONE(nfs_access_exit); 159f4ce1299STrond Myklebust 160*6e0d0be7STrond Myklebust #define show_lookup_flags(flags) \ 161*6e0d0be7STrond Myklebust __print_flags((unsigned long)flags, "|", \ 162*6e0d0be7STrond Myklebust { LOOKUP_AUTOMOUNT, "AUTOMOUNT" }, \ 163*6e0d0be7STrond Myklebust { LOOKUP_DIRECTORY, "DIRECTORY" }, \ 164*6e0d0be7STrond Myklebust { LOOKUP_OPEN, "OPEN" }, \ 165*6e0d0be7STrond Myklebust { LOOKUP_CREATE, "CREATE" }, \ 166*6e0d0be7STrond Myklebust { LOOKUP_EXCL, "EXCL" }) 167*6e0d0be7STrond Myklebust 168*6e0d0be7STrond Myklebust DECLARE_EVENT_CLASS(nfs_lookup_event, 169*6e0d0be7STrond Myklebust TP_PROTO( 170*6e0d0be7STrond Myklebust const struct inode *dir, 171*6e0d0be7STrond Myklebust const struct dentry *dentry, 172*6e0d0be7STrond Myklebust unsigned int flags 173*6e0d0be7STrond Myklebust ), 174*6e0d0be7STrond Myklebust 175*6e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags), 176*6e0d0be7STrond Myklebust 177*6e0d0be7STrond Myklebust TP_STRUCT__entry( 178*6e0d0be7STrond Myklebust __field(unsigned int, flags) 179*6e0d0be7STrond Myklebust __field(dev_t, dev) 180*6e0d0be7STrond Myklebust __field(u64, dir) 181*6e0d0be7STrond Myklebust __string(name, dentry->d_name.name) 182*6e0d0be7STrond Myklebust ), 183*6e0d0be7STrond Myklebust 184*6e0d0be7STrond Myklebust TP_fast_assign( 185*6e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 186*6e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 187*6e0d0be7STrond Myklebust __entry->flags = flags; 188*6e0d0be7STrond Myklebust __assign_str(name, dentry->d_name.name); 189*6e0d0be7STrond Myklebust ), 190*6e0d0be7STrond Myklebust 191*6e0d0be7STrond Myklebust TP_printk( 192*6e0d0be7STrond Myklebust "flags=%u (%s) name=%02x:%02x:%llu/%s", 193*6e0d0be7STrond Myklebust __entry->flags, 194*6e0d0be7STrond Myklebust show_lookup_flags(__entry->flags), 195*6e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 196*6e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 197*6e0d0be7STrond Myklebust __get_str(name) 198*6e0d0be7STrond Myklebust ) 199*6e0d0be7STrond Myklebust ); 200*6e0d0be7STrond Myklebust 201*6e0d0be7STrond Myklebust #define DEFINE_NFS_LOOKUP_EVENT(name) \ 202*6e0d0be7STrond Myklebust DEFINE_EVENT(nfs_lookup_event, name, \ 203*6e0d0be7STrond Myklebust TP_PROTO( \ 204*6e0d0be7STrond Myklebust const struct inode *dir, \ 205*6e0d0be7STrond Myklebust const struct dentry *dentry, \ 206*6e0d0be7STrond Myklebust unsigned int flags \ 207*6e0d0be7STrond Myklebust ), \ 208*6e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags)) 209*6e0d0be7STrond Myklebust 210*6e0d0be7STrond Myklebust DECLARE_EVENT_CLASS(nfs_lookup_event_done, 211*6e0d0be7STrond Myklebust TP_PROTO( 212*6e0d0be7STrond Myklebust const struct inode *dir, 213*6e0d0be7STrond Myklebust const struct dentry *dentry, 214*6e0d0be7STrond Myklebust unsigned int flags, 215*6e0d0be7STrond Myklebust int error 216*6e0d0be7STrond Myklebust ), 217*6e0d0be7STrond Myklebust 218*6e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags, error), 219*6e0d0be7STrond Myklebust 220*6e0d0be7STrond Myklebust TP_STRUCT__entry( 221*6e0d0be7STrond Myklebust __field(int, error) 222*6e0d0be7STrond Myklebust __field(unsigned int, flags) 223*6e0d0be7STrond Myklebust __field(dev_t, dev) 224*6e0d0be7STrond Myklebust __field(u64, dir) 225*6e0d0be7STrond Myklebust __string(name, dentry->d_name.name) 226*6e0d0be7STrond Myklebust ), 227*6e0d0be7STrond Myklebust 228*6e0d0be7STrond Myklebust TP_fast_assign( 229*6e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 230*6e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 231*6e0d0be7STrond Myklebust __entry->error = error; 232*6e0d0be7STrond Myklebust __entry->flags = flags; 233*6e0d0be7STrond Myklebust __assign_str(name, dentry->d_name.name); 234*6e0d0be7STrond Myklebust ), 235*6e0d0be7STrond Myklebust 236*6e0d0be7STrond Myklebust TP_printk( 237*6e0d0be7STrond Myklebust "error=%d flags=%u (%s) name=%02x:%02x:%llu/%s", 238*6e0d0be7STrond Myklebust __entry->error, 239*6e0d0be7STrond Myklebust __entry->flags, 240*6e0d0be7STrond Myklebust show_lookup_flags(__entry->flags), 241*6e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 242*6e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 243*6e0d0be7STrond Myklebust __get_str(name) 244*6e0d0be7STrond Myklebust ) 245*6e0d0be7STrond Myklebust ); 246*6e0d0be7STrond Myklebust 247*6e0d0be7STrond Myklebust #define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \ 248*6e0d0be7STrond Myklebust DEFINE_EVENT(nfs_lookup_event_done, name, \ 249*6e0d0be7STrond Myklebust TP_PROTO( \ 250*6e0d0be7STrond Myklebust const struct inode *dir, \ 251*6e0d0be7STrond Myklebust const struct dentry *dentry, \ 252*6e0d0be7STrond Myklebust unsigned int flags, \ 253*6e0d0be7STrond Myklebust int error \ 254*6e0d0be7STrond Myklebust ), \ 255*6e0d0be7STrond Myklebust TP_ARGS(dir, dentry, flags, error)) 256*6e0d0be7STrond Myklebust 257*6e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter); 258*6e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit); 259*6e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_enter); 260*6e0d0be7STrond Myklebust DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revalidate_exit); 261*6e0d0be7STrond Myklebust 262*6e0d0be7STrond Myklebust #define show_open_flags(flags) \ 263*6e0d0be7STrond Myklebust __print_flags((unsigned long)flags, "|", \ 264*6e0d0be7STrond Myklebust { O_CREAT, "O_CREAT" }, \ 265*6e0d0be7STrond Myklebust { O_EXCL, "O_EXCL" }, \ 266*6e0d0be7STrond Myklebust { O_TRUNC, "O_TRUNC" }, \ 267*6e0d0be7STrond Myklebust { O_APPEND, "O_APPEND" }, \ 268*6e0d0be7STrond Myklebust { O_DSYNC, "O_DSYNC" }, \ 269*6e0d0be7STrond Myklebust { O_DIRECT, "O_DIRECT" }, \ 270*6e0d0be7STrond Myklebust { O_DIRECTORY, "O_DIRECTORY" }) 271*6e0d0be7STrond Myklebust 272*6e0d0be7STrond Myklebust #define show_fmode_flags(mode) \ 273*6e0d0be7STrond Myklebust __print_flags(mode, "|", \ 274*6e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_READ), "READ" }, \ 275*6e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_WRITE), "WRITE" }, \ 276*6e0d0be7STrond Myklebust { ((__force unsigned long)FMODE_EXEC), "EXEC" }) 277*6e0d0be7STrond Myklebust 278*6e0d0be7STrond Myklebust TRACE_EVENT(nfs_atomic_open_enter, 279*6e0d0be7STrond Myklebust TP_PROTO( 280*6e0d0be7STrond Myklebust const struct inode *dir, 281*6e0d0be7STrond Myklebust const struct nfs_open_context *ctx, 282*6e0d0be7STrond Myklebust unsigned int flags 283*6e0d0be7STrond Myklebust ), 284*6e0d0be7STrond Myklebust 285*6e0d0be7STrond Myklebust TP_ARGS(dir, ctx, flags), 286*6e0d0be7STrond Myklebust 287*6e0d0be7STrond Myklebust TP_STRUCT__entry( 288*6e0d0be7STrond Myklebust __field(unsigned int, flags) 289*6e0d0be7STrond Myklebust __field(unsigned int, fmode) 290*6e0d0be7STrond Myklebust __field(dev_t, dev) 291*6e0d0be7STrond Myklebust __field(u64, dir) 292*6e0d0be7STrond Myklebust __string(name, ctx->dentry->d_name.name) 293*6e0d0be7STrond Myklebust ), 294*6e0d0be7STrond Myklebust 295*6e0d0be7STrond Myklebust TP_fast_assign( 296*6e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 297*6e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 298*6e0d0be7STrond Myklebust __entry->flags = flags; 299*6e0d0be7STrond Myklebust __entry->fmode = (__force unsigned int)ctx->mode; 300*6e0d0be7STrond Myklebust __assign_str(name, ctx->dentry->d_name.name); 301*6e0d0be7STrond Myklebust ), 302*6e0d0be7STrond Myklebust 303*6e0d0be7STrond Myklebust TP_printk( 304*6e0d0be7STrond Myklebust "flags=%u (%s) fmode=%s name=%02x:%02x:%llu/%s", 305*6e0d0be7STrond Myklebust __entry->flags, 306*6e0d0be7STrond Myklebust show_open_flags(__entry->flags), 307*6e0d0be7STrond Myklebust show_fmode_flags(__entry->fmode), 308*6e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 309*6e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 310*6e0d0be7STrond Myklebust __get_str(name) 311*6e0d0be7STrond Myklebust ) 312*6e0d0be7STrond Myklebust ); 313*6e0d0be7STrond Myklebust 314*6e0d0be7STrond Myklebust TRACE_EVENT(nfs_atomic_open_exit, 315*6e0d0be7STrond Myklebust TP_PROTO( 316*6e0d0be7STrond Myklebust const struct inode *dir, 317*6e0d0be7STrond Myklebust const struct nfs_open_context *ctx, 318*6e0d0be7STrond Myklebust unsigned int flags, 319*6e0d0be7STrond Myklebust int error 320*6e0d0be7STrond Myklebust ), 321*6e0d0be7STrond Myklebust 322*6e0d0be7STrond Myklebust TP_ARGS(dir, ctx, flags, error), 323*6e0d0be7STrond Myklebust 324*6e0d0be7STrond Myklebust TP_STRUCT__entry( 325*6e0d0be7STrond Myklebust __field(int, error) 326*6e0d0be7STrond Myklebust __field(unsigned int, flags) 327*6e0d0be7STrond Myklebust __field(unsigned int, fmode) 328*6e0d0be7STrond Myklebust __field(dev_t, dev) 329*6e0d0be7STrond Myklebust __field(u64, dir) 330*6e0d0be7STrond Myklebust __string(name, ctx->dentry->d_name.name) 331*6e0d0be7STrond Myklebust ), 332*6e0d0be7STrond Myklebust 333*6e0d0be7STrond Myklebust TP_fast_assign( 334*6e0d0be7STrond Myklebust __entry->error = error; 335*6e0d0be7STrond Myklebust __entry->dev = dir->i_sb->s_dev; 336*6e0d0be7STrond Myklebust __entry->dir = NFS_FILEID(dir); 337*6e0d0be7STrond Myklebust __entry->flags = flags; 338*6e0d0be7STrond Myklebust __entry->fmode = (__force unsigned int)ctx->mode; 339*6e0d0be7STrond Myklebust __assign_str(name, ctx->dentry->d_name.name); 340*6e0d0be7STrond Myklebust ), 341*6e0d0be7STrond Myklebust 342*6e0d0be7STrond Myklebust TP_printk( 343*6e0d0be7STrond Myklebust "error=%d flags=%u (%s) fmode=%s " 344*6e0d0be7STrond Myklebust "name=%02x:%02x:%llu/%s", 345*6e0d0be7STrond Myklebust __entry->error, 346*6e0d0be7STrond Myklebust __entry->flags, 347*6e0d0be7STrond Myklebust show_open_flags(__entry->flags), 348*6e0d0be7STrond Myklebust show_fmode_flags(__entry->fmode), 349*6e0d0be7STrond Myklebust MAJOR(__entry->dev), MINOR(__entry->dev), 350*6e0d0be7STrond Myklebust (unsigned long long)__entry->dir, 351*6e0d0be7STrond Myklebust __get_str(name) 352*6e0d0be7STrond Myklebust ) 353*6e0d0be7STrond Myklebust ); 354*6e0d0be7STrond Myklebust 355f4ce1299STrond Myklebust #endif /* _TRACE_NFS_H */ 356f4ce1299STrond Myklebust 357f4ce1299STrond Myklebust #undef TRACE_INCLUDE_PATH 358f4ce1299STrond Myklebust #define TRACE_INCLUDE_PATH . 359f4ce1299STrond Myklebust #define TRACE_INCLUDE_FILE nfstrace 360f4ce1299STrond Myklebust /* This part must be outside protection */ 361f4ce1299STrond Myklebust #include <trace/define_trace.h> 362