Hi, On Mon, May 30, 2022 at 10:55 AM Alexander Aring <aahri...@redhat.com> wrote: > > This patch adds the resource name to dlm tracepoints. In case of > dlm_lock() we might end in a short time situation (if flags is not > convert) that a lkb is not associated with a resource at the time > when the tracepoint is called. Therefore we have a a prioritzation of > getting the resource name. If the resource in a lkb isn't set we use the > name and namelen passed as parameter as fallback. > > The dlm resource name can be decoded as a string representated ascii > codec. DLM itself stores the name with as a null terminated array but > the user does not required to pass a null terminated resource name. To > have somehow a similar behaviour and the user knows that the resource > name of the dlm user is ascii codec we store the resource name array in > a null terminated array but pass the array length for the trace user > without the null terminated byte. The advantage here is that the user > can run directly a printf() on the resource name array with a optional > check on isascii(). > > The TP_printk() call however use always a hexadecimal string > representation for the resource name array. >
I forgot to mention here to say something about the rsb lock and refcount. Regarding the refcount it's stimple, if it's associated with a lkb, it can't be freed at this time... and the rsb lock, we access the name here only and I think this should never be changed. - Alex