From 35e8ecabd7db36431ea93f523095bc21078ecef8 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 13 Nov 2016 16:43:36 +0530 Subject: system/posix-acl: Log reason for EACCES It is becoming increasingly difficult to debug the reason why posix-acl decides to fail a fop with EACCES. This patch prints a big log everytime such a condition occurs giving out the details that may help in finding why the fop is errored out. Change-Id: I2505baaafb5d77ef6c187554ff027df9b20468db BUG: 1394548 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/15837 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra Talur --- libglusterfs/src/common-utils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/common-utils.c') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 14a344958fd..18c2a39d60e 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -36,7 +36,6 @@ #endif #include -#include "glusterfs-acl.h" #include "compat-errno.h" #include "logging.h" #include "common-utils.h" @@ -4588,3 +4587,11 @@ gf_bits_index (uint64_t n) { return ffsll(n) - 1; } + +const char* +gf_fop_string (glusterfs_fop_t fop) +{ + if ((fop > GF_FOP_NULL) && (fop < GF_FOP_MAXVALUE)) + return gf_fop_list[fop]; + return "INVALID"; +} -- cgit