summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-metadata.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-24 07:28:00 +0000
committerVijay Bellur <vijay@shell.gluster.com>2011-04-06 06:26:53 -0700
commita1a0e929534cb56e3a938229c7f87bfd0f1c17ec (patch)
treed8483c54747686e1ef64c22efc7117ce774a3b25 /xlators/cluster/afr/src/afr-self-heal-metadata.c
parentba044581fa8781886fbd4f4675f388c79f599b2c (diff)
cluster/afr: log enhancements - part 1
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@shell.gluster.com> BUG: 2346 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index 3f2e657a4..ee27a7bd1 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -76,13 +76,13 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
}
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_INFO,
"aborting selfheal of %s",
local->loc.path);
sh->completion_cbk (frame, this);
} else {
if (IA_ISREG (sh->type)) {
- gf_log (this->name, GF_LOG_TRACE,
+ gf_log (this->name, GF_LOG_DEBUG,
"proceeding to data check on %s",
local->loc.path);
afr_self_heal_data (frame, this);
@@ -90,7 +90,7 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
}
if (IA_ISDIR (sh->type)) {
- gf_log (this->name, GF_LOG_TRACE,
+ gf_log (this->name, GF_LOG_DEBUG,
"proceeding to entry check on %s",
local->loc.path);
afr_self_heal_entry (frame, this);
@@ -155,11 +155,6 @@ afr_sh_metadata_erase_pending_cbk (call_frame_t *frame, void *cookie,
local = frame->local;
- LOCK (&frame->lock);
- {
- }
- UNLOCK (&frame->lock);
-
call_count = afr_frame_return (frame);
if (call_count == 0)
@@ -190,6 +185,8 @@ afr_sh_metadata_erase_pending (call_frame_t *frame, xlator_t *this)
erase_xattr = GF_CALLOC (sizeof (*erase_xattr), priv->child_count,
gf_afr_mt_dict_t);
+ if (!erase_xattr)
+ return -ENOMEM;
for (i = 0; i < priv->child_count; i++) {
if (sh->xattr[i]) {
@@ -206,7 +203,7 @@ afr_sh_metadata_erase_pending (call_frame_t *frame, xlator_t *this)
local->call_count = call_count;
if (call_count == 0) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_INFO,
"metadata of %s not healed on any subvolume",
local->loc.path);
@@ -262,7 +259,7 @@ afr_sh_metadata_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_INFO,
"setting attributes failed for %s on %s (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -314,7 +311,7 @@ afr_sh_metadata_sync (call_frame_t *frame, xlator_t *this, dict_t *xattr)
int call_count = 0;
int i = 0;
- struct iatt stbuf;
+ struct iatt stbuf = {0,};
int32_t valid = 0;
local = frame->local;
@@ -591,7 +588,7 @@ afr_sh_metadata_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (xattr)
sh->xattr[child_index] = dict_ref (xattr);
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_INFO,
"path %s on subvolume %s => -1 (%s)",
local->loc.path,
priv->children[child_index]->name,