diff options
author | Nandaja Varma <nandaja.varma@gmail.com> | 2015-04-30 14:28:10 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-27 02:19:38 -0700 |
commit | cb578de65bd7e03882dd4f48fe65b29935a426e0 (patch) | |
tree | 464f910405d727858002ecb9e1f3ff1debee5bdf /xlators/cluster/ec/src/ec-heald.c | |
parent | 8708953fa3d9187997dc6d484dae663b4469c7ca (diff) |
ec: Porting messages to new logging framework
This is a backport of http://review.gluster.org/#/c/10465/
cherry-picked from commit b0b9eaea9dbb4e9a535f5e969defc4556a9e2204
>Change-Id: Ia05ae750a245a37d48978e5f37b52f4fb0507a8c
>BUG: 1194640
>Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Change-Id: Ia05ae750a245a37d48978e5f37b52f4fb0507a8c
BUG: 1217722
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/11429
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heald.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-heald.c | 18 |
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)); } |