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-dir-read.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-dir-read.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index e23aa414fec..d2b8e528797 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -47,6 +47,7 @@ #include "afr.h" #include "afr-self-heal.h" +#include "afr-self-heal-common.h" int @@ -107,8 +108,9 @@ afr_examine_dir_readdir_cbk (call_frame_t *frame, void *cookie, uint32_t entry_cksum; - int call_count = 0; + int call_count = 0; off_t last_offset = 0; + char sh_type_str[256] = {0,}; priv = this->private; local = frame->local; @@ -157,10 +159,16 @@ out: sh->background = _gf_false; sh->unwind = afr_examine_dir_sh_unwind; - gf_log (this->name, GF_LOG_DEBUG, - "checksums of directory %s differ," - " triggering forced merge", - local->loc.path); + 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: checksums of " + "directory differ," + " forced merge option set", + sh_type_str, local->loc.path); afr_self_heal (frame, this); } else { |