aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfstrace.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-21 10:53:09 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-22 08:58:18 -0400
commit8b0ad3d489cb107804bd8c78695532794eec73d5 (patch)
tree8effbc44356b30d38f6a267838d90bc639e9ff94 /fs/nfs/nfstrace.h
parent6e0d0be715fe041fc7121b0b44cde3015d1cc846 (diff)
NFS: Add tracepoints for debugging generic file create events
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfstrace.h')
-rw-r--r--fs/nfs/nfstrace.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index fba194b70027..2963a050ceff 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -352,6 +352,76 @@ TRACE_EVENT(nfs_atomic_open_exit,
352 ) 352 )
353); 353);
354 354
355TRACE_EVENT(nfs_create_enter,
356 TP_PROTO(
357 const struct inode *dir,
358 const struct dentry *dentry,
359 unsigned int flags
360 ),
361
362 TP_ARGS(dir, dentry, flags),
363
364 TP_STRUCT__entry(
365 __field(unsigned int, flags)
366 __field(dev_t, dev)
367 __field(u64, dir)
368 __string(name, dentry->d_name.name)
369 ),
370
371 TP_fast_assign(
372 __entry->dev = dir->i_sb->s_dev;
373 __entry->dir = NFS_FILEID(dir);
374 __entry->flags = flags;
375 __assign_str(name, dentry->d_name.name);
376 ),
377
378 TP_printk(
379 "flags=%u (%s) name=%02x:%02x:%llu/%s",
380 __entry->flags,
381 show_open_flags(__entry->flags),
382 MAJOR(__entry->dev), MINOR(__entry->dev),
383 (unsigned long long)__entry->dir,
384 __get_str(name)
385 )
386);
387
388TRACE_EVENT(nfs_create_exit,
389 TP_PROTO(
390 const struct inode *dir,
391 const struct dentry *dentry,
392 unsigned int flags,
393 int error
394 ),
395
396 TP_ARGS(dir, dentry, flags, error),
397
398 TP_STRUCT__entry(
399 __field(int, error)
400 __field(unsigned int, flags)
401 __field(dev_t, dev)
402 __field(u64, dir)
403 __string(name, dentry->d_name.name)
404 ),
405
406 TP_fast_assign(
407 __entry->error = error;
408 __entry->dev = dir->i_sb->s_dev;
409 __entry->dir = NFS_FILEID(dir);
410 __entry->flags = flags;
411 __assign_str(name, dentry->d_name.name);
412 ),
413
414 TP_printk(
415 "error=%d flags=%u (%s) name=%02x:%02x:%llu/%s",
416 __entry->error,
417 __entry->flags,
418 show_open_flags(__entry->flags),
419 MAJOR(__entry->dev), MINOR(__entry->dev),
420 (unsigned long long)__entry->dir,
421 __get_str(name)
422 )
423);
424
355#endif /* _TRACE_NFS_H */ 425#endif /* _TRACE_NFS_H */
356 426
357#undef TRACE_INCLUDE_PATH 427#undef TRACE_INCLUDE_PATH