summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/clear.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2018-12-06 16:13:46 +0100
committerAmar Tumballi <amarts@redhat.com>2018-12-14 04:54:28 +0000
commit930d8b706136e2aaa1f3d173f79e1a4970e65561 (patch)
tree20673c9c9bf0fba67bc3cf4d3924b267d099d16d /xlators/features/locks/src/clear.c
parente3d01793a3ef1307240fdc7d7f0d12be1488b921 (diff)
locks: handle "clear locks" xattr in fgetxattr too
The lock clearing procedure was kicked in only in getxattr context. We need it to work the same way if it's triggered via fgetxattr (as is the case with interrupt handling). Also cleaned up the instrumentation a bit (more logs, proper management of allocated data). updates: #465 Change-Id: Icfca26ee181da3b8e15ca3fcf61cd5702e2730c8 Signed-off-by: Csaba Henk <csaba@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/clear.c')
-rw-r--r--xlators/features/locks/src/clear.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/locks/src/clear.c b/xlators/features/locks/src/clear.c
index 578d6d18666..116aed68690 100644
--- a/xlators/features/locks/src/clear.c
+++ b/xlators/features/locks/src/clear.c
@@ -23,6 +23,12 @@
#include <glusterfs/statedump.h>
#include "clear.h"
+const char *clrlk_type_names[CLRLK_TYPE_MAX] = {
+ [CLRLK_INODE] = "inode",
+ [CLRLK_ENTRY] = "entry",
+ [CLRLK_POSIX] = "posix",
+};
+
int
clrlk_get_kind(char *kind)
{