summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-data.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-data.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-data.c')
-rw-r--r--xlators/cluster/ec/src/ec-data.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/xlators/cluster/ec/src/ec-data.c b/xlators/cluster/ec/src/ec-data.c
index 72f3b0b4107..0632371bb6d 100644
--- a/xlators/cluster/ec/src/ec-data.c
+++ b/xlators/cluster/ec/src/ec-data.c
@@ -12,6 +12,7 @@
#include "ec-helpers.h"
#include "ec-common.h"
#include "ec-data.h"
+#include "ec-messages.h"
ec_cbk_data_t * ec_cbk_data_allocate(call_frame_t * frame, xlator_t * this,
ec_fop_data_t * fop, int32_t id,
@@ -23,15 +24,16 @@ ec_cbk_data_t * ec_cbk_data_allocate(call_frame_t * frame, xlator_t * this,
if (fop->xl != this)
{
- gf_log(this->name, GF_LOG_ERROR, "Mismatching xlators between request "
- "and answer (req=%s, ans=%s).",
- fop->xl->name, this->name);
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ EC_MSG_XLATOR_MISMATCH, "Mismatching xlators between request "
+ "and answer (req=%s, ans=%s).", fop->xl->name, this->name);
return NULL;
}
if (fop->frame != frame)
{
- gf_log(this->name, GF_LOG_ERROR, "Mismatching frames between request "
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ EC_MSG_FRAME_MISMATCH, "Mismatching frames between request "
"and answer (req=%p, ans=%p).",
fop->frame, frame);
@@ -39,7 +41,8 @@ ec_cbk_data_t * ec_cbk_data_allocate(call_frame_t * frame, xlator_t * this,
}
if (fop->id != id)
{
- gf_log(this->name, GF_LOG_ERROR, "Mismatching fops between request "
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ EC_MSG_FOP_MISMATCH, "Mismatching fops between request "
"and answer (req=%d, ans=%d).",
fop->id, id);
@@ -49,7 +52,8 @@ ec_cbk_data_t * ec_cbk_data_allocate(call_frame_t * frame, xlator_t * this,
cbk = mem_get0(ec->cbk_pool);
if (cbk == NULL)
{
- gf_log(this->name, GF_LOG_ERROR, "Failed to allocate memory for an "
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
+ EC_MSG_NO_MEMORY, "Failed to allocate memory for an "
"answer.");
}
@@ -123,7 +127,8 @@ ec_fop_data_t * ec_fop_data_allocate(call_frame_t * frame, xlator_t * this,
fop = mem_get0(ec->fop_pool);
if (fop == NULL)
{
- gf_log(this->name, GF_LOG_ERROR, "Failed to allocate memory for a "
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
+ EC_MSG_NO_MEMORY, "Failed to allocate memory for a "
"request.");
return NULL;
@@ -155,7 +160,8 @@ ec_fop_data_t * ec_fop_data_allocate(call_frame_t * frame, xlator_t * this,
}
if (fop->frame == NULL)
{
- gf_log(this->name, GF_LOG_ERROR, "Failed to create a private frame "
+ gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
+ EC_MSG_NO_MEMORY, "Failed to create a private frame "
"for a request");
mem_put(fop);