summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot.c
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2015-06-25 12:07:24 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-06-25 06:09:26 -0700
commitdf77ac5088ebe1a1645489d77bdae77ce6cbc828 (patch)
tree10106364d8a2a01fdfd219dc3ed26c53f6158671 /xlators/features/bit-rot/src/bitd/bit-rot.c
parent913631a0edffaefc0fae73df46f80e19422ebed9 (diff)
features/bitrot: convert pending gf_log() to gf_msg()
Change-Id: Idfd245327b485459ccbda503510b8ca0127bb66c BUG: 1231619 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11396 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot.c')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index e822d53..f58354a 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -1259,7 +1259,8 @@ br_child_enaction (xlator_t *this, br_child_t *child, br_stub_init_t *stub)
if (!ret) {
child->witnessed = 1;
_br_set_child_state (child, BR_CHILD_STATE_CONNECTED);
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO,
+ 0, BRB_MSG_CONNECTED_TO_BRICK,
"Connected to brick %s..", child->brick_path);
}
}
@@ -1384,7 +1385,8 @@ br_cleanup_scrubber (xlator_t *this, br_child_t *child)
*/
ret = gf_thread_cleanup_xint (child->thread);
if (ret)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_INFO,
+ 0, BRB_MSG_SCRUB_THREAD_CLEANUP,
"Error cleaning up scanner thread");
/**
@@ -1402,7 +1404,8 @@ br_cleanup_scrubber (xlator_t *this, br_child_t *child)
*/
_br_child_set_scrub_state (child, BR_SCRUB_STATE_INACTIVE);
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO,
+ 0, BRB_MSG_SCRUBBER_CLEANED,
"Cleaned up scrubber for brick [%s]", child->brick_path);
return 0;
@@ -1517,8 +1520,9 @@ _br_qchild_event (xlator_t *this, br_child_t *child, br_child_handler *call)
childev = GF_CALLOC (1, sizeof (*childev), gf_br_mt_br_child_event_t);
if (!childev) {
- gf_log (this->name, GF_LOG_ERROR, "Event unhandled for "
- "child.. [Brick: %s]", child->xl->name);
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM, BRB_MSG_NO_MEMORY,
+ "Event unhandled for child.. [Brick: %s]",
+ child->xl->name);
return;
}
@@ -1800,7 +1804,8 @@ br_init_children (xlator_t *this, br_private_t *priv)
child->timer_pool = mem_pool_new
(struct gf_tw_timer_list, 4096);
if (!child->timer_pool) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR,
+ ENOMEM, BRB_MSG_NO_MEMORY,
"failed to allocate mem-pool for timer");
errno = ENOMEM;
goto freechild;
@@ -1827,13 +1832,14 @@ init (xlator_t *this)
br_private_t *priv = NULL;
if (!this->children) {
- gf_log (this->name, GF_LOG_ERROR, "FATAL: no children");
+ gf_msg (this->name, GF_LOG_ERROR, 0, BRB_MSG_NO_CHILD,
+ "FATAL: no children");
goto out;
}
priv = GF_CALLOC (1, sizeof (*priv), gf_br_mt_br_private_t);
if (!priv) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM, BRB_MSG_NO_MEMORY,
"failed to allocate memory (->priv)");
goto out;
}
@@ -1925,9 +1931,10 @@ br_reconfigure_child (xlator_t *this, br_child_t *child)
ret = br_scrub_state_machine (this, child);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "Could not reschedule scrubber for brick: %s. "
- "Scubbing will continue according to old frequency.",
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ BRB_MSG_RESCHEDULE_SCRUBBER_FAILED,
+ "Could not reschedule scrubber for brick: %s. Scubbing "
+ "will continue according to old frequency.",
child->brick_path);
}
}
@@ -1958,7 +1965,8 @@ br_reconfigure_scrubber (xlator_t *this, dict_t *options)
LOCK (&child->lock);
{
if (_br_child_failed_conn (child)) {
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO,
+ 0, BRB_MSG_BRICK_INFO,
"Scrubber for brick [%s] failed "
"initialization, rescheduling is "
"skipped", child->brick_path);