From 009363dbc162dca71efce6689497b3948a14bd82 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 9 Apr 2015 19:00:58 +0530 Subject: geo-rep: Don't log geo-rep safe errors in mount logs EEXIST and ENOENT are safe errors for geo-replication. Since mkdir is captured in all the bricks of the changelog. mkdir is tried multiple times as per the number of bricks. The first one to process by gsyncd will succeed and all others will get EEXIST. Hence EEXIST is a safe error and can be ignored. Similarly ENOENT also in rm -rf case. And also gsyncd validates these errors and log them in master if it is genuine error. This is coming up with the patch http://review.gluster.org/#/c/10048/ Hence ignoring above said safe errors. Change-Id: I10ae86b11d49c7c3ba2be3110dace6b33daa509e BUG: 1210562 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/10184 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 057c4aeb8dc..235db5fe34b 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -287,6 +287,10 @@ int gf_set_log_ident (cmd_args_t *cmd_args); if (gf_uuid_is_null (u))\ GF_ASSERT (!"uuid null"); +#define GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, op_errno) \ + (((frame->root->pid == GF_CLIENT_PID_GSYNCD) && \ + (op_errno == EEXIST || op_errno == ENOENT))?0:1) \ + union gf_sock_union { struct sockaddr_storage storage; struct sockaddr_in6 sin6; -- cgit