~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/nfs/nfstrace.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /fs/nfs/nfstrace.h (Version linux-6.11.5) and /fs/nfs/nfstrace.h (Version linux-5.5.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * Copyright (c) 2013 Trond Myklebust <Trond.M      3  * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  4  */                                                 4  */
  5 #undef TRACE_SYSTEM                                 5 #undef TRACE_SYSTEM
  6 #define TRACE_SYSTEM nfs                            6 #define TRACE_SYSTEM nfs
  7                                                     7 
  8 #if !defined(_TRACE_NFS_H) || defined(TRACE_HE      8 #if !defined(_TRACE_NFS_H) || defined(TRACE_HEADER_MULTI_READ)
  9 #define _TRACE_NFS_H                                9 #define _TRACE_NFS_H
 10                                                    10 
 11 #include <linux/tracepoint.h>                      11 #include <linux/tracepoint.h>
 12 #include <linux/iversion.h>                        12 #include <linux/iversion.h>
 13                                                    13 
 14 #include <trace/misc/fs.h>                     !!  14 TRACE_DEFINE_ENUM(DT_UNKNOWN);
 15 #include <trace/misc/nfs.h>                    !!  15 TRACE_DEFINE_ENUM(DT_FIFO);
 16 #include <trace/misc/sunrpc.h>                 !!  16 TRACE_DEFINE_ENUM(DT_CHR);
                                                   >>  17 TRACE_DEFINE_ENUM(DT_DIR);
                                                   >>  18 TRACE_DEFINE_ENUM(DT_BLK);
                                                   >>  19 TRACE_DEFINE_ENUM(DT_REG);
                                                   >>  20 TRACE_DEFINE_ENUM(DT_LNK);
                                                   >>  21 TRACE_DEFINE_ENUM(DT_SOCK);
                                                   >>  22 TRACE_DEFINE_ENUM(DT_WHT);
                                                   >>  23 
                                                   >>  24 #define nfs_show_file_type(ftype) \
                                                   >>  25         __print_symbolic(ftype, \
                                                   >>  26                         { DT_UNKNOWN, "UNKNOWN" }, \
                                                   >>  27                         { DT_FIFO, "FIFO" }, \
                                                   >>  28                         { DT_CHR, "CHR" }, \
                                                   >>  29                         { DT_DIR, "DIR" }, \
                                                   >>  30                         { DT_BLK, "BLK" }, \
                                                   >>  31                         { DT_REG, "REG" }, \
                                                   >>  32                         { DT_LNK, "LNK" }, \
                                                   >>  33                         { DT_SOCK, "SOCK" }, \
                                                   >>  34                         { DT_WHT, "WHT" })
                                                   >>  35 
                                                   >>  36 TRACE_DEFINE_ENUM(NFS_INO_INVALID_DATA);
                                                   >>  37 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ATIME);
                                                   >>  38 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ACCESS);
                                                   >>  39 TRACE_DEFINE_ENUM(NFS_INO_INVALID_ACL);
                                                   >>  40 TRACE_DEFINE_ENUM(NFS_INO_REVAL_PAGECACHE);
                                                   >>  41 TRACE_DEFINE_ENUM(NFS_INO_REVAL_FORCED);
                                                   >>  42 TRACE_DEFINE_ENUM(NFS_INO_INVALID_LABEL);
                                                   >>  43 TRACE_DEFINE_ENUM(NFS_INO_INVALID_CHANGE);
                                                   >>  44 TRACE_DEFINE_ENUM(NFS_INO_INVALID_CTIME);
                                                   >>  45 TRACE_DEFINE_ENUM(NFS_INO_INVALID_MTIME);
                                                   >>  46 TRACE_DEFINE_ENUM(NFS_INO_INVALID_SIZE);
                                                   >>  47 TRACE_DEFINE_ENUM(NFS_INO_INVALID_OTHER);
 17                                                    48 
 18 #define nfs_show_cache_validity(v) \               49 #define nfs_show_cache_validity(v) \
 19         __print_flags(v, "|", \                    50         __print_flags(v, "|", \
 20                         { NFS_INO_INVALID_DATA     51                         { NFS_INO_INVALID_DATA, "INVALID_DATA" }, \
 21                         { NFS_INO_INVALID_ATIM     52                         { NFS_INO_INVALID_ATIME, "INVALID_ATIME" }, \
 22                         { NFS_INO_INVALID_ACCE     53                         { NFS_INO_INVALID_ACCESS, "INVALID_ACCESS" }, \
 23                         { NFS_INO_INVALID_ACL,     54                         { NFS_INO_INVALID_ACL, "INVALID_ACL" }, \
                                                   >>  55                         { NFS_INO_REVAL_PAGECACHE, "REVAL_PAGECACHE" }, \
 24                         { NFS_INO_REVAL_FORCED     56                         { NFS_INO_REVAL_FORCED, "REVAL_FORCED" }, \
 25                         { NFS_INO_INVALID_LABE     57                         { NFS_INO_INVALID_LABEL, "INVALID_LABEL" }, \
 26                         { NFS_INO_INVALID_CHAN     58                         { NFS_INO_INVALID_CHANGE, "INVALID_CHANGE" }, \
 27                         { NFS_INO_INVALID_CTIM     59                         { NFS_INO_INVALID_CTIME, "INVALID_CTIME" }, \
 28                         { NFS_INO_INVALID_MTIM     60                         { NFS_INO_INVALID_MTIME, "INVALID_MTIME" }, \
 29                         { NFS_INO_INVALID_SIZE     61                         { NFS_INO_INVALID_SIZE, "INVALID_SIZE" }, \
 30                         { NFS_INO_INVALID_OTHE !!  62                         { NFS_INO_INVALID_OTHER, "INVALID_OTHER" })
 31                         { NFS_INO_DATA_INVAL_D !!  63 
 32                         { NFS_INO_INVALID_BLOC !!  64 TRACE_DEFINE_ENUM(NFS_INO_ADVISE_RDPLUS);
 33                         { NFS_INO_INVALID_XATT !!  65 TRACE_DEFINE_ENUM(NFS_INO_STALE);
 34                         { NFS_INO_INVALID_NLIN !!  66 TRACE_DEFINE_ENUM(NFS_INO_ACL_LRU_SET);
 35                         { NFS_INO_INVALID_MODE !!  67 TRACE_DEFINE_ENUM(NFS_INO_INVALIDATING);
                                                   >>  68 TRACE_DEFINE_ENUM(NFS_INO_FSCACHE);
                                                   >>  69 TRACE_DEFINE_ENUM(NFS_INO_FSCACHE_LOCK);
                                                   >>  70 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTCOMMIT);
                                                   >>  71 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTCOMMITTING);
                                                   >>  72 TRACE_DEFINE_ENUM(NFS_INO_LAYOUTSTATS);
                                                   >>  73 TRACE_DEFINE_ENUM(NFS_INO_ODIRECT);
 36                                                    74 
 37 #define nfs_show_nfsi_flags(v) \                   75 #define nfs_show_nfsi_flags(v) \
 38         __print_flags(v, "|", \                    76         __print_flags(v, "|", \
                                                   >>  77                         { BIT(NFS_INO_ADVISE_RDPLUS), "ADVISE_RDPLUS" }, \
 39                         { BIT(NFS_INO_STALE),      78                         { BIT(NFS_INO_STALE), "STALE" }, \
 40                         { BIT(NFS_INO_ACL_LRU_     79                         { BIT(NFS_INO_ACL_LRU_SET), "ACL_LRU_SET" }, \
 41                         { BIT(NFS_INO_INVALIDA     80                         { BIT(NFS_INO_INVALIDATING), "INVALIDATING" }, \
                                                   >>  81                         { BIT(NFS_INO_FSCACHE), "FSCACHE" }, \
                                                   >>  82                         { BIT(NFS_INO_FSCACHE_LOCK), "FSCACHE_LOCK" }, \
 42                         { BIT(NFS_INO_LAYOUTCO     83                         { BIT(NFS_INO_LAYOUTCOMMIT), "NEED_LAYOUTCOMMIT" }, \
 43                         { BIT(NFS_INO_LAYOUTCO     84                         { BIT(NFS_INO_LAYOUTCOMMITTING), "LAYOUTCOMMIT" }, \
 44                         { BIT(NFS_INO_LAYOUTST     85                         { BIT(NFS_INO_LAYOUTSTATS), "LAYOUTSTATS" }, \
 45                         { BIT(NFS_INO_ODIRECT)     86                         { BIT(NFS_INO_ODIRECT), "ODIRECT" })
 46                                                    87 
 47 DECLARE_EVENT_CLASS(nfs_inode_event,               88 DECLARE_EVENT_CLASS(nfs_inode_event,
 48                 TP_PROTO(                          89                 TP_PROTO(
 49                         const struct inode *in     90                         const struct inode *inode
 50                 ),                                 91                 ),
 51                                                    92 
 52                 TP_ARGS(inode),                    93                 TP_ARGS(inode),
 53                                                    94 
 54                 TP_STRUCT__entry(                  95                 TP_STRUCT__entry(
 55                         __field(dev_t, dev)        96                         __field(dev_t, dev)
 56                         __field(u32, fhandle)      97                         __field(u32, fhandle)
 57                         __field(u64, fileid)       98                         __field(u64, fileid)
 58                         __field(u64, version)      99                         __field(u64, version)
 59                 ),                                100                 ),
 60                                                   101 
 61                 TP_fast_assign(                   102                 TP_fast_assign(
 62                         const struct nfs_inode    103                         const struct nfs_inode *nfsi = NFS_I(inode);
 63                         __entry->dev = inode->    104                         __entry->dev = inode->i_sb->s_dev;
 64                         __entry->fileid = nfsi    105                         __entry->fileid = nfsi->fileid;
 65                         __entry->fhandle = nfs    106                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
 66                         __entry->version = ino    107                         __entry->version = inode_peek_iversion_raw(inode);
 67                 ),                                108                 ),
 68                                                   109 
 69                 TP_printk(                        110                 TP_printk(
 70                         "fileid=%02x:%02x:%llu    111                         "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu ",
 71                         MAJOR(__entry->dev), M    112                         MAJOR(__entry->dev), MINOR(__entry->dev),
 72                         (unsigned long long)__    113                         (unsigned long long)__entry->fileid,
 73                         __entry->fhandle,         114                         __entry->fhandle,
 74                         (unsigned long long)__    115                         (unsigned long long)__entry->version
 75                 )                                 116                 )
 76 );                                                117 );
 77                                                   118 
 78 DECLARE_EVENT_CLASS(nfs_inode_event_done,         119 DECLARE_EVENT_CLASS(nfs_inode_event_done,
 79                 TP_PROTO(                         120                 TP_PROTO(
 80                         const struct inode *in    121                         const struct inode *inode,
 81                         int error                 122                         int error
 82                 ),                                123                 ),
 83                                                   124 
 84                 TP_ARGS(inode, error),            125                 TP_ARGS(inode, error),
 85                                                   126 
 86                 TP_STRUCT__entry(                 127                 TP_STRUCT__entry(
 87                         __field(unsigned long,    128                         __field(unsigned long, error)
 88                         __field(dev_t, dev)       129                         __field(dev_t, dev)
 89                         __field(u32, fhandle)     130                         __field(u32, fhandle)
 90                         __field(unsigned char,    131                         __field(unsigned char, type)
 91                         __field(u64, fileid)      132                         __field(u64, fileid)
 92                         __field(u64, version)     133                         __field(u64, version)
 93                         __field(loff_t, size)     134                         __field(loff_t, size)
 94                         __field(unsigned long,    135                         __field(unsigned long, nfsi_flags)
 95                         __field(unsigned long,    136                         __field(unsigned long, cache_validity)
 96                 ),                                137                 ),
 97                                                   138 
 98                 TP_fast_assign(                   139                 TP_fast_assign(
 99                         const struct nfs_inode    140                         const struct nfs_inode *nfsi = NFS_I(inode);
100                         __entry->error = error    141                         __entry->error = error < 0 ? -error : 0;
101                         __entry->dev = inode->    142                         __entry->dev = inode->i_sb->s_dev;
102                         __entry->fileid = nfsi    143                         __entry->fileid = nfsi->fileid;
103                         __entry->fhandle = nfs    144                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
104                         __entry->type = nfs_um    145                         __entry->type = nfs_umode_to_dtype(inode->i_mode);
105                         __entry->version = ino    146                         __entry->version = inode_peek_iversion_raw(inode);
106                         __entry->size = i_size    147                         __entry->size = i_size_read(inode);
107                         __entry->nfsi_flags =     148                         __entry->nfsi_flags = nfsi->flags;
108                         __entry->cache_validit    149                         __entry->cache_validity = nfsi->cache_validity;
109                 ),                                150                 ),
110                                                   151 
111                 TP_printk(                        152                 TP_printk(
112                         "error=%ld (%s) fileid    153                         "error=%ld (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
113                         "type=%u (%s) version=    154                         "type=%u (%s) version=%llu size=%lld "
114                         "cache_validity=0x%lx     155                         "cache_validity=0x%lx (%s) nfs_flags=0x%lx (%s)",
115                         -__entry->error, show_ !! 156                         -__entry->error, nfs_show_status(__entry->error),
116                         MAJOR(__entry->dev), M    157                         MAJOR(__entry->dev), MINOR(__entry->dev),
117                         (unsigned long long)__    158                         (unsigned long long)__entry->fileid,
118                         __entry->fhandle,         159                         __entry->fhandle,
119                         __entry->type,            160                         __entry->type,
120                         show_fs_dirent_type(__ !! 161                         nfs_show_file_type(__entry->type),
121                         (unsigned long long)__    162                         (unsigned long long)__entry->version,
122                         (long long)__entry->si    163                         (long long)__entry->size,
123                         __entry->cache_validit    164                         __entry->cache_validity,
124                         nfs_show_cache_validit    165                         nfs_show_cache_validity(__entry->cache_validity),
125                         __entry->nfsi_flags,      166                         __entry->nfsi_flags,
126                         nfs_show_nfsi_flags(__    167                         nfs_show_nfsi_flags(__entry->nfsi_flags)
127                 )                                 168                 )
128 );                                                169 );
129                                                   170 
130 #define DEFINE_NFS_INODE_EVENT(name) \            171 #define DEFINE_NFS_INODE_EVENT(name) \
131         DEFINE_EVENT(nfs_inode_event, name, \     172         DEFINE_EVENT(nfs_inode_event, name, \
132                         TP_PROTO( \               173                         TP_PROTO( \
133                                 const struct i    174                                 const struct inode *inode \
134                         ), \                      175                         ), \
135                         TP_ARGS(inode))           176                         TP_ARGS(inode))
136 #define DEFINE_NFS_INODE_EVENT_DONE(name) \       177 #define DEFINE_NFS_INODE_EVENT_DONE(name) \
137         DEFINE_EVENT(nfs_inode_event_done, nam    178         DEFINE_EVENT(nfs_inode_event_done, name, \
138                         TP_PROTO( \               179                         TP_PROTO( \
139                                 const struct i    180                                 const struct inode *inode, \
140                                 int error \       181                                 int error \
141                         ), \                      182                         ), \
142                         TP_ARGS(inode, error))    183                         TP_ARGS(inode, error))
143 DEFINE_NFS_INODE_EVENT(nfs_set_inode_stale);   << 
144 DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter    184 DEFINE_NFS_INODE_EVENT(nfs_refresh_inode_enter);
145 DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_    185 DEFINE_NFS_INODE_EVENT_DONE(nfs_refresh_inode_exit);
146 DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_en    186 DEFINE_NFS_INODE_EVENT(nfs_revalidate_inode_enter);
147 DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_ino    187 DEFINE_NFS_INODE_EVENT_DONE(nfs_revalidate_inode_exit);
148 DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_    188 DEFINE_NFS_INODE_EVENT(nfs_invalidate_mapping_enter);
149 DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_map    189 DEFINE_NFS_INODE_EVENT_DONE(nfs_invalidate_mapping_exit);
150 DEFINE_NFS_INODE_EVENT(nfs_getattr_enter);        190 DEFINE_NFS_INODE_EVENT(nfs_getattr_enter);
151 DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit);    191 DEFINE_NFS_INODE_EVENT_DONE(nfs_getattr_exit);
152 DEFINE_NFS_INODE_EVENT(nfs_setattr_enter);        192 DEFINE_NFS_INODE_EVENT(nfs_setattr_enter);
153 DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit);    193 DEFINE_NFS_INODE_EVENT_DONE(nfs_setattr_exit);
                                                   >> 194 DEFINE_NFS_INODE_EVENT(nfs_writeback_page_enter);
                                                   >> 195 DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_page_exit);
154 DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_ent    196 DEFINE_NFS_INODE_EVENT(nfs_writeback_inode_enter);
155 DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inod    197 DEFINE_NFS_INODE_EVENT_DONE(nfs_writeback_inode_exit);
156 DEFINE_NFS_INODE_EVENT(nfs_fsync_enter);          198 DEFINE_NFS_INODE_EVENT(nfs_fsync_enter);
157 DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit);      199 DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit);
158 DEFINE_NFS_INODE_EVENT(nfs_access_enter);         200 DEFINE_NFS_INODE_EVENT(nfs_access_enter);
159 DEFINE_NFS_INODE_EVENT_DONE(nfs_set_cache_inva !! 201 DEFINE_NFS_INODE_EVENT_DONE(nfs_access_exit);
160 DEFINE_NFS_INODE_EVENT(nfs_readdir_force_readd << 
161 DEFINE_NFS_INODE_EVENT_DONE(nfs_readdir_cache_ << 
162 DEFINE_NFS_INODE_EVENT_DONE(nfs_readdir_uncach << 
163                                                << 
164 TRACE_EVENT(nfs_access_exit,                   << 
165                 TP_PROTO(                      << 
166                         const struct inode *in << 
167                         unsigned int mask,     << 
168                         unsigned int permitted << 
169                         int error              << 
170                 ),                             << 
171                                                << 
172                 TP_ARGS(inode, mask, permitted << 
173                                                   202 
174                 TP_STRUCT__entry(              !! 203 TRACE_DEFINE_ENUM(LOOKUP_FOLLOW);
175                         __field(unsigned long, !! 204 TRACE_DEFINE_ENUM(LOOKUP_DIRECTORY);
176                         __field(dev_t, dev)    !! 205 TRACE_DEFINE_ENUM(LOOKUP_AUTOMOUNT);
177                         __field(u32, fhandle)  !! 206 TRACE_DEFINE_ENUM(LOOKUP_PARENT);
178                         __field(unsigned char, !! 207 TRACE_DEFINE_ENUM(LOOKUP_REVAL);
179                         __field(u64, fileid)   !! 208 TRACE_DEFINE_ENUM(LOOKUP_RCU);
180                         __field(u64, version)  !! 209 TRACE_DEFINE_ENUM(LOOKUP_OPEN);
181                         __field(loff_t, size)  !! 210 TRACE_DEFINE_ENUM(LOOKUP_CREATE);
182                         __field(unsigned long, !! 211 TRACE_DEFINE_ENUM(LOOKUP_EXCL);
183                         __field(unsigned long, !! 212 TRACE_DEFINE_ENUM(LOOKUP_RENAME_TARGET);
184                         __field(unsigned int,  !! 213 TRACE_DEFINE_ENUM(LOOKUP_JUMPED);
185                         __field(unsigned int,  !! 214 TRACE_DEFINE_ENUM(LOOKUP_ROOT);
186                 ),                             !! 215 TRACE_DEFINE_ENUM(LOOKUP_EMPTY);
187                                                !! 216 TRACE_DEFINE_ENUM(LOOKUP_DOWN);
188                 TP_fast_assign(                !! 217 
189                         const struct nfs_inode !! 218 #define show_lookup_flags(flags) \
190                         __entry->error = error !! 219         __print_flags(flags, "|", \
191                         __entry->dev = inode-> !! 220                         { LOOKUP_FOLLOW, "FOLLOW" }, \
192                         __entry->fileid = nfsi !! 221                         { LOOKUP_DIRECTORY, "DIRECTORY" }, \
193                         __entry->fhandle = nfs !! 222                         { LOOKUP_AUTOMOUNT, "AUTOMOUNT" }, \
194                         __entry->type = nfs_um !! 223                         { LOOKUP_PARENT, "PARENT" }, \
195                         __entry->version = ino !! 224                         { LOOKUP_REVAL, "REVAL" }, \
196                         __entry->size = i_size !! 225                         { LOOKUP_RCU, "RCU" }, \
197                         __entry->nfsi_flags =  !! 226                         { LOOKUP_OPEN, "OPEN" }, \
198                         __entry->cache_validit !! 227                         { LOOKUP_CREATE, "CREATE" }, \
199                         __entry->mask = mask;  !! 228                         { LOOKUP_EXCL, "EXCL" }, \
200                         __entry->permitted = p !! 229                         { LOOKUP_RENAME_TARGET, "RENAME_TARGET" }, \
201                 ),                             !! 230                         { LOOKUP_JUMPED, "JUMPED" }, \
202                                                !! 231                         { LOOKUP_ROOT, "ROOT" }, \
203                 TP_printk(                     !! 232                         { LOOKUP_EMPTY, "EMPTY" }, \
204                         "error=%ld (%s) fileid !! 233                         { LOOKUP_DOWN, "DOWN" })
205                         "type=%u (%s) version= << 
206                         "cache_validity=0x%lx  << 
207                         "mask=0x%x permitted=0 << 
208                         -__entry->error, show_ << 
209                         MAJOR(__entry->dev), M << 
210                         (unsigned long long)__ << 
211                         __entry->fhandle,      << 
212                         __entry->type,         << 
213                         show_fs_dirent_type(__ << 
214                         (unsigned long long)__ << 
215                         (long long)__entry->si << 
216                         __entry->cache_validit << 
217                         nfs_show_cache_validit << 
218                         __entry->nfsi_flags,   << 
219                         nfs_show_nfsi_flags(__ << 
220                         __entry->mask, __entry << 
221                 )                              << 
222 );                                             << 
223                                                << 
224 DECLARE_EVENT_CLASS(nfs_update_size_class,     << 
225                 TP_PROTO(                      << 
226                         const struct inode *in << 
227                         loff_t new_size        << 
228                 ),                             << 
229                                                << 
230                 TP_ARGS(inode, new_size),      << 
231                                                << 
232                 TP_STRUCT__entry(              << 
233                         __field(dev_t, dev)    << 
234                         __field(u32, fhandle)  << 
235                         __field(u64, fileid)   << 
236                         __field(u64, version)  << 
237                         __field(loff_t, cur_si << 
238                         __field(loff_t, new_si << 
239                 ),                             << 
240                                                << 
241                 TP_fast_assign(                << 
242                         const struct nfs_inode << 
243                                                << 
244                         __entry->dev = inode-> << 
245                         __entry->fhandle = nfs << 
246                         __entry->fileid = nfsi << 
247                         __entry->version = ino << 
248                         __entry->cur_size = i_ << 
249                         __entry->new_size = ne << 
250                 ),                             << 
251                                                << 
252                 TP_printk(                     << 
253                         "fileid=%02x:%02x:%llu << 
254                         MAJOR(__entry->dev), M << 
255                         (unsigned long long)__ << 
256                         __entry->fhandle, __en << 
257                         __entry->cur_size, __e << 
258                 )                              << 
259 );                                             << 
260                                                << 
261 #define DEFINE_NFS_UPDATE_SIZE_EVENT(name) \   << 
262         DEFINE_EVENT(nfs_update_size_class, nf << 
263                         TP_PROTO( \            << 
264                                 const struct i << 
265                                 loff_t new_siz << 
266                         ), \                   << 
267                         TP_ARGS(inode, new_siz << 
268                                                << 
269 DEFINE_NFS_UPDATE_SIZE_EVENT(truncate);        << 
270 DEFINE_NFS_UPDATE_SIZE_EVENT(wcc);             << 
271 DEFINE_NFS_UPDATE_SIZE_EVENT(update);          << 
272 DEFINE_NFS_UPDATE_SIZE_EVENT(grow);            << 
273                                                << 
274 DECLARE_EVENT_CLASS(nfs_inode_range_event,     << 
275                 TP_PROTO(                      << 
276                         const struct inode *in << 
277                         loff_t range_start,    << 
278                         loff_t range_end       << 
279                 ),                             << 
280                                                << 
281                 TP_ARGS(inode, range_start, ra << 
282                                                << 
283                 TP_STRUCT__entry(              << 
284                         __field(dev_t, dev)    << 
285                         __field(u32, fhandle)  << 
286                         __field(u64, fileid)   << 
287                         __field(u64, version)  << 
288                         __field(loff_t, range_ << 
289                         __field(loff_t, range_ << 
290                 ),                             << 
291                                                << 
292                 TP_fast_assign(                << 
293                         const struct nfs_inode << 
294                                                << 
295                         __entry->dev = inode-> << 
296                         __entry->fhandle = nfs << 
297                         __entry->fileid = nfsi << 
298                         __entry->version = ino << 
299                         __entry->range_start = << 
300                         __entry->range_end = r << 
301                 ),                             << 
302                                                << 
303                 TP_printk(                     << 
304                         "fileid=%02x:%02x:%llu << 
305                         "range=[%lld, %lld]",  << 
306                         MAJOR(__entry->dev), M << 
307                         (unsigned long long)__ << 
308                         __entry->fhandle, __en << 
309                         __entry->range_start,  << 
310                 )                              << 
311 );                                             << 
312                                                << 
313 #define DEFINE_NFS_INODE_RANGE_EVENT(name) \   << 
314         DEFINE_EVENT(nfs_inode_range_event, na << 
315                         TP_PROTO( \            << 
316                                 const struct i << 
317                                 loff_t range_s << 
318                                 loff_t range_e << 
319                         ), \                   << 
320                         TP_ARGS(inode, range_s << 
321                                                << 
322 DEFINE_NFS_INODE_RANGE_EVENT(nfs_readdir_inval << 
323                                                << 
324 DECLARE_EVENT_CLASS(nfs_readdir_event,         << 
325                 TP_PROTO(                      << 
326                         const struct file *fil << 
327                         const __be32 *verifier << 
328                         u64 cookie,            << 
329                         pgoff_t page_index,    << 
330                         unsigned int dtsize    << 
331                 ),                             << 
332                                                << 
333                 TP_ARGS(file, verifier, cookie << 
334                                                << 
335                 TP_STRUCT__entry(              << 
336                         __field(dev_t, dev)    << 
337                         __field(u32, fhandle)  << 
338                         __field(u64, fileid)   << 
339                         __field(u64, version)  << 
340                         __array(char, verifier << 
341                         __field(u64, cookie)   << 
342                         __field(pgoff_t, index << 
343                         __field(unsigned int,  << 
344                 ),                             << 
345                                                << 
346                 TP_fast_assign(                << 
347                         const struct inode *di << 
348                         const struct nfs_inode << 
349                                                << 
350                         __entry->dev = dir->i_ << 
351                         __entry->fileid = nfsi << 
352                         __entry->fhandle = nfs << 
353                         __entry->version = ino << 
354                         if (cookie != 0)       << 
355                                 memcpy(__entry << 
356                                        NFS4_VE << 
357                         else                   << 
358                                 memset(__entry << 
359                                        NFS4_VE << 
360                         __entry->cookie = cook << 
361                         __entry->index = page_ << 
362                         __entry->dtsize = dtsi << 
363                 ),                             << 
364                                                << 
365                 TP_printk(                     << 
366                         "fileid=%02x:%02x:%llu << 
367                         "cookie=%s:0x%llx cach << 
368                         MAJOR(__entry->dev), M << 
369                         (unsigned long long)__ << 
370                         __entry->version, show << 
371                         (unsigned long long)__ << 
372                         __entry->dtsize        << 
373                 )                              << 
374 );                                             << 
375                                                << 
376 #define DEFINE_NFS_READDIR_EVENT(name) \       << 
377         DEFINE_EVENT(nfs_readdir_event, name,  << 
378                         TP_PROTO( \            << 
379                                 const struct f << 
380                                 const __be32 * << 
381                                 u64 cookie, \  << 
382                                 pgoff_t page_i << 
383                                 unsigned int d << 
384                                 ), \           << 
385                         TP_ARGS(file, verifier << 
386                                                << 
387 DEFINE_NFS_READDIR_EVENT(nfs_readdir_cache_fil << 
388 DEFINE_NFS_READDIR_EVENT(nfs_readdir_uncached) << 
389                                                   234 
390 DECLARE_EVENT_CLASS(nfs_lookup_event,             235 DECLARE_EVENT_CLASS(nfs_lookup_event,
391                 TP_PROTO(                         236                 TP_PROTO(
392                         const struct inode *di    237                         const struct inode *dir,
393                         const struct dentry *d    238                         const struct dentry *dentry,
394                         unsigned int flags        239                         unsigned int flags
395                 ),                                240                 ),
396                                                   241 
397                 TP_ARGS(dir, dentry, flags),      242                 TP_ARGS(dir, dentry, flags),
398                                                   243 
399                 TP_STRUCT__entry(                 244                 TP_STRUCT__entry(
400                         __field(unsigned long,    245                         __field(unsigned long, flags)
401                         __field(dev_t, dev)       246                         __field(dev_t, dev)
402                         __field(u64, dir)         247                         __field(u64, dir)
403                         __field(u64, fileid)   << 
404                         __string(name, dentry-    248                         __string(name, dentry->d_name.name)
405                 ),                                249                 ),
406                                                   250 
407                 TP_fast_assign(                   251                 TP_fast_assign(
408                         __entry->dev = dir->i_    252                         __entry->dev = dir->i_sb->s_dev;
409                         __entry->dir = NFS_FIL    253                         __entry->dir = NFS_FILEID(dir);
410                         __entry->flags = flags    254                         __entry->flags = flags;
411                         __entry->fileid = d_is !! 255                         __assign_str(name, dentry->d_name.name);
412                         __assign_str(name);    << 
413                 ),                                256                 ),
414                                                   257 
415                 TP_printk(                        258                 TP_printk(
416                         "flags=0x%lx (%s) name !! 259                         "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
417                         __entry->flags,           260                         __entry->flags,
418                         show_fs_lookup_flags(_ !! 261                         show_lookup_flags(__entry->flags),
419                         MAJOR(__entry->dev), M    262                         MAJOR(__entry->dev), MINOR(__entry->dev),
420                         (unsigned long long)__    263                         (unsigned long long)__entry->dir,
421                         __get_str(name),       !! 264                         __get_str(name)
422                         __entry->fileid        << 
423                 )                                 265                 )
424 );                                                266 );
425                                                   267 
426 #define DEFINE_NFS_LOOKUP_EVENT(name) \           268 #define DEFINE_NFS_LOOKUP_EVENT(name) \
427         DEFINE_EVENT(nfs_lookup_event, name, \    269         DEFINE_EVENT(nfs_lookup_event, name, \
428                         TP_PROTO( \               270                         TP_PROTO( \
429                                 const struct i    271                                 const struct inode *dir, \
430                                 const struct d    272                                 const struct dentry *dentry, \
431                                 unsigned int f    273                                 unsigned int flags \
432                         ), \                      274                         ), \
433                         TP_ARGS(dir, dentry, f    275                         TP_ARGS(dir, dentry, flags))
434                                                   276 
435 DECLARE_EVENT_CLASS(nfs_lookup_event_done,        277 DECLARE_EVENT_CLASS(nfs_lookup_event_done,
436                 TP_PROTO(                         278                 TP_PROTO(
437                         const struct inode *di    279                         const struct inode *dir,
438                         const struct dentry *d    280                         const struct dentry *dentry,
439                         unsigned int flags,       281                         unsigned int flags,
440                         int error                 282                         int error
441                 ),                                283                 ),
442                                                   284 
443                 TP_ARGS(dir, dentry, flags, er    285                 TP_ARGS(dir, dentry, flags, error),
444                                                   286 
445                 TP_STRUCT__entry(                 287                 TP_STRUCT__entry(
446                         __field(unsigned long,    288                         __field(unsigned long, error)
447                         __field(unsigned long,    289                         __field(unsigned long, flags)
448                         __field(dev_t, dev)       290                         __field(dev_t, dev)
449                         __field(u64, dir)         291                         __field(u64, dir)
450                         __field(u64, fileid)   << 
451                         __string(name, dentry-    292                         __string(name, dentry->d_name.name)
452                 ),                                293                 ),
453                                                   294 
454                 TP_fast_assign(                   295                 TP_fast_assign(
455                         __entry->dev = dir->i_    296                         __entry->dev = dir->i_sb->s_dev;
456                         __entry->dir = NFS_FIL    297                         __entry->dir = NFS_FILEID(dir);
457                         __entry->error = error    298                         __entry->error = error < 0 ? -error : 0;
458                         __entry->flags = flags    299                         __entry->flags = flags;
459                         __entry->fileid = d_is !! 300                         __assign_str(name, dentry->d_name.name);
460                         __assign_str(name);    << 
461                 ),                                301                 ),
462                                                   302 
463                 TP_printk(                        303                 TP_printk(
464                         "error=%ld (%s) flags= !! 304                         "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
465                         -__entry->error, show_ !! 305                         -__entry->error, nfs_show_status(__entry->error),
466                         __entry->flags,           306                         __entry->flags,
467                         show_fs_lookup_flags(_ !! 307                         show_lookup_flags(__entry->flags),
468                         MAJOR(__entry->dev), M    308                         MAJOR(__entry->dev), MINOR(__entry->dev),
469                         (unsigned long long)__    309                         (unsigned long long)__entry->dir,
470                         __get_str(name),       !! 310                         __get_str(name)
471                         __entry->fileid        << 
472                 )                                 311                 )
473 );                                                312 );
474                                                   313 
475 #define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \      314 #define DEFINE_NFS_LOOKUP_EVENT_DONE(name) \
476         DEFINE_EVENT(nfs_lookup_event_done, na    315         DEFINE_EVENT(nfs_lookup_event_done, name, \
477                         TP_PROTO( \               316                         TP_PROTO( \
478                                 const struct i    317                                 const struct inode *dir, \
479                                 const struct d    318                                 const struct dentry *dentry, \
480                                 unsigned int f    319                                 unsigned int flags, \
481                                 int error \       320                                 int error \
482                         ), \                      321                         ), \
483                         TP_ARGS(dir, dentry, f    322                         TP_ARGS(dir, dentry, flags, error))
484                                                   323 
485 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter);        324 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_enter);
486 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit);    325 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_exit);
487 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_    326 DEFINE_NFS_LOOKUP_EVENT(nfs_lookup_revalidate_enter);
488 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revali    327 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_lookup_revalidate_exit);
489 DEFINE_NFS_LOOKUP_EVENT(nfs_readdir_lookup);   !! 328 
490 DEFINE_NFS_LOOKUP_EVENT(nfs_readdir_lookup_rev !! 329 TRACE_DEFINE_ENUM(O_WRONLY);
491 DEFINE_NFS_LOOKUP_EVENT_DONE(nfs_readdir_looku !! 330 TRACE_DEFINE_ENUM(O_RDWR);
                                                   >> 331 TRACE_DEFINE_ENUM(O_CREAT);
                                                   >> 332 TRACE_DEFINE_ENUM(O_EXCL);
                                                   >> 333 TRACE_DEFINE_ENUM(O_NOCTTY);
                                                   >> 334 TRACE_DEFINE_ENUM(O_TRUNC);
                                                   >> 335 TRACE_DEFINE_ENUM(O_APPEND);
                                                   >> 336 TRACE_DEFINE_ENUM(O_NONBLOCK);
                                                   >> 337 TRACE_DEFINE_ENUM(O_DSYNC);
                                                   >> 338 TRACE_DEFINE_ENUM(O_DIRECT);
                                                   >> 339 TRACE_DEFINE_ENUM(O_LARGEFILE);
                                                   >> 340 TRACE_DEFINE_ENUM(O_DIRECTORY);
                                                   >> 341 TRACE_DEFINE_ENUM(O_NOFOLLOW);
                                                   >> 342 TRACE_DEFINE_ENUM(O_NOATIME);
                                                   >> 343 TRACE_DEFINE_ENUM(O_CLOEXEC);
                                                   >> 344 
                                                   >> 345 #define show_open_flags(flags) \
                                                   >> 346         __print_flags(flags, "|", \
                                                   >> 347                 { O_WRONLY, "O_WRONLY" }, \
                                                   >> 348                 { O_RDWR, "O_RDWR" }, \
                                                   >> 349                 { O_CREAT, "O_CREAT" }, \
                                                   >> 350                 { O_EXCL, "O_EXCL" }, \
                                                   >> 351                 { O_NOCTTY, "O_NOCTTY" }, \
                                                   >> 352                 { O_TRUNC, "O_TRUNC" }, \
                                                   >> 353                 { O_APPEND, "O_APPEND" }, \
                                                   >> 354                 { O_NONBLOCK, "O_NONBLOCK" }, \
                                                   >> 355                 { O_DSYNC, "O_DSYNC" }, \
                                                   >> 356                 { O_DIRECT, "O_DIRECT" }, \
                                                   >> 357                 { O_LARGEFILE, "O_LARGEFILE" }, \
                                                   >> 358                 { O_DIRECTORY, "O_DIRECTORY" }, \
                                                   >> 359                 { O_NOFOLLOW, "O_NOFOLLOW" }, \
                                                   >> 360                 { O_NOATIME, "O_NOATIME" }, \
                                                   >> 361                 { O_CLOEXEC, "O_CLOEXEC" })
                                                   >> 362 
                                                   >> 363 TRACE_DEFINE_ENUM(FMODE_READ);
                                                   >> 364 TRACE_DEFINE_ENUM(FMODE_WRITE);
                                                   >> 365 TRACE_DEFINE_ENUM(FMODE_EXEC);
                                                   >> 366 
                                                   >> 367 #define show_fmode_flags(mode) \
                                                   >> 368         __print_flags(mode, "|", \
                                                   >> 369                 { ((__force unsigned long)FMODE_READ), "READ" }, \
                                                   >> 370                 { ((__force unsigned long)FMODE_WRITE), "WRITE" }, \
                                                   >> 371                 { ((__force unsigned long)FMODE_EXEC), "EXEC" })
492                                                   372 
493 TRACE_EVENT(nfs_atomic_open_enter,                373 TRACE_EVENT(nfs_atomic_open_enter,
494                 TP_PROTO(                         374                 TP_PROTO(
495                         const struct inode *di    375                         const struct inode *dir,
496                         const struct nfs_open_    376                         const struct nfs_open_context *ctx,
497                         unsigned int flags        377                         unsigned int flags
498                 ),                                378                 ),
499                                                   379 
500                 TP_ARGS(dir, ctx, flags),         380                 TP_ARGS(dir, ctx, flags),
501                                                   381 
502                 TP_STRUCT__entry(                 382                 TP_STRUCT__entry(
503                         __field(unsigned long,    383                         __field(unsigned long, flags)
504                         __field(unsigned long, !! 384                         __field(unsigned int, fmode)
505                         __field(dev_t, dev)       385                         __field(dev_t, dev)
506                         __field(u64, dir)         386                         __field(u64, dir)
507                         __string(name, ctx->de    387                         __string(name, ctx->dentry->d_name.name)
508                 ),                                388                 ),
509                                                   389 
510                 TP_fast_assign(                   390                 TP_fast_assign(
511                         __entry->dev = dir->i_    391                         __entry->dev = dir->i_sb->s_dev;
512                         __entry->dir = NFS_FIL    392                         __entry->dir = NFS_FILEID(dir);
513                         __entry->flags = flags    393                         __entry->flags = flags;
514                         __entry->fmode = (__fo !! 394                         __entry->fmode = (__force unsigned int)ctx->mode;
515                         __assign_str(name);    !! 395                         __assign_str(name, ctx->dentry->d_name.name);
516                 ),                                396                 ),
517                                                   397 
518                 TP_printk(                        398                 TP_printk(
519                         "flags=0x%lx (%s) fmod    399                         "flags=0x%lx (%s) fmode=%s name=%02x:%02x:%llu/%s",
520                         __entry->flags,           400                         __entry->flags,
521                         show_fs_fcntl_open_fla !! 401                         show_open_flags(__entry->flags),
522                         show_fs_fmode_flags(__ !! 402                         show_fmode_flags(__entry->fmode),
523                         MAJOR(__entry->dev), M    403                         MAJOR(__entry->dev), MINOR(__entry->dev),
524                         (unsigned long long)__    404                         (unsigned long long)__entry->dir,
525                         __get_str(name)           405                         __get_str(name)
526                 )                                 406                 )
527 );                                                407 );
528                                                   408 
529 TRACE_EVENT(nfs_atomic_open_exit,                 409 TRACE_EVENT(nfs_atomic_open_exit,
530                 TP_PROTO(                         410                 TP_PROTO(
531                         const struct inode *di    411                         const struct inode *dir,
532                         const struct nfs_open_    412                         const struct nfs_open_context *ctx,
533                         unsigned int flags,       413                         unsigned int flags,
534                         int error                 414                         int error
535                 ),                                415                 ),
536                                                   416 
537                 TP_ARGS(dir, ctx, flags, error    417                 TP_ARGS(dir, ctx, flags, error),
538                                                   418 
539                 TP_STRUCT__entry(                 419                 TP_STRUCT__entry(
540                         __field(unsigned long,    420                         __field(unsigned long, error)
541                         __field(unsigned long,    421                         __field(unsigned long, flags)
542                         __field(unsigned long, !! 422                         __field(unsigned int, fmode)
543                         __field(dev_t, dev)       423                         __field(dev_t, dev)
544                         __field(u64, dir)         424                         __field(u64, dir)
545                         __string(name, ctx->de    425                         __string(name, ctx->dentry->d_name.name)
546                 ),                                426                 ),
547                                                   427 
548                 TP_fast_assign(                   428                 TP_fast_assign(
549                         __entry->error = -erro    429                         __entry->error = -error;
550                         __entry->dev = dir->i_    430                         __entry->dev = dir->i_sb->s_dev;
551                         __entry->dir = NFS_FIL    431                         __entry->dir = NFS_FILEID(dir);
552                         __entry->flags = flags    432                         __entry->flags = flags;
553                         __entry->fmode = (__fo !! 433                         __entry->fmode = (__force unsigned int)ctx->mode;
554                         __assign_str(name);    !! 434                         __assign_str(name, ctx->dentry->d_name.name);
555                 ),                                435                 ),
556                                                   436 
557                 TP_printk(                        437                 TP_printk(
558                         "error=%ld (%s) flags=    438                         "error=%ld (%s) flags=0x%lx (%s) fmode=%s "
559                         "name=%02x:%02x:%llu/%    439                         "name=%02x:%02x:%llu/%s",
560                         -__entry->error, show_ !! 440                         -__entry->error, nfs_show_status(__entry->error),
561                         __entry->flags,           441                         __entry->flags,
562                         show_fs_fcntl_open_fla !! 442                         show_open_flags(__entry->flags),
563                         show_fs_fmode_flags(__ !! 443                         show_fmode_flags(__entry->fmode),
564                         MAJOR(__entry->dev), M    444                         MAJOR(__entry->dev), MINOR(__entry->dev),
565                         (unsigned long long)__    445                         (unsigned long long)__entry->dir,
566                         __get_str(name)           446                         __get_str(name)
567                 )                                 447                 )
568 );                                                448 );
569                                                   449 
570 TRACE_EVENT(nfs_create_enter,                     450 TRACE_EVENT(nfs_create_enter,
571                 TP_PROTO(                         451                 TP_PROTO(
572                         const struct inode *di    452                         const struct inode *dir,
573                         const struct dentry *d    453                         const struct dentry *dentry,
574                         unsigned int flags        454                         unsigned int flags
575                 ),                                455                 ),
576                                                   456 
577                 TP_ARGS(dir, dentry, flags),      457                 TP_ARGS(dir, dentry, flags),
578                                                   458 
579                 TP_STRUCT__entry(                 459                 TP_STRUCT__entry(
580                         __field(unsigned long,    460                         __field(unsigned long, flags)
581                         __field(dev_t, dev)       461                         __field(dev_t, dev)
582                         __field(u64, dir)         462                         __field(u64, dir)
583                         __string(name, dentry-    463                         __string(name, dentry->d_name.name)
584                 ),                                464                 ),
585                                                   465 
586                 TP_fast_assign(                   466                 TP_fast_assign(
587                         __entry->dev = dir->i_    467                         __entry->dev = dir->i_sb->s_dev;
588                         __entry->dir = NFS_FIL    468                         __entry->dir = NFS_FILEID(dir);
589                         __entry->flags = flags    469                         __entry->flags = flags;
590                         __assign_str(name);    !! 470                         __assign_str(name, dentry->d_name.name);
591                 ),                                471                 ),
592                                                   472 
593                 TP_printk(                        473                 TP_printk(
594                         "flags=0x%lx (%s) name    474                         "flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
595                         __entry->flags,           475                         __entry->flags,
596                         show_fs_fcntl_open_fla !! 476                         show_open_flags(__entry->flags),
597                         MAJOR(__entry->dev), M    477                         MAJOR(__entry->dev), MINOR(__entry->dev),
598                         (unsigned long long)__    478                         (unsigned long long)__entry->dir,
599                         __get_str(name)           479                         __get_str(name)
600                 )                                 480                 )
601 );                                                481 );
602                                                   482 
603 TRACE_EVENT(nfs_create_exit,                      483 TRACE_EVENT(nfs_create_exit,
604                 TP_PROTO(                         484                 TP_PROTO(
605                         const struct inode *di    485                         const struct inode *dir,
606                         const struct dentry *d    486                         const struct dentry *dentry,
607                         unsigned int flags,       487                         unsigned int flags,
608                         int error                 488                         int error
609                 ),                                489                 ),
610                                                   490 
611                 TP_ARGS(dir, dentry, flags, er    491                 TP_ARGS(dir, dentry, flags, error),
612                                                   492 
613                 TP_STRUCT__entry(                 493                 TP_STRUCT__entry(
614                         __field(unsigned long,    494                         __field(unsigned long, error)
615                         __field(unsigned long,    495                         __field(unsigned long, flags)
616                         __field(dev_t, dev)       496                         __field(dev_t, dev)
617                         __field(u64, dir)         497                         __field(u64, dir)
618                         __string(name, dentry-    498                         __string(name, dentry->d_name.name)
619                 ),                                499                 ),
620                                                   500 
621                 TP_fast_assign(                   501                 TP_fast_assign(
622                         __entry->error = -erro    502                         __entry->error = -error;
623                         __entry->dev = dir->i_    503                         __entry->dev = dir->i_sb->s_dev;
624                         __entry->dir = NFS_FIL    504                         __entry->dir = NFS_FILEID(dir);
625                         __entry->flags = flags    505                         __entry->flags = flags;
626                         __assign_str(name);    !! 506                         __assign_str(name, dentry->d_name.name);
627                 ),                                507                 ),
628                                                   508 
629                 TP_printk(                        509                 TP_printk(
630                         "error=%ld (%s) flags=    510                         "error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
631                         -__entry->error, show_ !! 511                         -__entry->error, nfs_show_status(__entry->error),
632                         __entry->flags,           512                         __entry->flags,
633                         show_fs_fcntl_open_fla !! 513                         show_open_flags(__entry->flags),
634                         MAJOR(__entry->dev), M    514                         MAJOR(__entry->dev), MINOR(__entry->dev),
635                         (unsigned long long)__    515                         (unsigned long long)__entry->dir,
636                         __get_str(name)           516                         __get_str(name)
637                 )                                 517                 )
638 );                                                518 );
639                                                   519 
640 DECLARE_EVENT_CLASS(nfs_directory_event,          520 DECLARE_EVENT_CLASS(nfs_directory_event,
641                 TP_PROTO(                         521                 TP_PROTO(
642                         const struct inode *di    522                         const struct inode *dir,
643                         const struct dentry *d    523                         const struct dentry *dentry
644                 ),                                524                 ),
645                                                   525 
646                 TP_ARGS(dir, dentry),             526                 TP_ARGS(dir, dentry),
647                                                   527 
648                 TP_STRUCT__entry(                 528                 TP_STRUCT__entry(
649                         __field(dev_t, dev)       529                         __field(dev_t, dev)
650                         __field(u64, dir)         530                         __field(u64, dir)
651                         __string(name, dentry-    531                         __string(name, dentry->d_name.name)
652                 ),                                532                 ),
653                                                   533 
654                 TP_fast_assign(                   534                 TP_fast_assign(
655                         __entry->dev = dir->i_    535                         __entry->dev = dir->i_sb->s_dev;
656                         __entry->dir = NFS_FIL    536                         __entry->dir = NFS_FILEID(dir);
657                         __assign_str(name);    !! 537                         __assign_str(name, dentry->d_name.name);
658                 ),                                538                 ),
659                                                   539 
660                 TP_printk(                        540                 TP_printk(
661                         "name=%02x:%02x:%llu/%    541                         "name=%02x:%02x:%llu/%s",
662                         MAJOR(__entry->dev), M    542                         MAJOR(__entry->dev), MINOR(__entry->dev),
663                         (unsigned long long)__    543                         (unsigned long long)__entry->dir,
664                         __get_str(name)           544                         __get_str(name)
665                 )                                 545                 )
666 );                                                546 );
667                                                   547 
668 #define DEFINE_NFS_DIRECTORY_EVENT(name) \        548 #define DEFINE_NFS_DIRECTORY_EVENT(name) \
669         DEFINE_EVENT(nfs_directory_event, name    549         DEFINE_EVENT(nfs_directory_event, name, \
670                         TP_PROTO( \               550                         TP_PROTO( \
671                                 const struct i    551                                 const struct inode *dir, \
672                                 const struct d    552                                 const struct dentry *dentry \
673                         ), \                      553                         ), \
674                         TP_ARGS(dir, dentry))     554                         TP_ARGS(dir, dentry))
675                                                   555 
676 DECLARE_EVENT_CLASS(nfs_directory_event_done,     556 DECLARE_EVENT_CLASS(nfs_directory_event_done,
677                 TP_PROTO(                         557                 TP_PROTO(
678                         const struct inode *di    558                         const struct inode *dir,
679                         const struct dentry *d    559                         const struct dentry *dentry,
680                         int error                 560                         int error
681                 ),                                561                 ),
682                                                   562 
683                 TP_ARGS(dir, dentry, error),      563                 TP_ARGS(dir, dentry, error),
684                                                   564 
685                 TP_STRUCT__entry(                 565                 TP_STRUCT__entry(
686                         __field(unsigned long,    566                         __field(unsigned long, error)
687                         __field(dev_t, dev)       567                         __field(dev_t, dev)
688                         __field(u64, dir)         568                         __field(u64, dir)
689                         __string(name, dentry-    569                         __string(name, dentry->d_name.name)
690                 ),                                570                 ),
691                                                   571 
692                 TP_fast_assign(                   572                 TP_fast_assign(
693                         __entry->dev = dir->i_    573                         __entry->dev = dir->i_sb->s_dev;
694                         __entry->dir = NFS_FIL    574                         __entry->dir = NFS_FILEID(dir);
695                         __entry->error = error    575                         __entry->error = error < 0 ? -error : 0;
696                         __assign_str(name);    !! 576                         __assign_str(name, dentry->d_name.name);
697                 ),                                577                 ),
698                                                   578 
699                 TP_printk(                        579                 TP_printk(
700                         "error=%ld (%s) name=%    580                         "error=%ld (%s) name=%02x:%02x:%llu/%s",
701                         -__entry->error, show_ !! 581                         -__entry->error, nfs_show_status(__entry->error),
702                         MAJOR(__entry->dev), M    582                         MAJOR(__entry->dev), MINOR(__entry->dev),
703                         (unsigned long long)__    583                         (unsigned long long)__entry->dir,
704                         __get_str(name)           584                         __get_str(name)
705                 )                                 585                 )
706 );                                                586 );
707                                                   587 
708 #define DEFINE_NFS_DIRECTORY_EVENT_DONE(name)     588 #define DEFINE_NFS_DIRECTORY_EVENT_DONE(name) \
709         DEFINE_EVENT(nfs_directory_event_done,    589         DEFINE_EVENT(nfs_directory_event_done, name, \
710                         TP_PROTO( \               590                         TP_PROTO( \
711                                 const struct i    591                                 const struct inode *dir, \
712                                 const struct d    592                                 const struct dentry *dentry, \
713                                 int error \       593                                 int error \
714                         ), \                      594                         ), \
715                         TP_ARGS(dir, dentry, e    595                         TP_ARGS(dir, dentry, error))
716                                                   596 
717 DEFINE_NFS_DIRECTORY_EVENT(nfs_mknod_enter);      597 DEFINE_NFS_DIRECTORY_EVENT(nfs_mknod_enter);
718 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mknod_exit    598 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mknod_exit);
719 DEFINE_NFS_DIRECTORY_EVENT(nfs_mkdir_enter);      599 DEFINE_NFS_DIRECTORY_EVENT(nfs_mkdir_enter);
720 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mkdir_exit    600 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_mkdir_exit);
721 DEFINE_NFS_DIRECTORY_EVENT(nfs_rmdir_enter);      601 DEFINE_NFS_DIRECTORY_EVENT(nfs_rmdir_enter);
722 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_rmdir_exit    602 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_rmdir_exit);
723 DEFINE_NFS_DIRECTORY_EVENT(nfs_remove_enter);     603 DEFINE_NFS_DIRECTORY_EVENT(nfs_remove_enter);
724 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_remove_exi    604 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_remove_exit);
725 DEFINE_NFS_DIRECTORY_EVENT(nfs_unlink_enter);     605 DEFINE_NFS_DIRECTORY_EVENT(nfs_unlink_enter);
726 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exi    606 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exit);
727 DEFINE_NFS_DIRECTORY_EVENT(nfs_symlink_enter);    607 DEFINE_NFS_DIRECTORY_EVENT(nfs_symlink_enter);
728 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_symlink_ex    608 DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_symlink_exit);
729                                                   609 
730 TRACE_EVENT(nfs_link_enter,                       610 TRACE_EVENT(nfs_link_enter,
731                 TP_PROTO(                         611                 TP_PROTO(
732                         const struct inode *in    612                         const struct inode *inode,
733                         const struct inode *di    613                         const struct inode *dir,
734                         const struct dentry *d    614                         const struct dentry *dentry
735                 ),                                615                 ),
736                                                   616 
737                 TP_ARGS(inode, dir, dentry),      617                 TP_ARGS(inode, dir, dentry),
738                                                   618 
739                 TP_STRUCT__entry(                 619                 TP_STRUCT__entry(
740                         __field(dev_t, dev)       620                         __field(dev_t, dev)
741                         __field(u64, fileid)      621                         __field(u64, fileid)
742                         __field(u64, dir)         622                         __field(u64, dir)
743                         __string(name, dentry-    623                         __string(name, dentry->d_name.name)
744                 ),                                624                 ),
745                                                   625 
746                 TP_fast_assign(                   626                 TP_fast_assign(
747                         __entry->dev = inode->    627                         __entry->dev = inode->i_sb->s_dev;
748                         __entry->fileid = NFS_    628                         __entry->fileid = NFS_FILEID(inode);
749                         __entry->dir = NFS_FIL    629                         __entry->dir = NFS_FILEID(dir);
750                         __assign_str(name);    !! 630                         __assign_str(name, dentry->d_name.name);
751                 ),                                631                 ),
752                                                   632 
753                 TP_printk(                        633                 TP_printk(
754                         "fileid=%02x:%02x:%llu    634                         "fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
755                         MAJOR(__entry->dev), M    635                         MAJOR(__entry->dev), MINOR(__entry->dev),
756                         __entry->fileid,          636                         __entry->fileid,
757                         MAJOR(__entry->dev), M    637                         MAJOR(__entry->dev), MINOR(__entry->dev),
758                         (unsigned long long)__    638                         (unsigned long long)__entry->dir,
759                         __get_str(name)           639                         __get_str(name)
760                 )                                 640                 )
761 );                                                641 );
762                                                   642 
763 TRACE_EVENT(nfs_link_exit,                        643 TRACE_EVENT(nfs_link_exit,
764                 TP_PROTO(                         644                 TP_PROTO(
765                         const struct inode *in    645                         const struct inode *inode,
766                         const struct inode *di    646                         const struct inode *dir,
767                         const struct dentry *d    647                         const struct dentry *dentry,
768                         int error                 648                         int error
769                 ),                                649                 ),
770                                                   650 
771                 TP_ARGS(inode, dir, dentry, er    651                 TP_ARGS(inode, dir, dentry, error),
772                                                   652 
773                 TP_STRUCT__entry(                 653                 TP_STRUCT__entry(
774                         __field(unsigned long,    654                         __field(unsigned long, error)
775                         __field(dev_t, dev)       655                         __field(dev_t, dev)
776                         __field(u64, fileid)      656                         __field(u64, fileid)
777                         __field(u64, dir)         657                         __field(u64, dir)
778                         __string(name, dentry-    658                         __string(name, dentry->d_name.name)
779                 ),                                659                 ),
780                                                   660 
781                 TP_fast_assign(                   661                 TP_fast_assign(
782                         __entry->dev = inode->    662                         __entry->dev = inode->i_sb->s_dev;
783                         __entry->fileid = NFS_    663                         __entry->fileid = NFS_FILEID(inode);
784                         __entry->dir = NFS_FIL    664                         __entry->dir = NFS_FILEID(dir);
785                         __entry->error = error    665                         __entry->error = error < 0 ? -error : 0;
786                         __assign_str(name);    !! 666                         __assign_str(name, dentry->d_name.name);
787                 ),                                667                 ),
788                                                   668 
789                 TP_printk(                        669                 TP_printk(
790                         "error=%ld (%s) fileid    670                         "error=%ld (%s) fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s",
791                         -__entry->error, show_ !! 671                         -__entry->error, nfs_show_status(__entry->error),
792                         MAJOR(__entry->dev), M    672                         MAJOR(__entry->dev), MINOR(__entry->dev),
793                         __entry->fileid,          673                         __entry->fileid,
794                         MAJOR(__entry->dev), M    674                         MAJOR(__entry->dev), MINOR(__entry->dev),
795                         (unsigned long long)__    675                         (unsigned long long)__entry->dir,
796                         __get_str(name)           676                         __get_str(name)
797                 )                                 677                 )
798 );                                                678 );
799                                                   679 
800 DECLARE_EVENT_CLASS(nfs_rename_event,             680 DECLARE_EVENT_CLASS(nfs_rename_event,
801                 TP_PROTO(                         681                 TP_PROTO(
802                         const struct inode *ol    682                         const struct inode *old_dir,
803                         const struct dentry *o    683                         const struct dentry *old_dentry,
804                         const struct inode *ne    684                         const struct inode *new_dir,
805                         const struct dentry *n    685                         const struct dentry *new_dentry
806                 ),                                686                 ),
807                                                   687 
808                 TP_ARGS(old_dir, old_dentry, n    688                 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry),
809                                                   689 
810                 TP_STRUCT__entry(                 690                 TP_STRUCT__entry(
811                         __field(dev_t, dev)       691                         __field(dev_t, dev)
812                         __field(u64, old_dir)     692                         __field(u64, old_dir)
813                         __field(u64, new_dir)     693                         __field(u64, new_dir)
814                         __string(old_name, old    694                         __string(old_name, old_dentry->d_name.name)
815                         __string(new_name, new    695                         __string(new_name, new_dentry->d_name.name)
816                 ),                                696                 ),
817                                                   697 
818                 TP_fast_assign(                   698                 TP_fast_assign(
819                         __entry->dev = old_dir    699                         __entry->dev = old_dir->i_sb->s_dev;
820                         __entry->old_dir = NFS    700                         __entry->old_dir = NFS_FILEID(old_dir);
821                         __entry->new_dir = NFS    701                         __entry->new_dir = NFS_FILEID(new_dir);
822                         __assign_str(old_name) !! 702                         __assign_str(old_name, old_dentry->d_name.name);
823                         __assign_str(new_name) !! 703                         __assign_str(new_name, new_dentry->d_name.name);
824                 ),                                704                 ),
825                                                   705 
826                 TP_printk(                        706                 TP_printk(
827                         "old_name=%02x:%02x:%l    707                         "old_name=%02x:%02x:%llu/%s new_name=%02x:%02x:%llu/%s",
828                         MAJOR(__entry->dev), M    708                         MAJOR(__entry->dev), MINOR(__entry->dev),
829                         (unsigned long long)__    709                         (unsigned long long)__entry->old_dir,
830                         __get_str(old_name),      710                         __get_str(old_name),
831                         MAJOR(__entry->dev), M    711                         MAJOR(__entry->dev), MINOR(__entry->dev),
832                         (unsigned long long)__    712                         (unsigned long long)__entry->new_dir,
833                         __get_str(new_name)       713                         __get_str(new_name)
834                 )                                 714                 )
835 );                                                715 );
836 #define DEFINE_NFS_RENAME_EVENT(name) \           716 #define DEFINE_NFS_RENAME_EVENT(name) \
837         DEFINE_EVENT(nfs_rename_event, name, \    717         DEFINE_EVENT(nfs_rename_event, name, \
838                         TP_PROTO( \               718                         TP_PROTO( \
839                                 const struct i    719                                 const struct inode *old_dir, \
840                                 const struct d    720                                 const struct dentry *old_dentry, \
841                                 const struct i    721                                 const struct inode *new_dir, \
842                                 const struct d    722                                 const struct dentry *new_dentry \
843                         ), \                      723                         ), \
844                         TP_ARGS(old_dir, old_d    724                         TP_ARGS(old_dir, old_dentry, new_dir, new_dentry))
845                                                   725 
846 DECLARE_EVENT_CLASS(nfs_rename_event_done,        726 DECLARE_EVENT_CLASS(nfs_rename_event_done,
847                 TP_PROTO(                         727                 TP_PROTO(
848                         const struct inode *ol    728                         const struct inode *old_dir,
849                         const struct dentry *o    729                         const struct dentry *old_dentry,
850                         const struct inode *ne    730                         const struct inode *new_dir,
851                         const struct dentry *n    731                         const struct dentry *new_dentry,
852                         int error                 732                         int error
853                 ),                                733                 ),
854                                                   734 
855                 TP_ARGS(old_dir, old_dentry, n    735                 TP_ARGS(old_dir, old_dentry, new_dir, new_dentry, error),
856                                                   736 
857                 TP_STRUCT__entry(                 737                 TP_STRUCT__entry(
858                         __field(dev_t, dev)       738                         __field(dev_t, dev)
859                         __field(unsigned long,    739                         __field(unsigned long, error)
860                         __field(u64, old_dir)     740                         __field(u64, old_dir)
861                         __string(old_name, old    741                         __string(old_name, old_dentry->d_name.name)
862                         __field(u64, new_dir)     742                         __field(u64, new_dir)
863                         __string(new_name, new    743                         __string(new_name, new_dentry->d_name.name)
864                 ),                                744                 ),
865                                                   745 
866                 TP_fast_assign(                   746                 TP_fast_assign(
867                         __entry->dev = old_dir    747                         __entry->dev = old_dir->i_sb->s_dev;
868                         __entry->error = -erro    748                         __entry->error = -error;
869                         __entry->old_dir = NFS    749                         __entry->old_dir = NFS_FILEID(old_dir);
870                         __entry->new_dir = NFS    750                         __entry->new_dir = NFS_FILEID(new_dir);
871                         __assign_str(old_name) !! 751                         __assign_str(old_name, old_dentry->d_name.name);
872                         __assign_str(new_name) !! 752                         __assign_str(new_name, new_dentry->d_name.name);
873                 ),                                753                 ),
874                                                   754 
875                 TP_printk(                        755                 TP_printk(
876                         "error=%ld (%s) old_na    756                         "error=%ld (%s) old_name=%02x:%02x:%llu/%s "
877                         "new_name=%02x:%02x:%l    757                         "new_name=%02x:%02x:%llu/%s",
878                         -__entry->error, show_ !! 758                         -__entry->error, nfs_show_status(__entry->error),
879                         MAJOR(__entry->dev), M    759                         MAJOR(__entry->dev), MINOR(__entry->dev),
880                         (unsigned long long)__    760                         (unsigned long long)__entry->old_dir,
881                         __get_str(old_name),      761                         __get_str(old_name),
882                         MAJOR(__entry->dev), M    762                         MAJOR(__entry->dev), MINOR(__entry->dev),
883                         (unsigned long long)__    763                         (unsigned long long)__entry->new_dir,
884                         __get_str(new_name)       764                         __get_str(new_name)
885                 )                                 765                 )
886 );                                                766 );
887 #define DEFINE_NFS_RENAME_EVENT_DONE(name) \      767 #define DEFINE_NFS_RENAME_EVENT_DONE(name) \
888         DEFINE_EVENT(nfs_rename_event_done, na    768         DEFINE_EVENT(nfs_rename_event_done, name, \
889                         TP_PROTO( \               769                         TP_PROTO( \
890                                 const struct i    770                                 const struct inode *old_dir, \
891                                 const struct d    771                                 const struct dentry *old_dentry, \
892                                 const struct i    772                                 const struct inode *new_dir, \
893                                 const struct d    773                                 const struct dentry *new_dentry, \
894                                 int error \       774                                 int error \
895                         ), \                      775                         ), \
896                         TP_ARGS(old_dir, old_d    776                         TP_ARGS(old_dir, old_dentry, new_dir, \
897                                 new_dentry, er    777                                 new_dentry, error))
898                                                   778 
899 DEFINE_NFS_RENAME_EVENT(nfs_rename_enter);        779 DEFINE_NFS_RENAME_EVENT(nfs_rename_enter);
900 DEFINE_NFS_RENAME_EVENT_DONE(nfs_rename_exit);    780 DEFINE_NFS_RENAME_EVENT_DONE(nfs_rename_exit);
901                                                   781 
902 DEFINE_NFS_RENAME_EVENT_DONE(nfs_async_rename_ !! 782 DEFINE_NFS_RENAME_EVENT_DONE(nfs_sillyrename_rename);
903                                                   783 
904 TRACE_EVENT(nfs_sillyrename_unlink,               784 TRACE_EVENT(nfs_sillyrename_unlink,
905                 TP_PROTO(                         785                 TP_PROTO(
906                         const struct nfs_unlin    786                         const struct nfs_unlinkdata *data,
907                         int error                 787                         int error
908                 ),                                788                 ),
909                                                   789 
910                 TP_ARGS(data, error),             790                 TP_ARGS(data, error),
911                                                   791 
912                 TP_STRUCT__entry(                 792                 TP_STRUCT__entry(
913                         __field(dev_t, dev)       793                         __field(dev_t, dev)
914                         __field(unsigned long,    794                         __field(unsigned long, error)
915                         __field(u64, dir)         795                         __field(u64, dir)
916                         __dynamic_array(char,     796                         __dynamic_array(char, name, data->args.name.len + 1)
917                 ),                                797                 ),
918                                                   798 
919                 TP_fast_assign(                   799                 TP_fast_assign(
920                         struct inode *dir = d_    800                         struct inode *dir = d_inode(data->dentry->d_parent);
921                         size_t len = data->arg    801                         size_t len = data->args.name.len;
922                         __entry->dev = dir->i_    802                         __entry->dev = dir->i_sb->s_dev;
923                         __entry->dir = NFS_FIL    803                         __entry->dir = NFS_FILEID(dir);
924                         __entry->error = -erro    804                         __entry->error = -error;
925                         memcpy(__get_str(name)    805                         memcpy(__get_str(name),
926                                 data->args.nam    806                                 data->args.name.name, len);
927                         __get_str(name)[len] =    807                         __get_str(name)[len] = 0;
928                 ),                                808                 ),
929                                                   809 
930                 TP_printk(                        810                 TP_printk(
931                         "error=%ld (%s) name=%    811                         "error=%ld (%s) name=%02x:%02x:%llu/%s",
932                         -__entry->error, show_ !! 812                         -__entry->error, nfs_show_status(__entry->error),
933                         MAJOR(__entry->dev), M    813                         MAJOR(__entry->dev), MINOR(__entry->dev),
934                         (unsigned long long)__    814                         (unsigned long long)__entry->dir,
935                         __get_str(name)           815                         __get_str(name)
936                 )                                 816                 )
937 );                                                817 );
938                                                   818 
939 DECLARE_EVENT_CLASS(nfs_folio_event,           !! 819 TRACE_EVENT(nfs_initiate_read,
940                 TP_PROTO(                         820                 TP_PROTO(
941                         const struct inode *in    821                         const struct inode *inode,
942                         loff_t offset,         !! 822                         loff_t offset, unsigned long count
943                         size_t count           << 
944                 ),                                823                 ),
945                                                   824 
946                 TP_ARGS(inode, offset, count),    825                 TP_ARGS(inode, offset, count),
947                                                   826 
948                 TP_STRUCT__entry(                 827                 TP_STRUCT__entry(
949                         __field(dev_t, dev)    << 
950                         __field(u32, fhandle)  << 
951                         __field(u64, fileid)   << 
952                         __field(u64, version)  << 
953                         __field(loff_t, offset    828                         __field(loff_t, offset)
954                         __field(size_t, count) !! 829                         __field(unsigned long, count)
955                 ),                             << 
956                                                << 
957                 TP_fast_assign(                << 
958                         const struct nfs_inode << 
959                                                << 
960                         __entry->dev = inode-> << 
961                         __entry->fileid = nfsi << 
962                         __entry->fhandle = nfs << 
963                         __entry->version = ino << 
964                         __entry->offset = offs << 
965                         __entry->count = count << 
966                 ),                             << 
967                                                << 
968                 TP_printk(                     << 
969                         "fileid=%02x:%02x:%llu << 
970                         "offset=%lld count=%zu << 
971                         MAJOR(__entry->dev), M << 
972                         (unsigned long long)__ << 
973                         __entry->fhandle, __en << 
974                         __entry->offset, __ent << 
975                 )                              << 
976 );                                             << 
977                                                << 
978 #define DEFINE_NFS_FOLIO_EVENT(name) \         << 
979         DEFINE_EVENT(nfs_folio_event, name, \  << 
980                         TP_PROTO( \            << 
981                                 const struct i << 
982                                 loff_t offset, << 
983                                 size_t count \ << 
984                         ), \                   << 
985                         TP_ARGS(inode, offset, << 
986                                                << 
987 DECLARE_EVENT_CLASS(nfs_folio_event_done,      << 
988                 TP_PROTO(                      << 
989                         const struct inode *in << 
990                         loff_t offset,         << 
991                         size_t count,          << 
992                         int ret                << 
993                 ),                             << 
994                                                << 
995                 TP_ARGS(inode, offset, count,  << 
996                                                << 
997                 TP_STRUCT__entry(              << 
998                         __field(dev_t, dev)       830                         __field(dev_t, dev)
999                         __field(u32, fhandle)     831                         __field(u32, fhandle)
1000                         __field(int, ret)     << 
1001                         __field(u64, fileid)     832                         __field(u64, fileid)
1002                         __field(u64, version) << 
1003                         __field(loff_t, offse << 
1004                         __field(size_t, count << 
1005                 ),                               833                 ),
1006                                                  834 
1007                 TP_fast_assign(                  835                 TP_fast_assign(
1008                         const struct nfs_inod    836                         const struct nfs_inode *nfsi = NFS_I(inode);
1009                                                  837 
                                                   >> 838                         __entry->offset = offset;
                                                   >> 839                         __entry->count = count;
1010                         __entry->dev = inode-    840                         __entry->dev = inode->i_sb->s_dev;
1011                         __entry->fileid = nfs    841                         __entry->fileid = nfsi->fileid;
1012                         __entry->fhandle = nf    842                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1013                         __entry->version = in << 
1014                         __entry->offset = off << 
1015                         __entry->count = coun << 
1016                         __entry->ret = ret;   << 
1017                 ),                            << 
1018                                               << 
1019                 TP_printk(                    << 
1020                         "fileid=%02x:%02x:%ll << 
1021                         "offset=%lld count=%z << 
1022                         MAJOR(__entry->dev),  << 
1023                         (unsigned long long)_ << 
1024                         __entry->fhandle, __e << 
1025                         __entry->offset, __en << 
1026                 )                             << 
1027 );                                            << 
1028                                               << 
1029 #define DEFINE_NFS_FOLIO_EVENT_DONE(name) \   << 
1030         DEFINE_EVENT(nfs_folio_event_done, na << 
1031                         TP_PROTO( \           << 
1032                                 const struct  << 
1033                                 loff_t offset << 
1034                                 size_t count, << 
1035                                 int ret \     << 
1036                         ), \                  << 
1037                         TP_ARGS(inode, offset << 
1038                                               << 
1039 DEFINE_NFS_FOLIO_EVENT(nfs_aop_readpage);     << 
1040 DEFINE_NFS_FOLIO_EVENT_DONE(nfs_aop_readpage_ << 
1041                                               << 
1042 DEFINE_NFS_FOLIO_EVENT(nfs_writeback_folio);  << 
1043 DEFINE_NFS_FOLIO_EVENT_DONE(nfs_writeback_fol << 
1044                                               << 
1045 DEFINE_NFS_FOLIO_EVENT(nfs_invalidate_folio); << 
1046 DEFINE_NFS_FOLIO_EVENT_DONE(nfs_launder_folio << 
1047                                               << 
1048 TRACE_EVENT(nfs_aop_readahead,                << 
1049                 TP_PROTO(                     << 
1050                         const struct inode *i << 
1051                         loff_t pos,           << 
1052                         unsigned int nr_pages << 
1053                 ),                            << 
1054                                               << 
1055                 TP_ARGS(inode, pos, nr_pages) << 
1056                                               << 
1057                 TP_STRUCT__entry(             << 
1058                         __field(dev_t, dev)   << 
1059                         __field(u32, fhandle) << 
1060                         __field(u64, fileid)  << 
1061                         __field(u64, version) << 
1062                         __field(loff_t, offse << 
1063                         __field(unsigned int, << 
1064                 ),                            << 
1065                                               << 
1066                 TP_fast_assign(               << 
1067                         const struct nfs_inod << 
1068                                               << 
1069                         __entry->dev = inode- << 
1070                         __entry->fileid = nfs << 
1071                         __entry->fhandle = nf << 
1072                         __entry->version = in << 
1073                         __entry->offset = pos << 
1074                         __entry->nr_pages = n << 
1075                 ),                            << 
1076                                               << 
1077                 TP_printk(                    << 
1078                         "fileid=%02x:%02x:%ll << 
1079                         MAJOR(__entry->dev),  << 
1080                         (unsigned long long)_ << 
1081                         __entry->fhandle, __e << 
1082                         __entry->offset, __en << 
1083                 )                             << 
1084 );                                            << 
1085                                               << 
1086 TRACE_EVENT(nfs_aop_readahead_done,           << 
1087                 TP_PROTO(                     << 
1088                         const struct inode *i << 
1089                         unsigned int nr_pages << 
1090                         int ret               << 
1091                 ),                            << 
1092                                               << 
1093                 TP_ARGS(inode, nr_pages, ret) << 
1094                                               << 
1095                 TP_STRUCT__entry(             << 
1096                         __field(dev_t, dev)   << 
1097                         __field(u32, fhandle) << 
1098                         __field(int, ret)     << 
1099                         __field(u64, fileid)  << 
1100                         __field(u64, version) << 
1101                         __field(loff_t, offse << 
1102                         __field(unsigned int, << 
1103                 ),                            << 
1104                                               << 
1105                 TP_fast_assign(               << 
1106                         const struct nfs_inod << 
1107                                               << 
1108                         __entry->dev = inode- << 
1109                         __entry->fileid = nfs << 
1110                         __entry->fhandle = nf << 
1111                         __entry->version = in << 
1112                         __entry->nr_pages = n << 
1113                         __entry->ret = ret;   << 
1114                 ),                            << 
1115                                               << 
1116                 TP_printk(                    << 
1117                         "fileid=%02x:%02x:%ll << 
1118                         MAJOR(__entry->dev),  << 
1119                         (unsigned long long)_ << 
1120                         __entry->fhandle, __e << 
1121                         __entry->nr_pages, __ << 
1122                 )                             << 
1123 );                                            << 
1124                                               << 
1125 TRACE_EVENT(nfs_initiate_read,                << 
1126                 TP_PROTO(                     << 
1127                         const struct nfs_pgio << 
1128                 ),                            << 
1129                                               << 
1130                 TP_ARGS(hdr),                 << 
1131                                               << 
1132                 TP_STRUCT__entry(             << 
1133                         __field(dev_t, dev)   << 
1134                         __field(u32, fhandle) << 
1135                         __field(u64, fileid)  << 
1136                         __field(loff_t, offse << 
1137                         __field(u32, count)   << 
1138                 ),                            << 
1139                                               << 
1140                 TP_fast_assign(               << 
1141                         const struct inode *i << 
1142                         const struct nfs_inod << 
1143                         const struct nfs_fh * << 
1144                                               << 
1145                                               << 
1146                         __entry->offset = hdr << 
1147                         __entry->count = hdr- << 
1148                         __entry->dev = inode- << 
1149                         __entry->fileid = nfs << 
1150                         __entry->fhandle = nf << 
1151                 ),                               843                 ),
1152                                                  844 
1153                 TP_printk(                       845                 TP_printk(
1154                         "fileid=%02x:%02x:%ll    846                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1155                         "offset=%lld count=%u !! 847                         "offset=%lld count=%lu",
1156                         MAJOR(__entry->dev),     848                         MAJOR(__entry->dev), MINOR(__entry->dev),
1157                         (unsigned long long)_    849                         (unsigned long long)__entry->fileid,
1158                         __entry->fhandle,        850                         __entry->fhandle,
1159                         (long long)__entry->o !! 851                         __entry->offset, __entry->count
1160                 )                                852                 )
1161 );                                               853 );
1162                                                  854 
1163 TRACE_EVENT(nfs_readpage_done,                   855 TRACE_EVENT(nfs_readpage_done,
1164                 TP_PROTO(                        856                 TP_PROTO(
1165                         const struct rpc_task !! 857                         const struct inode *inode,
1166                         const struct nfs_pgio !! 858                         int status, loff_t offset, bool eof
1167                 ),                               859                 ),
1168                                                  860 
1169                 TP_ARGS(task, hdr),           !! 861                 TP_ARGS(inode, status, offset, eof),
1170                                                  862 
1171                 TP_STRUCT__entry(                863                 TP_STRUCT__entry(
1172                         __field(dev_t, dev)   !! 864                         __field(int, status)
1173                         __field(u32, fhandle) << 
1174                         __field(u64, fileid)  << 
1175                         __field(loff_t, offse    865                         __field(loff_t, offset)
1176                         __field(u32, arg_coun << 
1177                         __field(u32, res_coun << 
1178                         __field(bool, eof)       866                         __field(bool, eof)
1179                         __field(int, error)   << 
1180                 ),                            << 
1181                                               << 
1182                 TP_fast_assign(               << 
1183                         const struct inode *i << 
1184                         const struct nfs_inod << 
1185                         const struct nfs_fh * << 
1186                                               << 
1187                                               << 
1188                         __entry->error = task << 
1189                         __entry->offset = hdr << 
1190                         __entry->arg_count =  << 
1191                         __entry->res_count =  << 
1192                         __entry->eof = hdr->r << 
1193                         __entry->dev = inode- << 
1194                         __entry->fileid = nfs << 
1195                         __entry->fhandle = nf << 
1196                 ),                            << 
1197                                               << 
1198                 TP_printk(                    << 
1199                         "error=%d fileid=%02x << 
1200                         "offset=%lld count=%u << 
1201                         MAJOR(__entry->dev),  << 
1202                         (unsigned long long)_ << 
1203                         __entry->fhandle,     << 
1204                         (long long)__entry->o << 
1205                         __entry->res_count, _ << 
1206                 )                             << 
1207 );                                            << 
1208                                               << 
1209 TRACE_EVENT(nfs_readpage_short,               << 
1210                 TP_PROTO(                     << 
1211                         const struct rpc_task << 
1212                         const struct nfs_pgio << 
1213                 ),                            << 
1214                                               << 
1215                 TP_ARGS(task, hdr),           << 
1216                                               << 
1217                 TP_STRUCT__entry(             << 
1218                         __field(dev_t, dev)      867                         __field(dev_t, dev)
1219                         __field(u32, fhandle)    868                         __field(u32, fhandle)
1220                         __field(u64, fileid)     869                         __field(u64, fileid)
1221                         __field(loff_t, offse << 
1222                         __field(u32, arg_coun << 
1223                         __field(u32, res_coun << 
1224                         __field(bool, eof)    << 
1225                         __field(int, error)   << 
1226                 ),                               870                 ),
1227                                                  871 
1228                 TP_fast_assign(                  872                 TP_fast_assign(
1229                         const struct inode *i << 
1230                         const struct nfs_inod    873                         const struct nfs_inode *nfsi = NFS_I(inode);
1231                         const struct nfs_fh * << 
1232                                               << 
1233                                                  874 
1234                         __entry->error = task !! 875                         __entry->status = status;
1235                         __entry->offset = hdr !! 876                         __entry->offset = offset;
1236                         __entry->arg_count =  !! 877                         __entry->eof = eof;
1237                         __entry->res_count =  << 
1238                         __entry->eof = hdr->r << 
1239                         __entry->dev = inode-    878                         __entry->dev = inode->i_sb->s_dev;
1240                         __entry->fileid = nfs    879                         __entry->fileid = nfsi->fileid;
1241                         __entry->fhandle = nf !! 880                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1242                 ),                               881                 ),
1243                                                  882 
1244                 TP_printk(                       883                 TP_printk(
1245                         "error=%d fileid=%02x !! 884                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1246                         "offset=%lld count=%u !! 885                         "offset=%lld status=%d%s",
1247                         MAJOR(__entry->dev),     886                         MAJOR(__entry->dev), MINOR(__entry->dev),
1248                         (unsigned long long)_    887                         (unsigned long long)__entry->fileid,
1249                         __entry->fhandle,        888                         __entry->fhandle,
1250                         (long long)__entry->o !! 889                         __entry->offset, __entry->status,
1251                         __entry->res_count, _ !! 890                         __entry->eof ? " eof" : ""
1252                 )                                891                 )
1253 );                                               892 );
1254                                                  893 
                                                   >> 894 TRACE_DEFINE_ENUM(NFS_UNSTABLE);
                                                   >> 895 TRACE_DEFINE_ENUM(NFS_DATA_SYNC);
                                                   >> 896 TRACE_DEFINE_ENUM(NFS_FILE_SYNC);
1255                                                  897 
1256 TRACE_EVENT(nfs_pgio_error,                   !! 898 #define nfs_show_stable(stable) \
1257         TP_PROTO(                             !! 899         __print_symbolic(stable, \
1258                 const struct nfs_pgio_header  !! 900                         { NFS_UNSTABLE, "UNSTABLE" }, \
1259                 int error,                    !! 901                         { NFS_DATA_SYNC, "DATA_SYNC" }, \
1260                 loff_t pos                    !! 902                         { NFS_FILE_SYNC, "FILE_SYNC" })
1261         ),                                    << 
1262                                               << 
1263         TP_ARGS(hdr, error, pos),             << 
1264                                               << 
1265         TP_STRUCT__entry(                     << 
1266                 __field(dev_t, dev)           << 
1267                 __field(u32, fhandle)         << 
1268                 __field(u64, fileid)          << 
1269                 __field(loff_t, offset)       << 
1270                 __field(u32, arg_count)       << 
1271                 __field(u32, res_count)       << 
1272                 __field(loff_t, pos)          << 
1273                 __field(int, error)           << 
1274         ),                                    << 
1275                                               << 
1276         TP_fast_assign(                       << 
1277                 const struct inode *inode = h << 
1278                 const struct nfs_inode *nfsi  << 
1279                 const struct nfs_fh *fh = hdr << 
1280                                           hdr << 
1281                                               << 
1282                 __entry->error = error;       << 
1283                 __entry->offset = hdr->args.o << 
1284                 __entry->arg_count = hdr->arg << 
1285                 __entry->res_count = hdr->res << 
1286                 __entry->dev = inode->i_sb->s << 
1287                 __entry->fileid = nfsi->filei << 
1288                 __entry->fhandle = nfs_fhandl << 
1289         ),                                    << 
1290                                               << 
1291         TP_printk("error=%d fileid=%02x:%02x: << 
1292                   "offset=%lld count=%u res=% << 
1293                 MAJOR(__entry->dev), MINOR(__ << 
1294                 (unsigned long long)__entry-> << 
1295                 (long long)__entry->offset, _ << 
1296                 __entry->pos                  << 
1297         )                                     << 
1298 );                                            << 
1299                                                  903 
1300 TRACE_EVENT(nfs_initiate_write,                  904 TRACE_EVENT(nfs_initiate_write,
1301                 TP_PROTO(                        905                 TP_PROTO(
1302                         const struct nfs_pgio !! 906                         const struct inode *inode,
                                                   >> 907                         loff_t offset, unsigned long count,
                                                   >> 908                         enum nfs3_stable_how stable
1303                 ),                               909                 ),
1304                                                  910 
1305                 TP_ARGS(hdr),                 !! 911                 TP_ARGS(inode, offset, count, stable),
1306                                                  912 
1307                 TP_STRUCT__entry(                913                 TP_STRUCT__entry(
                                                   >> 914                         __field(loff_t, offset)
                                                   >> 915                         __field(unsigned long, count)
                                                   >> 916                         __field(enum nfs3_stable_how, stable)
1308                         __field(dev_t, dev)      917                         __field(dev_t, dev)
1309                         __field(u32, fhandle)    918                         __field(u32, fhandle)
1310                         __field(u64, fileid)     919                         __field(u64, fileid)
1311                         __field(loff_t, offse << 
1312                         __field(u32, count)   << 
1313                         __field(unsigned long << 
1314                 ),                               920                 ),
1315                                                  921 
1316                 TP_fast_assign(                  922                 TP_fast_assign(
1317                         const struct inode *i << 
1318                         const struct nfs_inod    923                         const struct nfs_inode *nfsi = NFS_I(inode);
1319                         const struct nfs_fh * << 
1320                                               << 
1321                                                  924 
1322                         __entry->offset = hdr !! 925                         __entry->offset = offset;
1323                         __entry->count = hdr- !! 926                         __entry->count = count;
1324                         __entry->stable = hdr !! 927                         __entry->stable = stable;
1325                         __entry->dev = inode-    928                         __entry->dev = inode->i_sb->s_dev;
1326                         __entry->fileid = nfs    929                         __entry->fileid = nfsi->fileid;
1327                         __entry->fhandle = nf !! 930                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1328                 ),                               931                 ),
1329                                                  932 
1330                 TP_printk(                       933                 TP_printk(
1331                         "fileid=%02x:%02x:%ll    934                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1332                         "offset=%lld count=%u !! 935                         "offset=%lld count=%lu stable=%s",
1333                         MAJOR(__entry->dev),     936                         MAJOR(__entry->dev), MINOR(__entry->dev),
1334                         (unsigned long long)_    937                         (unsigned long long)__entry->fileid,
1335                         __entry->fhandle,        938                         __entry->fhandle,
1336                         (long long)__entry->o !! 939                         __entry->offset, __entry->count,
1337                         show_nfs_stable_how(_ !! 940                         nfs_show_stable(__entry->stable)
1338                 )                                941                 )
1339 );                                               942 );
1340                                                  943 
1341 TRACE_EVENT(nfs_writeback_done,                  944 TRACE_EVENT(nfs_writeback_done,
1342                 TP_PROTO(                        945                 TP_PROTO(
1343                         const struct rpc_task << 
1344                         const struct nfs_pgio << 
1345                 ),                            << 
1346                                               << 
1347                 TP_ARGS(task, hdr),           << 
1348                                               << 
1349                 TP_STRUCT__entry(             << 
1350                         __field(dev_t, dev)   << 
1351                         __field(u32, fhandle) << 
1352                         __field(u64, fileid)  << 
1353                         __field(loff_t, offse << 
1354                         __field(u32, arg_coun << 
1355                         __field(u32, res_coun << 
1356                         __field(int, error)   << 
1357                         __field(unsigned long << 
1358                         __array(char, verifie << 
1359                 ),                            << 
1360                                               << 
1361                 TP_fast_assign(               << 
1362                         const struct inode *i << 
1363                         const struct nfs_inod << 
1364                         const struct nfs_fh * << 
1365                                               << 
1366                         const struct nfs_writ << 
1367                                               << 
1368                         __entry->error = task << 
1369                         __entry->offset = hdr << 
1370                         __entry->arg_count =  << 
1371                         __entry->res_count =  << 
1372                         __entry->stable = ver << 
1373                         memcpy(__entry->verif << 
1374                                 &verf->verifi << 
1375                                 NFS4_VERIFIER << 
1376                         __entry->dev = inode- << 
1377                         __entry->fileid = nfs << 
1378                         __entry->fhandle = nf << 
1379                 ),                            << 
1380                                               << 
1381                 TP_printk(                    << 
1382                         "error=%d fileid=%02x << 
1383                         "offset=%lld count=%u << 
1384                         "verifier=%s", __entr << 
1385                         MAJOR(__entry->dev),  << 
1386                         (unsigned long long)_ << 
1387                         __entry->fhandle,     << 
1388                         (long long)__entry->o << 
1389                         __entry->res_count,   << 
1390                         show_nfs_stable_how(_ << 
1391                         show_nfs4_verifier(__ << 
1392                 )                             << 
1393 );                                            << 
1394                                               << 
1395 DECLARE_EVENT_CLASS(nfs_page_error_class,     << 
1396                 TP_PROTO(                     << 
1397                         const struct inode *i    946                         const struct inode *inode,
1398                         const struct nfs_page !! 947                         int status,
1399                         int error             !! 948                         loff_t offset,
                                                   >> 949                         struct nfs_writeverf *writeverf
1400                 ),                               950                 ),
1401                                                  951 
1402                 TP_ARGS(inode, req, error),   !! 952                 TP_ARGS(inode, status, offset, writeverf),
1403                                                  953 
1404                 TP_STRUCT__entry(                954                 TP_STRUCT__entry(
                                                   >> 955                         __field(int, status)
                                                   >> 956                         __field(loff_t, offset)
                                                   >> 957                         __field(enum nfs3_stable_how, stable)
                                                   >> 958                         __field(unsigned long long, verifier)
1405                         __field(dev_t, dev)      959                         __field(dev_t, dev)
1406                         __field(u32, fhandle)    960                         __field(u32, fhandle)
1407                         __field(u64, fileid)     961                         __field(u64, fileid)
1408                         __field(loff_t, offse << 
1409                         __field(unsigned int, << 
1410                         __field(int, error)   << 
1411                 ),                               962                 ),
1412                                                  963 
1413                 TP_fast_assign(                  964                 TP_fast_assign(
1414                         const struct nfs_inod    965                         const struct nfs_inode *nfsi = NFS_I(inode);
                                                   >> 966 
                                                   >> 967                         __entry->status = status;
                                                   >> 968                         __entry->offset = offset;
                                                   >> 969                         __entry->stable = writeverf->committed;
                                                   >> 970                         memcpy(&__entry->verifier, &writeverf->verifier,
                                                   >> 971                                sizeof(__entry->verifier));
1415                         __entry->dev = inode-    972                         __entry->dev = inode->i_sb->s_dev;
1416                         __entry->fileid = nfs    973                         __entry->fileid = nfsi->fileid;
1417                         __entry->fhandle = nf    974                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1418                         __entry->offset = req << 
1419                         __entry->count = req- << 
1420                         __entry->error = erro << 
1421                 ),                               975                 ),
1422                                                  976 
1423                 TP_printk(                       977                 TP_printk(
1424                         "error=%d fileid=%02x !! 978                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1425                         "offset=%lld count=%u !! 979                         "offset=%lld status=%d stable=%s "
                                                   >> 980                         "verifier 0x%016llx",
1426                         MAJOR(__entry->dev),     981                         MAJOR(__entry->dev), MINOR(__entry->dev),
1427                         (unsigned long long)_    982                         (unsigned long long)__entry->fileid,
1428                         __entry->fhandle, __e !! 983                         __entry->fhandle,
1429                         __entry->count        !! 984                         __entry->offset, __entry->status,
                                                   >> 985                         nfs_show_stable(__entry->stable),
                                                   >> 986                         __entry->verifier
1430                 )                                987                 )
1431 );                                               988 );
1432                                                  989 
1433 #define DEFINE_NFS_PAGEERR_EVENT(name) \      << 
1434         DEFINE_EVENT(nfs_page_error_class, na << 
1435                         TP_PROTO( \           << 
1436                                 const struct  << 
1437                                 const struct  << 
1438                                 int error \   << 
1439                         ), \                  << 
1440                         TP_ARGS(inode, req, e << 
1441                                               << 
1442 DEFINE_NFS_PAGEERR_EVENT(nfs_write_error);    << 
1443 DEFINE_NFS_PAGEERR_EVENT(nfs_comp_error);     << 
1444 DEFINE_NFS_PAGEERR_EVENT(nfs_commit_error);   << 
1445                                               << 
1446 TRACE_EVENT(nfs_initiate_commit,                 990 TRACE_EVENT(nfs_initiate_commit,
1447                 TP_PROTO(                        991                 TP_PROTO(
1448                         const struct nfs_comm    992                         const struct nfs_commit_data *data
1449                 ),                               993                 ),
1450                                                  994 
1451                 TP_ARGS(data),                   995                 TP_ARGS(data),
1452                                                  996 
1453                 TP_STRUCT__entry(                997                 TP_STRUCT__entry(
                                                   >> 998                         __field(loff_t, offset)
                                                   >> 999                         __field(unsigned long, count)
1454                         __field(dev_t, dev)      1000                         __field(dev_t, dev)
1455                         __field(u32, fhandle)    1001                         __field(u32, fhandle)
1456                         __field(u64, fileid)     1002                         __field(u64, fileid)
1457                         __field(loff_t, offse << 
1458                         __field(u32, count)   << 
1459                 ),                               1003                 ),
1460                                                  1004 
1461                 TP_fast_assign(                  1005                 TP_fast_assign(
1462                         const struct inode *i    1006                         const struct inode *inode = data->inode;
1463                         const struct nfs_inod    1007                         const struct nfs_inode *nfsi = NFS_I(inode);
1464                         const struct nfs_fh * << 
1465                                               << 
1466                                                  1008 
1467                         __entry->offset = dat    1009                         __entry->offset = data->args.offset;
1468                         __entry->count = data    1010                         __entry->count = data->args.count;
1469                         __entry->dev = inode-    1011                         __entry->dev = inode->i_sb->s_dev;
1470                         __entry->fileid = nfs    1012                         __entry->fileid = nfsi->fileid;
1471                         __entry->fhandle = nf !! 1013                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1472                 ),                               1014                 ),
1473                                                  1015 
1474                 TP_printk(                       1016                 TP_printk(
1475                         "fileid=%02x:%02x:%ll    1017                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1476                         "offset=%lld count=%u !! 1018                         "offset=%lld count=%lu",
1477                         MAJOR(__entry->dev),     1019                         MAJOR(__entry->dev), MINOR(__entry->dev),
1478                         (unsigned long long)_    1020                         (unsigned long long)__entry->fileid,
1479                         __entry->fhandle,        1021                         __entry->fhandle,
1480                         (long long)__entry->o !! 1022                         __entry->offset, __entry->count
1481                 )                                1023                 )
1482 );                                               1024 );
1483                                                  1025 
1484 TRACE_EVENT(nfs_commit_done,                     1026 TRACE_EVENT(nfs_commit_done,
1485                 TP_PROTO(                        1027                 TP_PROTO(
1486                         const struct rpc_task << 
1487                         const struct nfs_comm    1028                         const struct nfs_commit_data *data
1488                 ),                               1029                 ),
1489                                                  1030 
1490                 TP_ARGS(task, data),          !! 1031                 TP_ARGS(data),
1491                                                  1032 
1492                 TP_STRUCT__entry(                1033                 TP_STRUCT__entry(
                                                   >> 1034                         __field(int, status)
                                                   >> 1035                         __field(loff_t, offset)
                                                   >> 1036                         __field(unsigned long long, verifier)
1493                         __field(dev_t, dev)      1037                         __field(dev_t, dev)
1494                         __field(u32, fhandle)    1038                         __field(u32, fhandle)
1495                         __field(u64, fileid)     1039                         __field(u64, fileid)
1496                         __field(loff_t, offse << 
1497                         __field(int, error)   << 
1498                         __field(unsigned long << 
1499                         __array(char, verifie << 
1500                 ),                               1040                 ),
1501                                                  1041 
1502                 TP_fast_assign(                  1042                 TP_fast_assign(
1503                         const struct inode *i    1043                         const struct inode *inode = data->inode;
1504                         const struct nfs_inod    1044                         const struct nfs_inode *nfsi = NFS_I(inode);
1505                         const struct nfs_fh * << 
1506                                               << 
1507                         const struct nfs_writ << 
1508                                                  1045 
1509                         __entry->error = task !! 1046                         __entry->status = data->res.op_status;
1510                         __entry->offset = dat    1047                         __entry->offset = data->args.offset;
1511                         __entry->stable = ver !! 1048                         memcpy(&__entry->verifier, &data->verf.verifier,
1512                         memcpy(__entry->verif !! 1049                                sizeof(__entry->verifier));
1513                                 &verf->verifi << 
1514                                 NFS4_VERIFIER << 
1515                         __entry->dev = inode-    1050                         __entry->dev = inode->i_sb->s_dev;
1516                         __entry->fileid = nfs    1051                         __entry->fileid = nfsi->fileid;
1517                         __entry->fhandle = nf !! 1052                         __entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
1518                 ),                               1053                 ),
1519                                                  1054 
1520                 TP_printk(                       1055                 TP_printk(
1521                         "error=%d fileid=%02x !! 1056                         "fileid=%02x:%02x:%llu fhandle=0x%08x "
1522                         "offset=%lld stable=% !! 1057                         "offset=%lld status=%d verifier 0x%016llx",
1523                         MAJOR(__entry->dev),     1058                         MAJOR(__entry->dev), MINOR(__entry->dev),
1524                         (unsigned long long)_    1059                         (unsigned long long)__entry->fileid,
1525                         __entry->fhandle,        1060                         __entry->fhandle,
1526                         (long long)__entry->o !! 1061                         __entry->offset, __entry->status,
1527                         show_nfs_stable_how(_ !! 1062                         __entry->verifier
1528                         show_nfs4_verifier(__ << 
1529                 )                             << 
1530 );                                            << 
1531                                               << 
1532 #define nfs_show_direct_req_flags(v) \        << 
1533         __print_flags(v, "|", \               << 
1534                         { NFS_ODIRECT_DO_COMM << 
1535                         { NFS_ODIRECT_RESCHED << 
1536                         { NFS_ODIRECT_SHOULD_ << 
1537                         { NFS_ODIRECT_DONE, " << 
1538                                               << 
1539 DECLARE_EVENT_CLASS(nfs_direct_req_class,     << 
1540                 TP_PROTO(                     << 
1541                         const struct nfs_dire << 
1542                 ),                            << 
1543                                               << 
1544                 TP_ARGS(dreq),                << 
1545                                               << 
1546                 TP_STRUCT__entry(             << 
1547                         __field(dev_t, dev)   << 
1548                         __field(u64, fileid)  << 
1549                         __field(u32, fhandle) << 
1550                         __field(loff_t, offse << 
1551                         __field(ssize_t, coun << 
1552                         __field(ssize_t, erro << 
1553                         __field(int, flags)   << 
1554                 ),                            << 
1555                                               << 
1556                 TP_fast_assign(               << 
1557                         const struct inode *i << 
1558                         const struct nfs_inod << 
1559                         const struct nfs_fh * << 
1560                                               << 
1561                         __entry->dev = inode- << 
1562                         __entry->fileid = nfs << 
1563                         __entry->fhandle = nf << 
1564                         __entry->offset = dre << 
1565                         __entry->count = dreq << 
1566                         __entry->error = dreq << 
1567                         __entry->flags = dreq << 
1568                 ),                            << 
1569                                               << 
1570                 TP_printk(                    << 
1571                         "error=%zd fileid=%02 << 
1572                         "offset=%lld count=%z << 
1573                         __entry->error, MAJOR << 
1574                         MINOR(__entry->dev),  << 
1575                         (unsigned long long)_ << 
1576                         __entry->fhandle, __e << 
1577                         __entry->count,       << 
1578                         nfs_show_direct_req_f << 
1579                 )                                1063                 )
1580 );                                               1064 );
1581                                                  1065 
1582 #define DEFINE_NFS_DIRECT_REQ_EVENT(name) \   << 
1583         DEFINE_EVENT(nfs_direct_req_class, na << 
1584                         TP_PROTO( \           << 
1585                                 const struct  << 
1586                         ), \                  << 
1587                         TP_ARGS(dreq))        << 
1588                                               << 
1589 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_commit << 
1590 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_resche << 
1591 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_write_ << 
1592 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_write_ << 
1593 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_write_ << 
1594 DEFINE_NFS_DIRECT_REQ_EVENT(nfs_direct_write_ << 
1595                                               << 
1596 TRACE_EVENT(nfs_fh_to_dentry,                    1066 TRACE_EVENT(nfs_fh_to_dentry,
1597                 TP_PROTO(                        1067                 TP_PROTO(
1598                         const struct super_bl    1068                         const struct super_block *sb,
1599                         const struct nfs_fh *    1069                         const struct nfs_fh *fh,
1600                         u64 fileid,              1070                         u64 fileid,
1601                         int error                1071                         int error
1602                 ),                               1072                 ),
1603                                                  1073 
1604                 TP_ARGS(sb, fh, fileid, error    1074                 TP_ARGS(sb, fh, fileid, error),
1605                                                  1075 
1606                 TP_STRUCT__entry(                1076                 TP_STRUCT__entry(
1607                         __field(int, error)      1077                         __field(int, error)
1608                         __field(dev_t, dev)      1078                         __field(dev_t, dev)
1609                         __field(u32, fhandle)    1079                         __field(u32, fhandle)
1610                         __field(u64, fileid)     1080                         __field(u64, fileid)
1611                 ),                               1081                 ),
1612                                                  1082 
1613                 TP_fast_assign(                  1083                 TP_fast_assign(
1614                         __entry->error = erro    1084                         __entry->error = error;
1615                         __entry->dev = sb->s_    1085                         __entry->dev = sb->s_dev;
1616                         __entry->fileid = fil    1086                         __entry->fileid = fileid;
1617                         __entry->fhandle = nf    1087                         __entry->fhandle = nfs_fhandle_hash(fh);
1618                 ),                               1088                 ),
1619                                                  1089 
1620                 TP_printk(                       1090                 TP_printk(
1621                         "error=%d fileid=%02x    1091                         "error=%d fileid=%02x:%02x:%llu fhandle=0x%08x ",
1622                         __entry->error,          1092                         __entry->error,
1623                         MAJOR(__entry->dev),     1093                         MAJOR(__entry->dev), MINOR(__entry->dev),
1624                         (unsigned long long)_    1094                         (unsigned long long)__entry->fileid,
1625                         __entry->fhandle         1095                         __entry->fhandle
1626                 )                                1096                 )
1627 );                                               1097 );
1628                                                  1098 
1629 TRACE_EVENT(nfs_mount_assign,                 !! 1099 TRACE_DEFINE_ENUM(NFS_OK);
1630         TP_PROTO(                             !! 1100 TRACE_DEFINE_ENUM(NFSERR_PERM);
1631                 const char *option,           !! 1101 TRACE_DEFINE_ENUM(NFSERR_NOENT);
1632                 const char *value             !! 1102 TRACE_DEFINE_ENUM(NFSERR_IO);
1633         ),                                    !! 1103 TRACE_DEFINE_ENUM(NFSERR_NXIO);
1634                                               !! 1104 TRACE_DEFINE_ENUM(ECHILD);
1635         TP_ARGS(option, value),               !! 1105 TRACE_DEFINE_ENUM(NFSERR_EAGAIN);
1636                                               !! 1106 TRACE_DEFINE_ENUM(NFSERR_ACCES);
1637         TP_STRUCT__entry(                     !! 1107 TRACE_DEFINE_ENUM(NFSERR_EXIST);
1638                 __string(option, option)      !! 1108 TRACE_DEFINE_ENUM(NFSERR_XDEV);
1639                 __string(value, value)        !! 1109 TRACE_DEFINE_ENUM(NFSERR_NODEV);
1640         ),                                    !! 1110 TRACE_DEFINE_ENUM(NFSERR_NOTDIR);
1641                                               !! 1111 TRACE_DEFINE_ENUM(NFSERR_ISDIR);
1642         TP_fast_assign(                       !! 1112 TRACE_DEFINE_ENUM(NFSERR_INVAL);
1643                 __assign_str(option);         !! 1113 TRACE_DEFINE_ENUM(NFSERR_FBIG);
1644                 __assign_str(value);          !! 1114 TRACE_DEFINE_ENUM(NFSERR_NOSPC);
1645         ),                                    !! 1115 TRACE_DEFINE_ENUM(NFSERR_ROFS);
1646                                               !! 1116 TRACE_DEFINE_ENUM(NFSERR_MLINK);
1647         TP_printk("option %s=%s",             !! 1117 TRACE_DEFINE_ENUM(NFSERR_OPNOTSUPP);
1648                 __get_str(option), __get_str( !! 1118 TRACE_DEFINE_ENUM(NFSERR_NAMETOOLONG);
1649         )                                     !! 1119 TRACE_DEFINE_ENUM(NFSERR_NOTEMPTY);
1650 );                                            !! 1120 TRACE_DEFINE_ENUM(NFSERR_DQUOT);
1651                                               !! 1121 TRACE_DEFINE_ENUM(NFSERR_STALE);
1652 TRACE_EVENT(nfs_mount_option,                 !! 1122 TRACE_DEFINE_ENUM(NFSERR_REMOTE);
1653         TP_PROTO(                             !! 1123 TRACE_DEFINE_ENUM(NFSERR_WFLUSH);
1654                 const struct fs_parameter *pa !! 1124 TRACE_DEFINE_ENUM(NFSERR_BADHANDLE);
1655         ),                                    !! 1125 TRACE_DEFINE_ENUM(NFSERR_NOT_SYNC);
1656                                               !! 1126 TRACE_DEFINE_ENUM(NFSERR_BAD_COOKIE);
1657         TP_ARGS(param),                       !! 1127 TRACE_DEFINE_ENUM(NFSERR_NOTSUPP);
1658                                               !! 1128 TRACE_DEFINE_ENUM(NFSERR_TOOSMALL);
1659         TP_STRUCT__entry(                     !! 1129 TRACE_DEFINE_ENUM(NFSERR_SERVERFAULT);
1660                 __string(option, param->key)  !! 1130 TRACE_DEFINE_ENUM(NFSERR_BADTYPE);
1661         ),                                    !! 1131 TRACE_DEFINE_ENUM(NFSERR_JUKEBOX);
1662                                               !! 1132 
1663         TP_fast_assign(                       !! 1133 #define nfs_show_status(x) \
1664                 __assign_str(option);         !! 1134         __print_symbolic(x, \
1665         ),                                    !! 1135                         { NFS_OK, "OK" }, \
1666                                               !! 1136                         { NFSERR_PERM, "PERM" }, \
1667         TP_printk("option %s", __get_str(opti !! 1137                         { NFSERR_NOENT, "NOENT" }, \
1668 );                                            !! 1138                         { NFSERR_IO, "IO" }, \
1669                                               !! 1139                         { NFSERR_NXIO, "NXIO" }, \
1670 TRACE_EVENT(nfs_mount_path,                   !! 1140                         { ECHILD, "CHILD" }, \
1671         TP_PROTO(                             !! 1141                         { NFSERR_EAGAIN, "AGAIN" }, \
1672                 const char *path              !! 1142                         { NFSERR_ACCES, "ACCES" }, \
1673         ),                                    !! 1143                         { NFSERR_EXIST, "EXIST" }, \
1674                                               !! 1144                         { NFSERR_XDEV, "XDEV" }, \
1675         TP_ARGS(path),                        !! 1145                         { NFSERR_NODEV, "NODEV" }, \
1676                                               !! 1146                         { NFSERR_NOTDIR, "NOTDIR" }, \
1677         TP_STRUCT__entry(                     !! 1147                         { NFSERR_ISDIR, "ISDIR" }, \
1678                 __string(path, path)          !! 1148                         { NFSERR_INVAL, "INVAL" }, \
1679         ),                                    !! 1149                         { NFSERR_FBIG, "FBIG" }, \
1680                                               !! 1150                         { NFSERR_NOSPC, "NOSPC" }, \
1681         TP_fast_assign(                       !! 1151                         { NFSERR_ROFS, "ROFS" }, \
1682                 __assign_str(path);           !! 1152                         { NFSERR_MLINK, "MLINK" }, \
1683         ),                                    !! 1153                         { NFSERR_OPNOTSUPP, "OPNOTSUPP" }, \
                                                   >> 1154                         { NFSERR_NAMETOOLONG, "NAMETOOLONG" }, \
                                                   >> 1155                         { NFSERR_NOTEMPTY, "NOTEMPTY" }, \
                                                   >> 1156                         { NFSERR_DQUOT, "DQUOT" }, \
                                                   >> 1157                         { NFSERR_STALE, "STALE" }, \
                                                   >> 1158                         { NFSERR_REMOTE, "REMOTE" }, \
                                                   >> 1159                         { NFSERR_WFLUSH, "WFLUSH" }, \
                                                   >> 1160                         { NFSERR_BADHANDLE, "BADHANDLE" }, \
                                                   >> 1161                         { NFSERR_NOT_SYNC, "NOTSYNC" }, \
                                                   >> 1162                         { NFSERR_BAD_COOKIE, "BADCOOKIE" }, \
                                                   >> 1163                         { NFSERR_NOTSUPP, "NOTSUPP" }, \
                                                   >> 1164                         { NFSERR_TOOSMALL, "TOOSMALL" }, \
                                                   >> 1165                         { NFSERR_SERVERFAULT, "REMOTEIO" }, \
                                                   >> 1166                         { NFSERR_BADTYPE, "BADTYPE" }, \
                                                   >> 1167                         { NFSERR_JUKEBOX, "JUKEBOX" })
1684                                                  1168 
1685         TP_printk("path='%s'", __get_str(path !! 1169 TRACE_EVENT(nfs_xdr_status,
1686 );                                            << 
1687                                               << 
1688 DECLARE_EVENT_CLASS(nfs_xdr_event,            << 
1689                 TP_PROTO(                        1170                 TP_PROTO(
1690                         const struct xdr_stre    1171                         const struct xdr_stream *xdr,
1691                         int error                1172                         int error
1692                 ),                               1173                 ),
1693                                                  1174 
1694                 TP_ARGS(xdr, error),             1175                 TP_ARGS(xdr, error),
1695                                                  1176 
1696                 TP_STRUCT__entry(                1177                 TP_STRUCT__entry(
1697                         __field(unsigned int,    1178                         __field(unsigned int, task_id)
1698                         __field(unsigned int,    1179                         __field(unsigned int, client_id)
1699                         __field(u32, xid)        1180                         __field(u32, xid)
1700                         __field(int, version) << 
1701                         __field(unsigned long    1181                         __field(unsigned long, error)
1702                         __string(program,     << 
1703                                  xdr->rqst->r << 
1704                         __string(procedure,   << 
1705                                  xdr->rqst->r << 
1706                 ),                               1182                 ),
1707                                                  1183 
1708                 TP_fast_assign(                  1184                 TP_fast_assign(
1709                         const struct rpc_rqst    1185                         const struct rpc_rqst *rqstp = xdr->rqst;
1710                         const struct rpc_task    1186                         const struct rpc_task *task = rqstp->rq_task;
1711                                                  1187 
1712                         __entry->task_id = ta    1188                         __entry->task_id = task->tk_pid;
1713                         __entry->client_id =     1189                         __entry->client_id = task->tk_client->cl_clid;
1714                         __entry->xid = be32_t    1190                         __entry->xid = be32_to_cpu(rqstp->rq_xid);
1715                         __entry->version = ta << 
1716                         __entry->error = erro    1191                         __entry->error = error;
1717                         __assign_str(program) << 
1718                         __assign_str(procedur << 
1719                 ),                               1192                 ),
1720                                                  1193 
1721                 TP_printk(SUNRPC_TRACE_TASK_S !! 1194                 TP_printk(
1722                           " xid=0x%08x %sv%d  !! 1195                         "task:%u@%d xid=0x%08x error=%ld (%s)",
1723                         __entry->task_id, __e    1196                         __entry->task_id, __entry->client_id, __entry->xid,
1724                         __get_str(program), _ !! 1197                         -__entry->error, nfs_show_status(__entry->error)
1725                         __get_str(procedure), << 
1726                         show_nfs_status(__ent << 
1727                 )                                1198                 )
1728 );                                               1199 );
1729 #define DEFINE_NFS_XDR_EVENT(name) \          << 
1730         DEFINE_EVENT(nfs_xdr_event, name, \   << 
1731                         TP_PROTO( \           << 
1732                                 const struct  << 
1733                                 int error \   << 
1734                         ), \                  << 
1735                         TP_ARGS(xdr, error))  << 
1736 DEFINE_NFS_XDR_EVENT(nfs_xdr_status);         << 
1737 DEFINE_NFS_XDR_EVENT(nfs_xdr_bad_filehandle); << 
1738                                                  1200 
1739 #endif /* _TRACE_NFS_H */                        1201 #endif /* _TRACE_NFS_H */
1740                                                  1202 
1741 #undef TRACE_INCLUDE_PATH                        1203 #undef TRACE_INCLUDE_PATH
1742 #define TRACE_INCLUDE_PATH .                     1204 #define TRACE_INCLUDE_PATH .
1743 #define TRACE_INCLUDE_FILE nfstrace              1205 #define TRACE_INCLUDE_FILE nfstrace
1744 /* This part must be outside protection */       1206 /* This part must be outside protection */
1745 #include <trace/define_trace.h>                  1207 #include <trace/define_trace.h>
1746                                                  1208 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php