diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2010-07-22 05:51:16 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-23 04:28:57 -0700 |
commit | 80e2bfb8e4aaf5e7ae6647f2df4be1af80ee8b0a (patch) | |
tree | 0b2e6ebe74c43dc3af77a8cac2e451aea7623e81 /xlators/cluster/afr/src/afr-open.c | |
parent | dbab7f87b6fbcc4d1f518e6f98101331df51ce4a (diff) |
custer/afr added self-heal logging in normal mode
Changes are made such that self heal
messages are printed (filename, type of selfheal such as data/meatadata/entry
selfheal and the cause which triggered the selfheal) in the log file
when run in normal mode.
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1037 (selfheal information in normal logging mode)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1037
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-open.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index 1bfeb9cdfb8..60d80ea85c5 100644 --- a/xlators/cluster/afr/src/afr-open.c +++ b/xlators/cluster/afr/src/afr-open.c @@ -52,8 +52,8 @@ #include "afr-dir-read.h" #include "afr-dir-write.h" #include "afr-transaction.h" - #include "afr-self-heal.h" +#include "afr-self-heal-common.h" int @@ -350,9 +350,10 @@ out: int afr_up_down_flush_post_post_op (call_frame_t *frame, xlator_t *this) { - afr_private_t *priv = NULL; - afr_local_t *local = NULL; + afr_private_t *priv = NULL; + afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; + char sh_type_str[256] = {0,}; priv = this->private; local = frame->local; @@ -374,6 +375,13 @@ afr_up_down_flush_post_post_op (call_frame_t *frame, xlator_t *this) sh->background = _gf_false; sh->unwind = afr_up_down_flush_sh_unwind; + afr_self_heal_type_str_get(&local->self_heal, + sh_type_str, + sizeof(sh_type_str)); + gf_log (this->name, GF_LOG_NORMAL, "%s self-heal triggered. " + "path: %s, reason: Replicate up down flush, data lock is held", + sh_type_str, local->loc.path); + afr_self_heal (frame, this); return 0; |