summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-algorithm.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-06-09 04:00:40 +0000
committerAnand Avati <avati@gluster.com>2011-06-09 07:41:28 -0700
commit272d43e6721d559594375e385b42e88122b42bd9 (patch)
treed9d5eba425c9fd11ba0b264b5de917e86cca3127 /xlators/cluster/afr/src/afr-self-heal-algorithm.c
parent1a06583bc6ad298c97bdbafbcc0246bddc0ce301 (diff)
cluster/afr: Log errors in afr self-heal with GF_LOG_ERROR
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2986 (Failed operations should should be logged `E' or `W') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2986
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-algorithm.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.c b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
index f72da774127..23012ac0edb 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.c
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
@@ -161,7 +161,7 @@ sh_full_write_cbk (call_frame_t *rw_frame, void *cookie, xlator_t *this,
LOCK (&sh_frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_ERROR,
"write to %s failed on subvolume %s (%s)",
sh_local->loc.path,
priv->children[child_index]->name,
@@ -218,6 +218,12 @@ sh_full_read_cbk (call_frame_t *rw_frame, void *cookie,
op_ret, sh_local->loc.path, offset);
if (op_ret <= 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "read from %s failed on subvolume %s (%s)",
+ sh_local->loc.path,
+ priv->children[sh->source]->name,
+ strerror (op_errno));
+
sh->op_failed = 1;
sh_full_loop_return (rw_frame, this, offset);
return 0;
@@ -611,7 +617,7 @@ sh_diff_write_cbk (call_frame_t *rw_frame, void *cookie, xlator_t *this,
LOCK (&sh_frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_ERROR,
"write to %s failed on subvolume %s (%s)",
sh_local->loc.path,
priv->children[child_index]->name,