summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-heald.c
diff options
context:
space:
mode:
authorNandaja Varma <nandaja.varma@gmail.com>2015-04-30 14:28:10 +0530
committerXavier Hernandez <xhernandez@datalab.es>2015-06-26 08:51:59 -0700
commit87af7e72d8be95ac0f2ade88f3a9ba16392fd158 (patch)
treeb9547026ed735942e480081618f4f72662deefaa /xlators/cluster/ec/src/ec-heald.c
parentadd64f005b0afacb6a7c54abf55f1372a6acea52 (diff)
ec: Porting messages to new logging framework
Change-Id: Ia05ae750a245a37d48978e5f37b52f4fb0507a8c BUG: 1194640 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/10465 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heald.c')
-rw-r--r--xlators/cluster/ec/src/ec-heald.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index bfdf9597e0e..75f58487264 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -12,6 +12,7 @@
#include "defaults.h"
#include "compat-errno.h"
#include "ec.h"
+#include "ec-messages.h"
#include "ec-heald.h"
#include "ec-mem-types.h"
#include "syncop.h"
@@ -182,7 +183,7 @@ ec_shd_index_inode (xlator_t *this, xlator_t *subvol)
if (ret)
goto out;
- gf_log (this->name, GF_LOG_DEBUG, "index-dir gfid for %s: %s",
+ gf_msg_debug (this->name, 0, "index-dir gfid for %s: %s",
subvol->name, uuid_utoa (index_gfid));
inode = ec_shd_inode_find (this, subvol, index_gfid);
@@ -232,7 +233,7 @@ ec_shd_index_heal (xlator_t *subvol, gf_dirent_t *entry, loc_t *parent,
if (!ec->shd.enabled)
return -EBUSY;
- gf_log (healer->this->name, GF_LOG_DEBUG, "got entry: %s",
+ gf_msg_debug (healer->this->name, 0, "got entry: %s",
entry->d_name);
ret = gf_uuid_parse (entry->d_name, loc.gfid);
@@ -274,7 +275,8 @@ ec_shd_index_sweep (struct subvol_healer *healer)
loc.inode = ec_shd_index_inode (healer->this, subvol);
if (!loc.inode) {
- gf_log (healer->this->name, GF_LOG_WARNING,
+ gf_msg (healer->this->name, GF_LOG_WARNING, errno,
+ EC_MSG_INDEX_DIR_GET_FAIL,
"unable to get index-dir on %s", subvol->name);
return -errno;
}
@@ -357,13 +359,13 @@ ec_shd_index_healer (void *data)
ASSERT_LOCAL(this, healer);
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_msg_debug (this->name, 0,
"starting index sweep on subvol %s",
ec_subvol_name (this, healer->subvol));
ec_shd_index_sweep (healer);
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_msg_debug (this->name, 0,
"finished index sweep on subvol %s",
ec_subvol_name (this, healer->subvol));
}
@@ -397,13 +399,15 @@ ec_shd_full_healer (void *data)
ASSERT_LOCAL(this, healer);
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ EC_MSG_FULL_SWEEP_START,
"starting full sweep on subvol %s",
ec_subvol_name (this, healer->subvol));
ec_shd_full_sweep (healer, this->itable->root);
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ EC_MSG_FULL_SWEEP_STOP,
"finished full sweep on subvol %s",
ec_subvol_name (this, healer->subvol));
}