scoutfs: turn on cluster locking stats

I accidentally left this off with the initial dlmglue commit. I enabled
it here so that I could see our CW locks happening in real time. We
don't print lock name yet but that will be remedied in a future patch.

Turning this on gives us a debugfs file,

/sys/kernel/debug/scoutfs/<fsid>/locking_state

which exports the full lock state to userspace. The information
exported on each lock is extensive. The export includes each locks name
level, blocking level, request state, flags, etc. We also get a count of
lock attempts and failures for each level (cw, pr, ex). In addition we
also get the total time and max time waited on a given lock request.

Signed-off-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
Mark Fasheh
2017-11-10 11:44:39 -08:00
committed by Zach Brown
parent a3d500c143
commit fe8e5e095c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ SCOUTFS_FORMAT_HASH := \
SCOUTFS_ARGS := SCOUTFS_GIT_DESCRIBE=$(SCOUTFS_GIT_DESCRIBE) \
SCOUTFS_FORMAT_HASH=$(SCOUTFS_FORMAT_HASH) \
CONFIG_SCOUTFS_FS=m -C $(SK_KSRC) M=$(CURDIR)/src \
EXTRA_CFLAGS=-Werror
EXTRA_CFLAGS="-Werror -DCONFIG_OCFS2_FS_STATS"
all: module
+2 -2
View File
@@ -179,9 +179,9 @@ static void ocfs2_update_lock_stats(struct ocfs2_lock_res *res, int level,
ktime_t kt;
struct ocfs2_lock_stats *stats;
if (level == LKM_PRMODE)
if (level == DLM_LOCK_PR)
stats = &res->l_lock_prmode;
else if (level == LKM_EXMODE)
else if (level == DLM_LOCK_EX)
stats = &res->l_lock_exmode;
else
return;