diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 13:31:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 13:31:29 -0500 |
commit | 9576c2f2934eb5839a468ae156418ef595d5fec6 (patch) | |
tree | 1dd64350de1830f639ac8b46bd0183a9fd7febc9 /include/trace | |
parent | 8e483ed1342a4ea45b70f0f33ac54eff7a33d918 (diff) | |
parent | 616fb38fa7a9599293e05ae1fa9acfaf73922434 (diff) |
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.h | 38 |
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 | |||
81 | DEFINE_EVENT(filelock_lease, break_lease_unblock, TP_PROTO(struct inode *inode, struct file_lock *fl), | 81 | DEFINE_EVENT(filelock_lease, break_lease_unblock, TP_PROTO(struct inode *inode, struct file_lock *fl), |
82 | TP_ARGS(inode, fl)); | 82 | TP_ARGS(inode, fl)); |
83 | 83 | ||
84 | DEFINE_EVENT(filelock_lease, generic_add_lease, TP_PROTO(struct inode *inode, struct file_lock *fl), | ||
85 | TP_ARGS(inode, fl)); | ||
86 | |||
87 | DEFINE_EVENT(filelock_lease, generic_delete_lease, TP_PROTO(struct inode *inode, struct file_lock *fl), | 84 | DEFINE_EVENT(filelock_lease, generic_delete_lease, TP_PROTO(struct inode *inode, struct file_lock *fl), |
88 | TP_ARGS(inode, fl)); | 85 | TP_ARGS(inode, fl)); |
89 | 86 | ||
90 | DEFINE_EVENT(filelock_lease, time_out_leases, TP_PROTO(struct inode *inode, struct file_lock *fl), | 87 | DEFINE_EVENT(filelock_lease, time_out_leases, TP_PROTO(struct inode *inode, struct file_lock *fl), |
91 | TP_ARGS(inode, fl)); | 88 | TP_ARGS(inode, fl)); |
92 | 89 | ||
90 | TRACE_EVENT(generic_add_lease, | ||
91 | TP_PROTO(struct inode *inode, struct file_lock *fl), | ||
92 | |||
93 | TP_ARGS(inode, fl), | ||
94 | |||
95 | TP_STRUCT__entry( | ||
96 | __field(unsigned long, i_ino) | ||
97 | __field(int, wcount) | ||
98 | __field(int, dcount) | ||
99 | __field(int, icount) | ||
100 | __field(dev_t, s_dev) | ||
101 | __field(fl_owner_t, fl_owner) | ||
102 | __field(unsigned int, fl_flags) | ||
103 | __field(unsigned char, fl_type) | ||
104 | ), | ||
105 | |||
106 | TP_fast_assign( | ||
107 | __entry->s_dev = inode->i_sb->s_dev; | ||
108 | __entry->i_ino = inode->i_ino; | ||
109 | __entry->wcount = atomic_read(&inode->i_writecount); | ||
110 | __entry->dcount = d_count(fl->fl_file->f_path.dentry); | ||
111 | __entry->icount = atomic_read(&inode->i_count); | ||
112 | __entry->fl_owner = fl ? fl->fl_owner : NULL; | ||
113 | __entry->fl_flags = fl ? fl->fl_flags : 0; | ||
114 | __entry->fl_type = fl ? fl->fl_type : 0; | ||
115 | ), | ||
116 | |||
117 | 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", | ||
118 | MAJOR(__entry->s_dev), MINOR(__entry->s_dev), | ||
119 | __entry->i_ino, __entry->wcount, __entry->dcount, | ||
120 | __entry->icount, __entry->fl_owner, | ||
121 | show_fl_flags(__entry->fl_flags), | ||
122 | show_fl_type(__entry->fl_type)) | ||
123 | ); | ||
124 | |||
93 | #endif /* _TRACE_FILELOCK_H */ | 125 | #endif /* _TRACE_FILELOCK_H */ |
94 | 126 | ||
95 | /* This part must be outside protection */ | 127 | /* This part must be outside protection */ |