summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 10:31:29 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 10:31:29 -0800
commit9576c2f2934eb5839a468ae156418ef595d5fec6 (patch)
tree1dd64350de1830f639ac8b46bd0183a9fd7febc9 /include/trace
parent8e483ed1342a4ea45b70f0f33ac54eff7a33d918 (diff)
parent616fb38fa7a9599293e05ae1fa9acfaf73922434 (diff)
downloadlinux-stable-9576c2f2934eb5839a468ae156418ef595d5fec6.tar.gz
linux-stable-9576c2f2934eb5839a468ae156418ef595d5fec6.tar.bz2
linux-stable-9576c2f2934eb5839a468ae156418ef595d5fec6.zip
Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux
Pull file locking updates from Jeff Layton: "The largest series of changes is from Ben who offered up a set to add a new helper function for setting locks based on the type set in fl_flags. Dmitry also send in a fix for a potential race that he found with KTSAN" * tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux: locks: cleanup posix_lock_inode_wait and flock_lock_inode_wait Move locks API users to locks_lock_inode_wait() locks: introduce locks_lock_inode_wait() locks: Use more file_inode and fix a comment fs: fix data races on inode->i_flctx locks: change tracepoint for generic_add_lease
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/filelock.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/include/trace/events/filelock.h b/include/trace/events/filelock.h
index a0d008070962..c72f2dc01d0b 100644
--- a/include/trace/events/filelock.h
+++ b/include/trace/events/filelock.h
@@ -81,15 +81,47 @@ DEFINE_EVENT(filelock_lease, break_lease_block, TP_PROTO(struct inode *inode, st
DEFINE_EVENT(filelock_lease, break_lease_unblock, TP_PROTO(struct inode *inode, struct file_lock *fl),
TP_ARGS(inode, fl));
-DEFINE_EVENT(filelock_lease, generic_add_lease, TP_PROTO(struct inode *inode, struct file_lock *fl),
- TP_ARGS(inode, fl));
-
DEFINE_EVENT(filelock_lease, generic_delete_lease, TP_PROTO(struct inode *inode, struct file_lock *fl),
TP_ARGS(inode, fl));
DEFINE_EVENT(filelock_lease, time_out_leases, TP_PROTO(struct inode *inode, struct file_lock *fl),
TP_ARGS(inode, fl));
+TRACE_EVENT(generic_add_lease,
+ TP_PROTO(struct inode *inode, struct file_lock *fl),
+
+ TP_ARGS(inode, fl),
+
+ TP_STRUCT__entry(
+ __field(unsigned long, i_ino)
+ __field(int, wcount)
+ __field(int, dcount)
+ __field(int, icount)
+ __field(dev_t, s_dev)
+ __field(fl_owner_t, fl_owner)
+ __field(unsigned int, fl_flags)
+ __field(unsigned char, fl_type)
+ ),
+
+ TP_fast_assign(
+ __entry->s_dev = inode->i_sb->s_dev;
+ __entry->i_ino = inode->i_ino;
+ __entry->wcount = atomic_read(&inode->i_writecount);
+ __entry->dcount = d_count(fl->fl_file->f_path.dentry);
+ __entry->icount = atomic_read(&inode->i_count);
+ __entry->fl_owner = fl ? fl->fl_owner : NULL;
+ __entry->fl_flags = fl ? fl->fl_flags : 0;
+ __entry->fl_type = fl ? fl->fl_type : 0;
+ ),
+
+ TP_printk("dev=0x%x:0x%x ino=0x%lx wcount=%d dcount=%d icount=%d fl_owner=0x%p fl_flags=%s fl_type=%s",
+ MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
+ __entry->i_ino, __entry->wcount, __entry->dcount,
+ __entry->icount, __entry->fl_owner,
+ show_fl_flags(__entry->fl_flags),
+ show_fl_type(__entry->fl_type))
+);
+
#endif /* _TRACE_FILELOCK_H */
/* This part must be outside protection */