From 2cd331dc3080f3a66edb12fa6cbab75c69b0147f Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Tue, 4 Aug 2015 16:20:13 +0530 Subject: geo-rep: Don't log geo-rep safe errors in mount logs ENOENT is a safe error for geo-replication in case of rm -rf. RMDIR is recorded in changelog of each brick, geo-rep processes all changelogs among which one will succeed and rest will get ENOENT which can be ignored. Similarly ENOENT can also be ignored in case of all unlink operation during changelog replay that can happen when worker goes down and comes back. Change-Id: I6756f8f4c3fce7a159751a2bfce891ff16ad31a4 BUG: 1283473 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/11833 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Aravinda VK Reviewed-by: Milind Changire Reviewed-by: Saravanakumar Arumugam Reviewed-by: Venky Shankar (cherry picked from commit a52fd2cb7fa3aaff74461f58f32f4ff0b8e0904d) Reviewed-on: http://review.gluster.org/12651 Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client-rpc-fops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 27b364116e0..ece23c988d9 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -719,9 +719,12 @@ client3_3_rmdir_cbk (struct rpc_req *req, struct iovec *iov, int count, out: if (rsp.op_ret == -1) { - gf_msg (this->name, GF_LOG_WARNING, - gf_error_to_errno (rsp.op_errno), - PC_MSG_REMOTE_OP_FAILED, "remote operation failed"); + if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, rsp.op_errno)) { + gf_msg (this->name, GF_LOG_WARNING, + gf_error_to_errno (rsp.op_errno), + PC_MSG_REMOTE_OP_FAILED, + "remote operation failed"); + } } CLIENT_STACK_UNWIND (rmdir, frame, rsp.op_ret, gf_error_to_errno (rsp.op_errno), &preparent, -- cgit