]> git.baikalelectronics.ru Git - kernel.git/commit
fs: dlm: add resource name to tracepoints
authorAlexander Aring <aahringo@redhat.com>
Wed, 22 Jun 2022 18:45:12 +0000 (14:45 -0400)
committerDavid Teigland <teigland@redhat.com>
Fri, 24 Jun 2022 16:53:09 +0000 (11:53 -0500)
commitabec756c2abd9350fdf19ab9bbfbedc2b93b0c3f
treea125a0418fd38ab4810ef8d2706a6e4946361722
parent94764e0626b63f32e35d96917209048719b00ef0
fs: dlm: add resource name to tracepoints

This patch adds the resource name to dlm tracepoints.  The name
usually comes through the lkb_resource, but in some cases a resource
may not yet be associated with an lkb, in which case the name and
namelen parameters are used.

It should be okay to access the lkb_resource and the res_name field at
the time when the tracepoint is invoked. The resource is assigned to a
lkb and it's reference is being held during the tracepoint call. During
this time the resource cannot be freed. Also a lkb will never switch
its assigned resource. The name of a dlm_rsb is assigned at creation
time and should never be changed during runtime as well.

The TP_printk() call uses always a hexadecimal string array
representation for the resource name (which is not necessarily ascii.)

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c
include/trace/events/dlm.h