summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-open.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-10-10 09:51:28 +0530
committerVijay Bellur <vbellur@redhat.com>2014-10-20 22:53:12 -0700
commit5ac067e560696410c059b21ca039f74687c62e7a (patch)
tree93d27336473c4a4d5dd8ef69965f3caaf6a59e5b /xlators/cluster/afr/src/afr-open.c
parente4d25d50b58d3ee08453492852b79425c398aa05 (diff)
logs: Do selective logging for errnos
Problem: Just after replace-brick the mount logs are filled with ENOENT/ESTALE warning logs because the file is yet to be self-healed now that the brick is new. Fix: Do conditional logging for the logs. ENOENT/ESTALE will be logged at lower log level. Only when debug logs are enabled, these logs will be written to the logfile. Change-Id: If203d09e2479e8c2415ebc14fb79d4fbb81dfc95 BUG: 1151303 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8918 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r--xlators/cluster/afr/src/afr-open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index f96f41c0dd9..f8ad8544e10 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -186,8 +186,9 @@ afr_openfd_fix_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"successfully on subvolume %s", local->loc.path,
priv->children[child_index]->name);
} else {
- gf_msg (this->name, GF_LOG_ERROR, op_errno, AFR_MSG_OPEN_FAIL,
- "Failed to open %s on subvolume %s", local->loc.path,
+ gf_msg (this->name, fop_log_level (GF_FOP_OPEN, op_errno),
+ op_errno, AFR_MSG_OPEN_FAIL, "Failed to open %s on "
+ "subvolume %s", local->loc.path,
priv->children[child_index]->name);
}