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