diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2012-08-12 13:29:10 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-08-23 21:42:19 -0700 |
commit | 16e880a9580dc920dedf36856154cf791e7d040a (patch) | |
tree | 0d142bba761b3bc9bf3cb11949eb90b7bd76bec4 /xlators/cluster/afr/src/afr-common.c | |
parent | 058a736f9e36238c284ca80e7ed5f62434655019 (diff) |
afr: Avoid excessive logging in self-heal.
- (Excessive) Logging has been very useful as 'bread-crumbs' in
many a root-cause analyses. This patch aims at avoiding logging when
the information could be reconstructed using the xattrs, statedump,
and/or "volume heal" CLI commands.
Change-Id: Iebc6b10ae18f0dd9704bdc6dd03bcfe0f2a09abd
BUG: 844804
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/3805
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 70a9cd35463..ddcd0bca37a 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1219,7 +1219,7 @@ afr_detect_self_heal_by_iatt (afr_local_t *local, xlator_t *this, { if (PERMISSION_DIFFERS (buf, lookup_buf)) { /* mismatching permissions */ - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "permissions differ for %s ", local->loc.path); local->self_heal.do_metadata_self_heal = _gf_true; } @@ -1227,13 +1227,13 @@ afr_detect_self_heal_by_iatt (afr_local_t *local, xlator_t *this, if (OWNERSHIP_DIFFERS (buf, lookup_buf)) { /* mismatching permissions */ local->self_heal.do_metadata_self_heal = _gf_true; - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "ownership differs for %s ", local->loc.path); } if (SIZE_DIFFERS (buf, lookup_buf) && IA_ISREG (buf->ia_type)) { - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "size differs for %s ", local->loc.path); local->self_heal.do_data_self_heal = _gf_true; } @@ -1258,7 +1258,7 @@ afr_detect_self_heal_by_split_brain_status (afr_local_t *local, xlator_t *this) if ((local->success_count > 0) && split_brain && IA_ISREG (local->cont.lookup.inode->ia_type)) { sh->force_confirm_spb = _gf_true; - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_DEBUG, "split brain detected during lookup of %s.", local->loc.path); } @@ -1276,14 +1276,11 @@ afr_detect_self_heal_by_lookup_status (afr_local_t *local, xlator_t *this) local->self_heal.do_entry_self_heal = _gf_true; local->self_heal.do_gfid_self_heal = _gf_true; local->self_heal.do_missing_entry_self_heal = _gf_true; - gf_log(this->name, GF_LOG_INFO, + gf_log(this->name, GF_LOG_DEBUG, "entries are missing in lookup of %s.", local->loc.path); - //If all self-heals are needed no need to check for other rules - goto out; } -out: return; } @@ -1396,7 +1393,7 @@ afr_launch_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode, if (background) bg = "background"; - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "%s %s self-heal triggered. path: %s, reason: %s", bg, sh_type_str, local->loc.path, reason); |