~ [ 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-6.4.16)


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

~ [ 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