Merge tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking updates from Jeff Layton: "Just a couple of small lease-related patches this cycle. One from Ira to add a new tracepoint that fires during lease conflict checks, and another patch from Amir to reduce false positives when checking for lease conflicts" * tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: eliminate false positive conflicts for write lease locks: Add trace_leases_conflict
This commit is contained in:
@@ -203,6 +203,41 @@ TRACE_EVENT(generic_add_lease,
|
||||
show_fl_type(__entry->fl_type))
|
||||
);
|
||||
|
||||
TRACE_EVENT(leases_conflict,
|
||||
TP_PROTO(bool conflict, struct file_lock *lease, struct file_lock *breaker),
|
||||
|
||||
TP_ARGS(conflict, lease, breaker),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(void *, lease)
|
||||
__field(void *, breaker)
|
||||
__field(unsigned int, l_fl_flags)
|
||||
__field(unsigned int, b_fl_flags)
|
||||
__field(unsigned char, l_fl_type)
|
||||
__field(unsigned char, b_fl_type)
|
||||
__field(bool, conflict)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->lease = lease;
|
||||
__entry->l_fl_flags = lease->fl_flags;
|
||||
__entry->l_fl_type = lease->fl_type;
|
||||
__entry->breaker = breaker;
|
||||
__entry->b_fl_flags = breaker->fl_flags;
|
||||
__entry->b_fl_type = breaker->fl_type;
|
||||
__entry->conflict = conflict;
|
||||
),
|
||||
|
||||
TP_printk("conflict %d: lease=0x%p fl_flags=%s fl_type=%s; breaker=0x%p fl_flags=%s fl_type=%s",
|
||||
__entry->conflict,
|
||||
__entry->lease,
|
||||
show_fl_flags(__entry->l_fl_flags),
|
||||
show_fl_type(__entry->l_fl_type),
|
||||
__entry->breaker,
|
||||
show_fl_flags(__entry->b_fl_flags),
|
||||
show_fl_type(__entry->b_fl_type))
|
||||
);
|
||||
|
||||
#endif /* _TRACE_FILELOCK_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
Reference in New Issue
Block a user