diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-06-22 14:45:12 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-06-24 11:53:09 -0500 |
commit | 5d92a30e900dc97221e36f09ae740457d560d281 (patch) | |
tree | a125a0418fd38ab4810ef8d2706a6e4946361722 /fs/dlm/lock.c | |
parent | 0c4c516fa206d6e8a3986eebd3016a96022792c6 (diff) | |
download | linux-5d92a30e900dc97221e36f09ae740457d560d281.tar.bz2 |
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>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 226822f49d30..e80d42ba64ae 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -3472,7 +3472,7 @@ int dlm_lock(dlm_lockspace_t *lockspace, if (error) goto out; - trace_dlm_lock_start(ls, lkb, mode, flags); + trace_dlm_lock_start(ls, lkb, name, namelen, mode, flags); error = set_lock_args(mode, lksb, flags, namelen, 0, ast, astarg, bast, &args); @@ -3487,7 +3487,7 @@ int dlm_lock(dlm_lockspace_t *lockspace, if (error == -EINPROGRESS) error = 0; out_put: - trace_dlm_lock_end(ls, lkb, mode, flags, error); + trace_dlm_lock_end(ls, lkb, name, namelen, mode, flags, error); if (convert || error) __put_lkb(ls, lkb); |