aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lock.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-11-02 15:17:23 -0400
committerDavid Teigland <teigland@redhat.com>2021-11-02 14:39:20 -0500
commit63eab2b00bcff620682e8570367458c9619a9970 (patch)
treedad15a9f20972da5929364405c074f53f08b14f3 /fs/dlm/lock.c
parent5054e79de99984b4f39a073534526bc7c827b1e0 (diff)
downloadlinux-63eab2b00bcff620682e8570367458c9619a9970.tar.gz
fs: dlm: add lkb waiters debugfs functionality
This patch adds functionality to put a lkb to the waiters state. It can be useful to combine this feature with the "rawmsg" debugfs functionality. It will bring the DLM lkb into a state that a message will be parsed by the kernel. 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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index aeb793693d8c5..0dbe273566c0b 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -6363,3 +6363,18 @@ int dlm_debug_add_lkb(struct dlm_ls *ls, uint32_t lkb_id, char *name, int len,
return 0;
}
+int dlm_debug_add_lkb_to_waiters(struct dlm_ls *ls, uint32_t lkb_id,
+ int mstype, int to_nodeid)
+{
+ struct dlm_lkb *lkb;
+ int error;
+
+ error = find_lkb(ls, lkb_id, &lkb);
+ if (error)
+ return error;
+
+ error = add_to_waiters(lkb, mstype, to_nodeid);
+ dlm_put_lkb(lkb);
+ return error;
+}
+