From 8c95006d55726eeebf3b863335accfba50d4bc8f Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 1 Aug 2023 14:09:42 -0400 Subject: fs: dlm: add plock dev tracepoints I currently debug nfs plock handling and introduce those two tracepoints for getting more information about what is happening there if the user space reads plock operations from kernel and writing the result back. Signed-off-by: Alexander Aring Signed-off-by: David Teigland --- fs/dlm/plock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/dlm') diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 5c2cc8d940ef..00e1d802a81c 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -11,6 +11,8 @@ #include #include +#include + #include "dlm_internal.h" #include "lockspace.h" @@ -509,6 +511,8 @@ static ssize_t dev_read(struct file *file, char __user *u, size_t count, if (!op) return -EAGAIN; + trace_dlm_plock_read(&info); + /* there is no need to get a reply from userspace for unlocks that were generated by the vfs cleaning up for a close (the process did not make an unlock call). */ @@ -536,6 +540,8 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, if (copy_from_user(&info, u, sizeof(info))) return -EFAULT; + trace_dlm_plock_write(&info); + if (check_version(&info)) return -EINVAL; -- cgit