diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-08-04 16:20:13 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2015-11-18 20:01:37 -0800 |
commit | a52fd2cb7fa3aaff74461f58f32f4ff0b8e0904d (patch) | |
tree | 9c323ad2e9e1c0a291c3efed40551c40dda4cbf2 | |
parent | 4b8249a35aba28621ed59155ab27fb5bfa5f113f (diff) |
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: 1250009
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11833
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 14 | ||||
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops.c | 9 |
2 files changed, 14 insertions, 9 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 72dba93d5fc..16dd5b5ea0d 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -1338,12 +1338,14 @@ fuse_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, send_fuse_err (this, finh, 0); } else { - gf_log ("glusterfs-fuse", - op_errno == ENOTEMPTY ? GF_LOG_DEBUG : GF_LOG_WARNING, - "%"PRIu64": %s() %s => -1 (%s)", frame->root->unique, - gf_fop_list[frame->root->op], state->loc.path, - strerror (op_errno)); - + if (GF_IGNORE_IF_GSYNCD_SAFE_ERROR(frame, op_errno)) { + gf_log ("glusterfs-fuse", + op_errno == ENOTEMPTY ? GF_LOG_DEBUG : + GF_LOG_WARNING, "%"PRIu64": %s() %s => -1 (%s)", + frame->root->unique, + gf_fop_list[frame->root->op], state->loc.path, + strerror (op_errno)); + } send_fuse_err (this, finh, op_errno); } diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 0d80443c93a..0dd422edaaa 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -714,9 +714,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, |